Using Pepper's Lasers for gmapping SLAM

745 views
Skip to first unread message

K

unread,
Mar 14, 2018, 9:51:04 AM3/14/18
to ROS Sig Aldebaran
Hi all,

I am trying to test Pepper's front laser to build a map using gmapping.

rosrun gmapping slam_gmapping scan:=/laser/srd_front/scan




But I receive this Warning:

[ WARN]: Laser has to be mounted planar! Z-coordinate has to be 1 or -1, but gave: 1.00693



and the topic /map doesn't have any data. 

Please suggest what is that I am missing in this.

Regards
Kamal

HaSu

unread,
Mar 16, 2018, 6:46:40 AM3/16/18
to ROS Sig Aldebaran
Hi

I remember having the same error, but I am not entirely sure on how I fixed it anymore... however, this post might help: https://answers.ros.org/question/206258/error-laser-has-to-be-mounted-planar/

Also, I would assume that you might need to set more parameters for this to run properly, and I suggest using launch files for that.
There is a package already for navigation, move_base, mapping for pepper, which is here: https://github.com/humanrobotinteraction-plymouth/pepper_plymouth_ros
The interesting part for you would be launch/mapping.launch

We started from there aswell, and it worked by adapting a few things. My launch file that worked for me, is here https://github.com/iai-pepper/pepper_plymouth_ros/blob/master/launch/mapping.launch
maybe you can use it as a reference. (if you look through other launch files of that repo, beware, since in our case pepper has a prefix for all topics, tf and nodes, so you might want to remove that for your case..)

I hope that helps, if not, let me know.

cheers!
Hasu

K

unread,
Mar 16, 2018, 4:09:28 PM3/16/18
to ROS Sig Aldebaran
Hi Hasu,

Thanks for your reply and help. The issue was resolved when we moved Pepper for some distance.

We generated map using gmapping using Pepper's front laser but the map was really bad. I will try out the launch files you mentioned and will let you know the results.

I have one question, how do you move Pepper around to create the map? We used ALNavigation->explore() method to let it move and create a map using gmapping. Is there any better way to do this?

I have also created a single topic to merge the left, front and right lasers but the map still comes very bad. Was the accuracy of map good in your case?

Any pointers are welcome.

Thanks again.
Kamal

HaSu

unread,
Mar 16, 2018, 6:19:51 PM3/16/18
to ROS Sig Aldebaran
Hi
I didn't look that much into mapping with Pepper yet since I basically had the same results as you, that the maps were coming out pretty badly.
We move Pepper with a bluetooth ps4 controller via teleop.Doc: http://wiki.ros.org/nao_teleop original: https://github.com/ros-naoqi/nao_extras (our fork: https://github.com/iai-pepper/nao_extras/tree/master/nao_teleop) You can also use other controllers. Xbox, ps3 or logitech ones work good and are not expensive. For the ps4 one there was a lot of adapting involved and that would be a whole other topic.

I found this tool for stitching Peppers laser data together: https://github.com/iralabdisco/ira_laser_tools 
If I understood it correctly, it also takes into account the tf frames and positions of the sensors. So now we have the tree laser scanners on the same topic. Adjustments in the launch file were enough to do this. https://github.com/iai-pepper/ira_laser_tools

In my case I had a map which I recorded with a different robot which I used do far instead, since our focus was more on getting move base to run and an old map I had seemed to work so far.
So I haven't tried mapping yet with the new stitched sensor data...
There are a ton of parameters one can adjust within amcl and within gmapping. So it will be a lot of trial and error. I think setting up amcl properly is very important, since odometry depends on it. For mapping... the next thing I wanted to try was to reduce the resolution of the map. So far, I get 15 points per laser scanner, which is... not much. Makes 45 in total instead of the "usual" several hundred...
One can spend very much time on creating a map...

Another aproach wwe had with a different robot, and which worked nicely in the past, was wo drive the robot around the room, and record a bag file of the data. Avoiding unecessary rotations. Then we would playback the data into gmapping. Depending on the resolution of the laser scans, we would sometimes play it back slower then it was originaly recorded, to give gmapping more time to calculate stuff. Also with this aproach, one can tweak gmapping faster without having to drive the robot around every time.

Essentialy, it comes down to playing with the parameters. A lot. If I remember correctly, the "srr, srt" etc. parameters were important. I haven't tried it out yet to use my old gmapping file, since it was for a robot which had a laser scanner of about 200 degrees... but maybe it can help? https://github.com/suturo16/sut_tortugabot/blob/master/launch/gmapping_suturo.launch
I'll keep you posted if I make any progress on this.

Cheers!
Hasu
PS: if you directly fork any of my stuff you might need to remove the ns=group "pepper_robot" in the launch files or the "pepper_robot" prefix from some of the topics. ^^

K

unread,
Mar 21, 2018, 7:27:35 PM3/21/18
to ROS Sig Aldebaran
Thanks Hasu, I will try out your suggestions.

Thanks
Kamal

Thang Nguyen

unread,
May 29, 2018, 2:50:45 AM5/29/18
to ROS Sig Aldebaran
Hi Kamal,
As what I found in the document namely "Setting up Pepper for Autonomous Navigation and Personalized Interaction with Users", the authors are Vittorio Perera, Tiago Pereira, Jonathan Connell and Manuela Veloso. They said that:
"Even though the robot has 3 horizontal lasers measuring the distance to its surrounding obstacles, they provide very few points, which makes it impracticable to use this sensors for SLAM or localization. The lasers on Pepper are used only to avoid colliding with obstacles. Therefore, we instead use the 3D sensor to get depth images, converting them to a simulated 2D laser scan. The converted laser scan can then be used for 2D SLAM, localization and navigation. It is also possible to rotate the head to increase the field of view of the simulated laser scan. "

Hope this will help!

Regards
Frank
Vào 20:51:04 UTC+7 Thứ Tư, ngày 14 tháng 3 năm 2018, K đã viết:
Message has been deleted
Message has been deleted

Ferran

unread,
May 29, 2018, 3:37:33 AM5/29/18
to ROS Sig Aldebaran
Sometimes an image is better than hundred words:

Reply all
Reply to author
Forward
0 new messages