Hi, I want to generate and publish a Costmap using a user provided map file. I am having a difficult time understand costmap_2d documentation and low level simple implementation example are scarce or not available. So my launch file looks like
<launch>
<param name="/use_sim_time" value="true"/>
<arg name="map_file" default="/home/chaos/turtlebotres/map.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<!-- Publishes the voxel grid to rviz for display -->
<node pkg="costmap_2d" type="costmap_2d_markers" name="voxel_visualizer">
<remap from="voxel_grid" to="costmap/voxel_grid"/>
</node>
<!-- Run the costmap node -->
<node name="costmap_node" pkg="costmap_2d" type="costmap_2d_node" >
<rosparam file="/home/chaos/turtlebotres/costmap2d.yaml" command="load" ns="costmap" />
</node>
</launch>
My costmap2d.yaml has following two parameters along with other
global_frame: /map
robot_base_frame: /base_footprint
I am using Turtlebot in gazebo for simulation and when I use roslaunch to launch the above launch file I am getting the following error
[ WARN] [1457141751.245245869]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.100841 timeout was 0.1.
When I check my topic list I don't have any /base_footprint topic however I have a /tf topic and it has one frame with id base_footprint. Do I need to subscribe to /tf topic and then parse out the base_footprint and republish it on /base_footprint topic.? What is going on here and how can I solve this problem?
Originally posted by nicobari on ROS Answers with karma: 86 on 2016-03-04
Post score: 3