ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You're correct there is a small error in your URDF. The confusion is that there are two different coordinate frame conventions used for mobile robots and optical sensors, look at the suffix frames described in REP 103. Your lidar uses a frame where z points in the direction of the sensor, x is left and y is down. However your robot is defined using standard ROS conventions where z is up, and x faces in the same direction the robot is facing. You'll need to add a rotation to the definition of your laser_frame
to correct this.
2 | No.2 Revision |
You're correct there is a small error in your URDF. The confusion is that there are two different coordinate frame conventions used for mobile robots and optical sensors, look at the suffix frames described in REP 103. Your lidar uses a frame where z points in the direction of the sensor, x is left and y is down. However your robot is defined using standard ROS conventions where z is up, and x faces in the same direction the robot is facing. You'll need to add a rotation to the definition of your laser_frame
to correct this.
Update
You want to update the roll, pitch and yaw values provided in the following tag. I can't tell you which value without knowing more about the structure of your robot, but it will be adding or subtracting pi / 2
from one of those three values.
<joint
name="lidar_mount"
type="fixed">
<origin
xyz="0 -0.37929 0.64252"
rpy=" 0.93993 -7.9855E-17 -3.1416" />
<parent
link="base_link" />
<child
link="laser_frame" />
<axis
xyz="0 0 0" />
</joint>
Hope this helps.