# Need advice on URDF axis rotations

Although I am running Ubuntu 14.04 LTS and testing using ROS-Fuerte, I believe that this question is independent of these facts. Furthermore, I am only using Fuerte because there are working examples that I can use. My plan is to port things to Indigo as soon as I have something that seems correct.

I am trying to build a URDF definition for a hexapod robot using xacro. I have the coordinate system arranged such that the two center side legs are aligned along the X-axis. The other legs are at 40 or 50 degrees off-axis. Since all legs are identical I planned on using a single macro to define a leg and expand it as needed to create them all.

Each leg has 3 joints. The first, where the leg attaches to the body, rotates parallel to the Z-axis. The other two joint axes always remain parallel to the body's X-Y plane.

I was originally thinking that I would use the X-axis as the length dimension, because that is most natural for the center legs and it looks similar to the tutorial. However, I am now realizing that with zero rotation the left leg extends in the negative X direction whereas the right runs positive.

Either way I need to rotate the other four legs so that the length runs parallel to one axis. The choice of the rotation will then define which axis the other two joints rotate about.

In general what I am wondering is what is the best way to arrange the rotations when defining the joints?

Is there any reason that I should choose X versus Y axis to run parallel to the leg length definition?

edit retag close merge delete

Can you update this with pictures?

( 2015-01-03 13:44:30 -0500 )edit

Sort by ยป oldest newest most voted

Actually, as it turns out I decided that aligning the Y-axis with the legs would be best because using the X-axis would require one of them to use a 180 degree rotation. Aligning on Y does not require any rotations that large.

more

Are you all set on this question then?

( 2015-01-06 09:07:45 -0500 )edit

Yes, thanks

( 2015-01-06 20:22:58 -0500 )edit