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

Converting ultrasound range to a Laser Scan

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

أسامة الادريسي 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

2 Answers

Sort by » oldest newest most voted
0

answered 2019-05-13 04:37:39 -0600

gvdhoorn gravatar image

updated 2019-05-13 04:37:47 -0600

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?

edit flag offensive delete link more
1

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

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

Didn't know that existed! Thanks.

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

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 -0600 )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 -0600 )edit

Question Tools

2 followers

Stats

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

Seen: 1,342 times

Last updated: May 13 '19