[ros-users] Costmap_2d_tutorials without stageros?

Daniel Maier maierd at informatik.uni-freiburg.de
Mon Apr 19 15:35:03 UTC 2010


On Mon, 19 Apr 2010 16:52:42 +0200, Brian Gerkey <gerkey at willowgarage.com>  
wrote:

> hi Daniel,
>
> costmap_2d can definitely be used without stageros.  But it needs a
> source of laser data and transforms.  When you comment out stageros
> from your launch file, you're no longer feeding any data into the
> costmap.  That's why callbacks aren't being invoked.  Laser and
> transform data could come from a simulation (e.g., stageros), a
> physical robot, or playback of logged data from a bag file
> (http://www.ros.org/wiki/Bags).
>
> 	brian.

Hi Brian,

Thanks for your answer. I think I missed to provide some information.
My laser data is stored in a bag file and published by rosbag in the topic  
/laser.
The frame_id of /laser is /Laser_frame.
/odom is the odometry frame and /Base_link the first (and only) child of  
/odom representing the robot base.

So my tf tree looks (simplified) like this:
/odom-> /Base_link -> /Pantilt_link -> /Laser_frame

With stageros running the costmap created by the costmap_2d_tutorial node  
seems to be using my laser data from the aforementioned bag file.
If I outcomment stageros in the launch file, nothing happens.
In both cases I am using the same costmap_params.yaml file.

Any ideas?
Best,
Dan


>
> On Mon, Apr 19, 2010 at 6:28 AM, Daniel Maier
> <maierd at informatik.uni-freiburg.de> wrote:
>> Hi!
>>
>> I think about using costmap_2d in one of my projects so I played around
>> with the costmap_2d_tutorials.
>> Is it possible to run the costmap without stageros?
>> Here is a launch file I use for bringing up a costmap:
>>
>> <launch>
>>   <param name="/use_sim_time" value="true"/>
>>   <node pkg="costmap_2d_tutorials" type="costmap_test" respawn="false"
>> name="costmap_test" output="screen">
>>     <rosparam file="$(find nav)/costmap_params.yaml" command="load"
>> ns="costmap" />
>>   </node>
>>   <!--
>>   <node pkg="stage" type="stageros" name="stageros" args="$(find
>> 2dnav_stage)/worlds/willow-pr2-2.5cm.world" respawn="false" >
>>     <param name="base_watchdog_timeout" value="0.2"/>
>>   </node>
>>   -->
>> </launch>
>>
>> If I include the stageros node everything works as expected (I guess).
>> If I don't, the laserScanCallback in costmap_2d_ros.cpp is not being
>> called.
>>
>> Here is my costmap_params.yaml file:
>>
>> global_frame: /odom
>> robot_base_frame: Base_link
>> update_frequency: 5.0
>> publish_frequency: 2.0
>> transform_tolerance: 0.3
>> obstacle_range: 12.5
>> max_obstacle_height: 1.0
>> raytrace_range: 13.5
>> inscribed_radius: 0.15
>> circumscribed_radius: 0.29
>> inflation_radius: 0.4
>> observation_sources: laser
>> laser:
>>  data_type: LaserScan
>>  expected_update_rate: 0.2
>>  observation_persistence: 5.0
>>  marking: true
>>  clearing: true
>>  max_obstacle_height: 0.9
>>  min_obstacle_height: 0.08
>>
>> static_map: false
>> rolling_window: true
>> width: 10.0
>> height: 10.0
>> resolution: 0.025
>> map_type: voxel
>> origin_x: 0.0
>> origin_y: 0.0
>> origin_z: 0.0
>> z_resolution: 0.2
>> z_voxels: 10
>> unknown_threshold: 6
>> mark_threshold: 0
>> cost_scaling_factor: 10.0
>> lethal_cost_threshold: 100
>>
>>
>> Thanks for your help,
>> Dan



More information about the ros-users mailing list