Ask Your Question
0

Converting ultrasound range to a Laser Scan

asked 2017-06-27 14:24:29 -0500

أسامة الادريسي gravatar image

In my end of studies project, I have to make a robot that should do mapping and localization using only ultrasounds sensor. So for doing this i should convert sensor_msgs/LaserScan message to sensor_msgs/Range message.

My question: How can i do this ??

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-05-13 04:29:00 -0500

Veera Ragav gravatar image

You should be knowing the angle(bearing) where your ultrasound sensors are positioned. Say you have 4 sensors placed in a circular fashion with a relative angular displacement of 90 degrees. You can use the above data to manipulate the fields in sensor_msgs/LaserScan. Append the range measured in the 'range' field. In this case the 'angle_increment' is 1.57 radians.

If you already have a map, and want incorporate your sensor_msgs/Range in move_base, modify the existing obstacle_layer plugin to subscribe to a topic with message type sensor_msgs/Range instead of sensor_msgs/LaserScan.

edit flag offensive delete link more

Comments

If you already have a map, and want incorporate your sensor_msgs/Range in move_base, modify the existing obstacle_layer plugin to subscribe to a topic with message type sensor_msgs/Range instead of sensor_msgs/LaserScan.

Any reason to not just use range_sensor_layer?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-13 04:37:39 -0500 )edit

Didn't know that existed! Thanks.

Veera Ragav gravatar image Veera Ragav  ( 2019-05-13 04:57:47 -0500 )edit

I would in general refrain from suggesting users to edit files in released packages, unless there is a very good reason to do so.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-13 05:16:54 -0500 )edit

I agree with you. Since the costmap layers are plugins, one may hack an existing layer plugin and name it whatever they would like to. That's why I suggested that.

Veera Ragav gravatar image Veera Ragav  ( 2019-05-13 05:22:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-06-27 14:24:29 -0500

Seen: 378 times

Last updated: May 13 '19