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

how to build user defined laser scan message

asked 2013-02-20 23:26:21 -0500

Xittx gravatar image

i have seen default laser scan message which is something like that <sensormsg::laserscan>. what i want is to make my own laser scan message identical to the default one. also i want to fill that laserscan message with my dumy data.

hope someone can help

edit retag flag offensive close merge delete

Comments

Why would you want to do that? It seems like a bad idea to make an identical message.

dornhege gravatar image dornhege  ( 2013-02-20 23:42:34 -0500 )edit

i,m doing this for global mapping. want to run two gmaping algo, one for robot laser scan and second for the laser scan through wifi from other robot. is there any other approach? . i hve alrdy written code of local maps alignment and merging to form a global map, jst figring out how to locliz them

Xittx gravatar image Xittx  ( 2013-02-21 02:43:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-02-21 03:12:27 -0500

dornhege gravatar image

If you just want two algorithms using lasers, there is no need to define a custom message. Instead use topic remapping to map laser scans from one source to one algorithm and laser scans from another source to the other algorithm.

edit flag offensive delete link more

Comments

can i do this with gmapping algorithms. how will i differentiate between the between laser scans running parallel. and how to fill laser scan with dummy scan?. i am new in ROS.

Xittx gravatar image Xittx  ( 2013-02-21 05:32:28 -0500 )edit

The laser scans will have different topic names. If you don't know what that means, you should follow the basic tutorials and introduction. Why would you want to fill a dummy scan?

dornhege gravatar image dornhege  ( 2013-02-21 05:59:08 -0500 )edit

yes rxgraph help me to understane ,also i have gone through tutorials. actually i,m doing this for global mapping and localization . dummy scan will be the laser scan coming from other robot through wifi. is this rite ? or i must adpt any other approach for global SLAM(two robots).

Xittx gravatar image Xittx  ( 2013-02-21 19:24:13 -0500 )edit

Well, with this approach you'll get two independent maps. Global localization can't be achieved by just ROS topic modification, you need an actual specific algorithm for that.

dornhege gravatar image dornhege  ( 2013-02-21 22:27:45 -0500 )edit

is there algorithm you know or should should i rite my own code for it. thanks

Xittx gravatar image Xittx  ( 2013-02-21 22:34:35 -0500 )edit
0

answered 2013-02-21 00:08:18 -0500

If you're ok with doing it in python, you can take a look at my code here:

http://code.google.com/p/knex-ros/source/browse/nodes/range_to_laser.py

This node controls an IR range finder on a servo and makes a laser scan out of the data. It's only about 150 lines of code, the laser scan stuff starts at line 59.

edit flag offensive delete link more

Comments

thanks Jon for responding.

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

i,m doing this for global mapping. want to run two gmaping algo, one for robot laser scan and second for the laser scan through wifi from other robot. is there any other approach? . i hve alrdy written code of local maps alignment and merging to form a global map, jst figring out how to locliz them

Xittx gravatar image Xittx  ( 2013-02-21 02:45:40 -0500 )edit

Question Tools

Stats

Asked: 2013-02-20 23:26:21 -0500

Seen: 830 times

Last updated: Feb 21 '13