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

Gmapping works in Gazebo, but not on robot

asked 2015-10-08 05:37:30 -0600

85pando gravatar image

Hello everyone,

another problem with gmapping.

When using the Gazebo simulator gmapping works fine with this command

$ rosrun gmapping slam_gmapping scan:=youbot/scan_front _base_frame:=youbot/base_link _odom_frame:=youbot/odom

As far as I understand this correcly, the arguments should be

  • scan:=scan
  • _base_link:=base_link
  • _odom_frame:=odom

which are the default values, so just starting it with $ rosrun gmapping slam_gmapping scan:=scan should work. The values were obtained from a rosrun tf view_frames (image is a link, click to expand) and rostopic list.

image description

$ rostopic list
/cmd_vel
/cmd_vel_safe
/dashboard/platform_state
/diagnostics
/hokuyo_node/parameter_descriptions
/hokuyo_node/parameter_updates
/joint_states
/map
/map_metadata
/odom
/rosout
/rosout_agg
/scan
/slam_gmapping/entropy
/tf
/tf_static

Gmapping gives with the error:

 [ WARN] [1444300130.237434289]: MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_notifier] rosconsole logger to DEBUG for more information.

which then leads me to the debug messages:

[DEBUG] [1444300178.106273471]: MessageFilter [target=odom ]: Added message in frame laser at time 1444300192.911, count now 5
[DEBUG] [1444300178.210528915]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=laser, stamp=1444300192.508830)

In Gazebo Gmapping starts up with some messages (Laser pose, values of settings,...) until Registering first Scan appears, on the actual robot there is just the warning message after a time.

I really don't know what the problem is and would be glad about any input!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-10-09 06:21:36 -0600

Not sure but on attached log I saw:

frame_id=laser

but this frame does not appear in your tf tree. I guess this is the frame id set on your scan messages but since it does not exists...

edit flag offensive delete link more

Comments

Yeah, that helped a lot. The Hokuyo node publishes on the wrong frame. For the youbot I now changed the launch file to include:

<node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_node">
  <param name="frame_id" value="/base_laser_front_link" />
</node>
85pando gravatar image 85pando  ( 2015-10-14 03:20:13 -0600 )edit
0

answered 2020-09-04 07:14:44 -0600

blubbi321 gravatar image

Since Google brought me here it might help others:

I wanted to setup a simulation with gazebo and its hokuyo laser scanner plugin. For gazebo9 (melodic) the entry for frameName is ignored and the simulated scanner will always publish to the hokuyo_link frame. So as soon as this frame is setup in TF (easiest way is to have that link in your URDF) things worked.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-10-08 05:37:30 -0600

Seen: 5,660 times

Last updated: Sep 04 '20