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

gmapping with user defined laser scan and position data

asked 2013-02-19 02:42:51 -0500

Xittx gravatar image

updated 2013-02-19 19:36:37 -0500

actually i want each robot to build two local maps , one which is build by its own laser scan and position while the other map from the laser scan and position achieved by other robot through wifi. now what i think , this require two gmapping algorithm having different laser messages . am i rite? is this a rite approach for global mapping? . i,m doing this for global mapping. if yes , how to modify gmapping algorithem for different laser message and position data.

thankyou

edit retag flag offensive close merge delete

Comments

actually i want each robot to build two local maps , one which is build by its own laser scan and position while the other map from the laser scan and position achieved by other robot through wifi. now what i think , this require two gmapping algorithm having different laser messages . am i rite?

Xittx gravatar image Xittx  ( 2013-02-19 05:48:44 -0500 )edit

yes, for that you have to run two gmapping algorithms. The stuff with the frame_ids, that shade explained, is important here, too. The result of the two gmapping algorithms will be two maps, which are not aligned, though...

Achim gravatar image Achim  ( 2013-02-19 20:46:34 -0500 )edit

thanks Achim for the response . can you tell me how to do this i have no idea of this. all i want to make user defined laser message and modify gmapping with this messag.

Xittx gravatar image Xittx  ( 2013-02-20 03:10:45 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2013-02-19 03:36:58 -0500

Multiple laser message can be published but u have to make sure that they have different namespace. By default the topic name is for laser scan is "scan". You can prefix it with robot namespace like "/robot0/scan" and "/robot1/scan". Secondly for each laser scan the frame_id should be defined correctly w.r.t to respective robots. Gmapping most probably does not support laser scan from multiple sources so, if you want to build a map with multiple scan either you can write your own mapping algorithm or transform messages from one frame_id to other and then publish scan message on 1 single topic only.

Hope it helps..

edit flag offensive delete link more

Comments

thanks for help shade. can you tell me how to change topic name and modify gmapping for it.

Xittx gravatar image Xittx  ( 2013-02-20 03:38:34 -0500 )edit
2

answered 2013-02-19 03:19:10 -0500

Achim gravatar image

updated 2013-02-19 03:22:47 -0500

I'm not sure what you try to achieve. Build one single map from two laser scanners? I don't think that gmapping node in ros can handle that (look here for example: http://answers.ros.org/question/28514/multiple-robots-with-slam_gmapping/ ). So you would need to write a new node with a different mapping approach anyway.. in that node you can then register to multiple laser_scan topics, easily. :)

Otherwise, if you just want to use the cpu-power of a different computer to process the laserscans from the robot (which has only a slow cpu, maybe), you can adjust the ROS_MASTER_URI on one of the computers and run only one master. Then the setup is just the normal setup, i.e. remap the laser topic on which the driver of the laserscanner publishes so that gmapping listens to it and so on...

As an alternative to the ROS_MASTER_URI you can try http://www.ros.org/wiki/master_sync_fkie, best in combination with node_manager_fkie (there you only need to press one button to enable the sync).

edit flag offensive delete link more
0

answered 2013-11-27 12:00:44 -0500

According to the final comment in this thread, Using multiple laser scanners, slam_gmapping should work with multiple lasers as long as you publish them both to the same topic. Gmapping takes care of the transforms itself.

edit flag offensive delete link more

Comments

This will most likely not work. Laser parameters in GMapping are determined from the first received message. After that it will always use that frame, scan-count, angle increments etc... So no, using GMapping with multiple laser scanners is impossible or at least extremly difficult.

Ben_S gravatar image Ben_S  ( 2013-11-27 23:38:17 -0500 )edit

Question Tools

Stats

Asked: 2013-02-19 02:42:51 -0500

Seen: 1,103 times

Last updated: Nov 27 '13