[ros-users] Costmap_2d_tutorials without stageros?

Daniel Maier maierd at informatik.uni-freiburg.de
Mon Apr 19 18:17:10 UTC 2010


On Mon, 19 Apr 2010 19:26:17 +0200, Tully Foote <tfoote at willowgarage.com>
wrote:

> Dan,
> I think your problem can be solved by settting the parameter  
> /use_sim_time
> to true.  This will make ros::Time::now() return simulation time as
> broadcast by the bag file or stageros or gazebo on the /clock topic,  
> instead
> of the system time.  For more info see http://www.ros.org/wiki/Clock
>
> Tully

Hi Tully,

I already set /use_sim_time in my launch file to true and "rosparam get
/use_sim_time" returns true. So this did not help.
However, this lead me to finding a stupid mistake I made:

What I have is carmen logfile I playback using the carmen module  
play_carmen.
I created a ros node (carmen_ros_proxy) which subscribes to carmen
messages and republishes them as ros messages keeping the original carmen
timestamp.
I then recorded a bag file by calling rosbag -a containing my republished
sensor readings.
However, this bagfile does only record the clock at the time I
played the messages back but not the clock at the time the messages where
originally sent (of course).
I tried playing back the carmen log file and calling the costmap node
while running carmen_ros_proxy. Now I get no warnings but also no laser
callbacks.
So I guess I need to publish the /clock message (how?) in my
carmen_ros_proxy or something like that?

Sorry for the confusion,
Dan


>
> On Mon, Apr 19, 2010 at 10:12 AM, Daniel Maier <
> maierd at informatik.uni-freiburg.de> wrote:
>
>> Hi Eitan,
>>
>> Thanks for the hint. I tried it with the -b option and now I receive the
>> following warning:
>>
>> [ WARN] 1270644364.295866960: Costmap2DROS transform timeout. Current
>> time: 1270644364.2959, global_pose stamp: 1260460808.9770, tolerance:
>> 0.3000
>>
>> which is caused by Costmap2DROS calling ros::Time::now() to check the
>> validity of the tfs.
>> I guess stageros republishes my laser messages as base_scan with a  
>> shifted
>> timestamp so the problem does not occur in this case.
>>
>> >> >> 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>



More information about the ros-users mailing list