ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Gmapping Launch File

asked 2015-09-25 07:16:09 -0500

85pando gravatar image

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.

edit retag flag offensive close merge delete

Comments

The thing is, with the same launch file, it works on the actual robot (Kuka YouBot).

85pando gravatar image 85pando  ( 2015-10-14 03:23:48 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-02-24 18:11:11 -0500

AstroUKN gravatar image

Hi ! It's been a while since you asked your question !

I've the same problem here... Did you manage to solve it ?

Thanks for your answer !

edit flag offensive delete link more

Comments

Hi, sorry for the late answer. No the problem was never really solved in our setup. We switched to the actual robot shortly after so no further effort was put into this.

85pando gravatar image 85pando  ( 2020-04-03 12:48:32 -0500 )edit
0

answered 2017-06-07 17:58:27 -0500

northfork gravatar image

updated 2017-06-07 18:11:07 -0500

For anyone with similar issue:
Use this file as a reference: jackal gmapping launch file.

In this case launching the gmapping node should look like this.

<node pkg="gmapping" type="slam_gmapping" name="gmapping_thing" output="screen" >
  <remap from="scan" to="youbot/scan_front" />
  <param name="odom_frame" value="youbot/odom" />
  <param name="base_frame" value="youbot/base_link" />
</node>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-09-25 07:16:09 -0500

Seen: 9,601 times

Last updated: Jun 07 '17