PacktPublishing / Mastering-ROS-for-Robotics-Programming-Third-edition

Mastering ROS for Robotics Programming - Third edition, Published by Packt
MIT License
109 stars 57 forks source link

Joint rpy + Link rpy .. why? #7dof #1

Open juansuerorobotics opened 2 years ago

juansuerorobotics commented 2 years ago

Hello,

I was taking a very detailed look at your 7dof example looking for strategies and best practices and getting my mind more acclimated to thinking in 3dimensions when i saw in

<joint name="shoulder_pan_joint" type="revolute">

u turned the orgin 90 degrees on the Y axis ( p for pitch is the Y axis ) <origin xyz="0 0 0.05" rpy="0 ${M_PI/2} 0" />

but then in the child link <link name="shoulder_pan_link">

you moved the visual origin another 90 degrees

        <visual>
            <origin xyz="0 0 0" rpy="0 ${M_PI/2} 0" />

why didnt you just turn the joint origin 180 degrees?

I guess im about to answer my own question because in another example i can see why you would spread changes of XYZ out across joint and child link.

for example a strategy where the joint origin Z axis of +5 would help you put the joint right at the top of the parent link that was of length 10. i get that. subsequently if the next link is of length 4 then its origin should be +2 so the bottom of that link can meet perfectly with the previous link.

but how does this same thinking work for angles?

i guess if the surface of the joint were at an angle for example not at the top but on its side. then id probably want the origin of the joint to be turned 90 degrees then maybe if the next link is a cylinder i could turn the origin of the link itself another 90 degrees so that id have a sort of a fan blade.. kinda like a wind turbine looking thing.?

juansuerorobotics commented 2 years ago

image

juansuerorobotics commented 2 years ago

image

juansuerorobotics commented 2 years ago

this next screenshot is your original example you also turned the joint origin 90 degrees on the Y and then you followed up by turning the link itself 90 degrees which put it upside down like mine

but your turning axis is the X axis whereas my turning axis is the Z axis.

your example confused me since having your turning axis be the new X axis you are turning upside down you might as well have just turned on the original Z axis and not done the two 90 degree flips and turn on your new X.

image