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

laser scan topic

asked 2018-03-17 02:55:13 -0500

EGYRos gravatar image

updated 2018-03-17 16:37:59 -0500

ahendrix gravatar image

i install ros indigo desktop full and Turtlebot2 Ubuntu Package . when i do $rostopic list i cant find /laser/scan topic . there's something like additional installation or other name of laser scan topic ?

listed topics :

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-17 13:01:12 -0500

dljubic gravatar image

updated 2018-03-18 04:11:27 -0500

Hello EGYRos,

although I am not familiar with the Turtlebot2 Ubuntu Package (maybe you are referring to the turtlebot ROS package?) and cannot find the package named turtlebot2 I would like to point out that there is a /scan topic on your list. Try:

rostopic info /scan

I am guessing you will find that messages being passed in this topic are of type sensor_msgs/LaserScan. If you look at the depthimage_to_laserscan package you will find that it publishes laser scan on topic /scan.
If you would like your laser scan to be published on another topic, you can remap it:

rosrun depthimage_to_laserscan depthimage_to_laserscan scan:=laser/scan

However, that would be a quick fix. I am guessing that /laser prefix is here because of the laser namespace and maybe it would be better practice to include is as a namespace tag in your launch file. An example of setting namespace in launch file can be found here.

Furthermore, I can see you are using RGBD camera and depthimage_to_laserscan package to obtain laser scan like measurements.
Just a heads up, depthimage_to_laserscan is a lazy subscriber meaning it won't subscribe to a camera image topic and camera info topic unless there are no subscribers to /scan topic. The easiest way to ensure that there is a subscriber is to simply visualize it in rviz.

If you have any further question, feel free to ask it.

edit flag offensive delete link more


Hello dljubic

Ya i get it , thanks a lot it is very useful.

EGYRos gravatar image EGYRos  ( 2018-03-18 16:11:58 -0500 )edit

No problem, I am glad to help! :)
Please mark the answer as correct if it solved your problem.

dljubic gravatar image dljubic  ( 2018-03-19 03:19:03 -0500 )edit

Question Tools

1 follower


Asked: 2018-03-17 02:55:13 -0500

Seen: 1,416 times

Last updated: Mar 18 '18