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

Map not built in slam_gmapping

asked 2015-01-29 04:31:30 -0500

RND gravatar image

updated 2015-02-07 02:59:04 -0500

Hi,

I am trying to build a map using slam_gmapping. My platform is ActivMedia MobileRobots Powerbot equipped with sonar sensors and SICKLMS laser range finder. I am using the ROSARIA package to interact with the robot and to get the odometry data. Then I am using sicktoolbox_wrapper package in order to interface with the laser range finder. I have tested each node separately to make sure that the data I want is being published over the respective topics. I tested this with ROSARIA by running rostopic echo /RosAria/pose and also by writing code to subscribe to that topic. Similarly I ran rostopic echo scan to see that the laser range finder is really working and I can see the data being streamed. I also tried to visualize it on rviz but I got an error saying that the frame [laser] does not exist. I don't know how to fix this but since I saw the data being publish over rostopic I assumed that the laser scanner was set up and ready to be used.

So I followed this tutorial and built a bag by moving my robot around the room. The bag was created "successfully" since no errors had been given. At this point I wanted to verify that all the nodes were running appropriately and the right publishing and subcribing was being made. So I ran rqt_graph and got this: C:\fakepath\setup rqt.png. From what I know of ROS, everything is set up according to the tutorial, having the slam_gmapping node being subscribed to both /scan and /tf (this is the only difference from the tutorial: in the tutorial base_scan was used while my topic from sicktoolbox_wrapper was just scan).

I thought that having all this set up would result in a successful build of the map. However, when I ran gmapping and replayed the bag that I had recorded I got this error:

Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 1.42253e+09 according to authority /play_1422525800501358444
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
         at line 260 in /tmp/buildd/ros-hydro-tf2-0.4.12-0precise-20141016-1214/src/buffer_core.cpp

When the bag stopped replaying and I attempted to save the map, no map was saved and it just kept "Waiting for map". Also, during the process of 'building' the map, I tried to visualize it on rviz but again, I got a warning message telling me "Map is not found".

Can anyone help me identify the fault and explain what is going on? Thanks!

EDIT

From what I can see from this rqt_graph C:\fakepathslam_gmapping.png is that the node slam_gmapping is publishing on the topic /map. I have added a Map on rviz and set its topic to /map but in the Status I'm getting a Warning saying: No Map Received. C:\fakepath\Rviz Slam_gmapping.pngHow is this possible?

EDIT

I run the sicktoolbox_wrapper node as follows:

rosrun sicktoolbox_wrapper sicklms _port:=/dev/ttyS1 _baud ...
(more)
edit retag flag offensive close merge delete

Comments

the most likely reason is that your tf is not defined and connected to the base_laser_link. Can you check your tf tree for connection between the base_link with your laser sensor. Because the link is not published you are not able to see the laser data and also the map.

AlexR gravatar image AlexR  ( 2015-02-05 11:56:52 -0500 )edit

Hi Alex,

I am using this transform code (see this link) and I have seen the following tf frames (see frames.pdf.

RND gravatar image RND  ( 2015-02-06 10:47:00 -0500 )edit

The problem I'm facing now is that I can, technically, see a map being built. BUT the laser readings are seen jumping around on the grid in rviz, thus creating duplicates of the same mapped area. Do I have something wrong in my tf configuration?

RND gravatar image RND  ( 2015-02-06 10:48:29 -0500 )edit

Can you update your question with the launch files you are using for both the sicklaser and rosaria launch. I am guessing problem with your tf. What do you get when you change the fixed frame in rviz to laser frame. Do you still see jumping?

AlexR gravatar image AlexR  ( 2015-02-06 22:19:07 -0500 )edit

No, when the fixed frame in rviz is set to laser, I don't see any jumping. The jumping around of laser readings only happens when I run the tf broadcaster node (see link of transform.cpp in above comments). I'm not using any launch files for sicklaser and rosaria. I'll write how I run the nodes.

RND gravatar image RND  ( 2015-02-07 02:55:33 -0500 )edit

This is what I mean by jumping around of laser readings: laser jumps

and this is the "duplicated map" that is produced as a result: duplicate map

RND gravatar image RND  ( 2015-02-07 08:10:44 -0500 )edit

Can you share the bag file?

AlexR gravatar image AlexR  ( 2015-02-08 03:06:30 -0500 )edit

I was not recording bag files because I was running it and building the map in real-time...does that make a difference? The slam_gmapping algorithm can be run in real time, right? In any case I will record and share a bag file of the readings maybe you can help me identify what's wrong.

RND gravatar image RND  ( 2015-02-11 02:39:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-30 06:54:48 -0500

RoSSy gravatar image

Hi I have the same problem as described in your question: In Rviz it says :" no map received". Did you solve your problem. Would you tell how did you do please. Best regards

edit flag offensive delete link more

Comments

Do you have a transform running between the laser and base_link? I had that missing and after I implemented it, it worked. You can check your transform tree by running rosrun tf view_frames.

RND gravatar image RND  ( 2015-06-01 02:36:21 -0500 )edit

This answer should have been a comment to the question. Why is this marked as correct?

jayess gravatar image jayess  ( 2017-03-16 15:04:17 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-29 04:31:30 -0500

Seen: 1,906 times

Last updated: Feb 07 '15