Gmapping Launch File
At the moment we are trying to increasingly use launch files (for obvious resons).
With Gmapping in the Gazebo simulator I am somehow stuck. The mapping works fine, when I start it via rosrun as follows:
$ rosparam set use_sim_time true
$ rosrun gmapping slam_gmapping scan:=youbot/scan_front _base_frame:=youbot/base_link _odom_frame:=youbot/odom
We then tried to do the same thing in a launch file, which resulted in something like this:
<launch>
<param name="use_sim_time" value="true" />
<node pkg="gmapping" type="slam_gmapping" name="gmapping_thing" output="screen" >
<remap from="scan" to="youbot/scan_front" />
<remap from="base_link" to="youbot/base_link" />
<remap from="odom" to="youbot/odom" />
</node>
</launch>
which results in debug messages like:
Node: /gmapping_thing
Time: 01:01:51.823000000 (1970-01-01)
Severity: Debug
Published Topics: /gmapping_thing/entropy, /map, /map_metadata, /rosout, /tf
MessageFilter [target=odom ]: Added message in frame youbot/base_laser_front_link at time 111.818, count now 5
Location:
/opt/ros/indigo/include/tf/message_filter.h:MessageFilter<M>::add:280
and:
Node: /gmapping_thing
Time: 01:01:51.823000000 (1970-01-01)
Severity: Debug
Published Topics: /gmapping_thing/entropy, /map, /map_metadata, /rosout, /tf
MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=youbot/base_laser_front_link, stamp=111.806000)
Location:
/opt/ros/indigo/include/tf/message_filter.h:MessageFilter<M>::add:264
One thing I already find strange here is the date, which seems to be low unix time stamps? The actual date of the machine is:
$ date
Fri Sep 25 13:22:50 CEST 2015
After further searching we found that the remap
-tag might not be the best approach here, as the parameters can be set directly, which lead to the following launch file (it yields the same result when using _odom_frame
and _base_link
respectively):
<launch>
<param name="use_sim_time" value="true" />
<node pkg="gmapping" type="slam_gmapping" name="gmapping_thing" output="screen" >
<param name="scan" value="youbot/scan_front" />
<param name="odom_frame" value="youbot/odom" />
<param name="base_frame" value="youbot/base_link" />
</node>
</launch>
This leads to dropping of /clock
messages
Node: /gmapping_thing
Time: 01:16:09.648000000 (1970-01-01)
Severity: Debug
Published Topics: /gmapping_thing/entropy, /map, /map_metadata, /rosout, /tf
Incoming queue full for topic "/clock". Discarding oldest message (current queue size [0])
Location:
/tmp/buildd/ros-indigo-roscpp-1.11.13-0trusty-20150522-1157/src/libros/subscription_queue.cpp:SubscriptionQueue::push:67
We are kinda stuck here, so if anyone could provide some input, we would be glad.
The thing is, with the same launch file, it works on the actual robot (Kuka YouBot).