Dan,<br><br>Are you publishing time when you playback the bag? If not, this could be the problem. Try using the "-b" option of rosplay to publish simulation time. Stageros does this by default so that could be why things work from the bag when the simulator is up, but not otherwise.<br>
<br>Hope this helps,<br><br>Eitan<br><br><br><div class="gmail_quote">On Mon, Apr 19, 2010 at 8:35 AM, Daniel Maier <span dir="ltr"><<a href="mailto:maierd@informatik.uni-freiburg.de">maierd@informatik.uni-freiburg.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
On Mon, 19 Apr 2010 16:52:42 +0200, Brian Gerkey <<a href="mailto:gerkey@willowgarage.com">gerkey@willowgarage.com</a>><br>
wrote:<br>
<div class="im"><br>
> hi Daniel,<br>
><br>
> costmap_2d can definitely be used without stageros.  But it needs a<br>
> source of laser data and transforms.  When you comment out stageros<br>
> from your launch file, you're no longer feeding any data into the<br>
> costmap.  That's why callbacks aren't being invoked.  Laser and<br>
> transform data could come from a simulation (e.g., stageros), a<br>
> physical robot, or playback of logged data from a bag file<br>
> (<a href="http://www.ros.org/wiki/Bags" target="_blank">http://www.ros.org/wiki/Bags</a>).<br>
><br>
>       brian.<br>
<br>
</div>Hi Brian,<br>
<br>
Thanks for your answer. I think I missed to provide some information.<br>
My laser data is stored in a bag file and published by rosbag in the topic<br>
/laser.<br>
The frame_id of /laser is /Laser_frame.<br>
/odom is the odometry frame and /Base_link the first (and only) child of<br>
/odom representing the robot base.<br>
<br>
So my tf tree looks (simplified) like this:<br>
/odom-> /Base_link -> /Pantilt_link -> /Laser_frame<br>
<br>
With stageros running the costmap created by the costmap_2d_tutorial node<br>
seems to be using my laser data from the aforementioned bag file.<br>
If I outcomment stageros in the launch file, nothing happens.<br>
In both cases I am using the same costmap_params.yaml file.<br>
<br>
Any ideas?<br>
Best,<br>
Dan<br>
<div><div></div><div class="h5"><br>
<br>
><br>
> On Mon, Apr 19, 2010 at 6:28 AM, Daniel Maier<br>
> <<a href="mailto:maierd@informatik.uni-freiburg.de">maierd@informatik.uni-freiburg.de</a>> wrote:<br>
>> Hi!<br>
>><br>
>> I think about using costmap_2d in one of my projects so I played around<br>
>> with the costmap_2d_tutorials.<br>
>> Is it possible to run the costmap without stageros?<br>
>> Here is a launch file I use for bringing up a costmap:<br>
>><br>
>> <launch><br>
>>   <param name="/use_sim_time" value="true"/><br>
>>   <node pkg="costmap_2d_tutorials" type="costmap_test" respawn="false"<br>
>> name="costmap_test" output="screen"><br>
>>     <rosparam file="$(find nav)/costmap_params.yaml" command="load"<br>
>> ns="costmap" /><br>
>>   </node><br>
>>   <!--<br>
>>   <node pkg="stage" type="stageros" name="stageros" args="$(find<br>
>> 2dnav_stage)/worlds/willow-pr2-2.5cm.world" respawn="false" ><br>
>>     <param name="base_watchdog_timeout" value="0.2"/><br>
>>   </node><br>
>>   --><br>
>> </launch><br>
>><br>
>> If I include the stageros node everything works as expected (I guess).<br>
>> If I don't, the laserScanCallback in costmap_2d_ros.cpp is not being<br>
>> called.<br>
>><br>
>> Here is my costmap_params.yaml file:<br>
>><br>
>> global_frame: /odom<br>
>> robot_base_frame: Base_link<br>
>> update_frequency: 5.0<br>
>> publish_frequency: 2.0<br>
>> transform_tolerance: 0.3<br>
>> obstacle_range: 12.5<br>
>> max_obstacle_height: 1.0<br>
>> raytrace_range: 13.5<br>
>> inscribed_radius: 0.15<br>
>> circumscribed_radius: 0.29<br>
>> inflation_radius: 0.4<br>
>> observation_sources: laser<br>
>> laser:<br>
>>  data_type: LaserScan<br>
>>  expected_update_rate: 0.2<br>
>>  observation_persistence: 5.0<br>
>>  marking: true<br>
>>  clearing: true<br>
>>  max_obstacle_height: 0.9<br>
>>  min_obstacle_height: 0.08<br>
>><br>
>> static_map: false<br>
>> rolling_window: true<br>
>> width: 10.0<br>
>> height: 10.0<br>
>> resolution: 0.025<br>
>> map_type: voxel<br>
>> origin_x: 0.0<br>
>> origin_y: 0.0<br>
>> origin_z: 0.0<br>
>> z_resolution: 0.2<br>
>> z_voxels: 10<br>
>> unknown_threshold: 6<br>
>> mark_threshold: 0<br>
>> cost_scaling_factor: 10.0<br>
>> lethal_cost_threshold: 100<br>
>><br>
>><br>
>> Thanks for your help,<br>
>> Dan<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</div></div></blockquote></div><br>