ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

When you got the error saying that the /velodyne frame doesn't exist, it means you haven't defined it in your URDF. Put a link in your URDF at the location of the velodyne sensor on the robot, and give it a fixed type joint. Then, your current approach should work. See below for an example.

<link name="velodyne"/>

<joint name="velodyne_to_base_link" type="fixed">
  <parent link="base_link"/>
  <child link="velodyne"/>
  <origin xyz="0 0 0" rpy="0 0 0"/>
</joint>

I'm not sure exactly how the octomap package works, but you don't normally need to transform data yourself (at least for packages like gmapping, AMCL). You can usually just feed in the raw point cloud data, with velodyne as the frame_id, and the package should transform it itself (reducing the chance you make a mistake in your own transforming). Either way, make sure the velodyne link is in the correct spot and you should be fine.