Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform matrix, whom to whom? #76

Closed
leemengwei opened this issue Mar 11, 2020 · 3 comments
Closed

Transform matrix, whom to whom? #76

leemengwei opened this issue Mar 11, 2020 · 3 comments

Comments

@leemengwei
Copy link

leemengwei commented Mar 11, 2020

Hi, thanks for your work. Great one, I like it. I'm doing some deeplearning research, thus I'm not quite familiar with robotics. Sorry for my innocent,
So here's my problem about what is 'real_frame' in code, does that mean to transform from end-effector to old one? (I think it is, but not sure)
Take two frame for example, world_frame and new_frame, when joint is given:


> <joint                 
>   name="joint1"        
>   type="revolute">     
>   <origin              
>     xyz="0 -0.43 0"    
>     rpy="1.5708 0 0" />        <-------rotation around axis X?    counter-clock wise? I guess?
>   <parent              
>     link="base_link" />
>   <child               
>     link="link1" />    
>   <axis                
>     xyz="0 0 1" />     
>   <limit               
>     lower="0"          
>     upper="0"          
>     effort="0"         
>     velocity="0" />    
> </joint>               

then returned two frames are:
[[[ 1. 0. 0. 0. ]
[ 0. 1. 0. 0. ]
[ 0. 0. 1. 0. ]
[ 0. 0. 0. 1. ]]

[[ 1. 0. 0. 0. ]
[ 0. -0. -1. -0.43]
[ 0. 1. -0. 0. ]
[ 0. 0. 0. 1. ]]

@Phylliade
Copy link
Owner

Hello @leemengwei,

could you paste the code that procuded these outputs?

@leemengwei
Copy link
Author

leemengwei commented Mar 17, 2020

Ops the codes are gone, I've modified them, yet my uncertain remains the same. The first matrix I gave out
[[[ 1. 0. 0. 0. ]
[ 0. 1. 0. 0. ]
[ 0. 0. 1. 0. ]
[ 0. 0. 0. 1. ]]
is something like base frame, world frame or say, I guess.
The second matrix
[[ 1. 0. 0. 0. ]
[ 0. -0. -1. -0.43]
[ 0. 1. -0. 0. ]
[ 0. 0. 0. 1. ]]
is frame I got after forward kinematic , something I got by:
new_frame = np.array(my_chain.forward_kinematics(six_axis)

what does the second matrix mean? Is't transformation from base to new, or from new to base? (I think is the new to base, am I right?)
Thanks

@Phylliade
Copy link
Owner

Phylliade commented Mar 22, 2020

This matrix is a position/orientation of the end-effector encoded as homogeneous coordinates;

[[ 1. 0. 0. 0. ]
[ 0. -0. -1. -0.43]
[ 0. 1. -0. 0. ]
[ 0. 0. 0. 1. ]]

With this, you can see that your position is matrix[3, :3], so here the position of your end-effector is [0, -0.43, 0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants