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

rosrun depthimage_to_laserscan not working

asked 2020-01-30 01:27:10 -0500

noor gravatar image

I am using turtlebot 2 with astra pro sensor on ubuntu 14 with ros indigo. when i run

$rosrun depthimage_to_laserscan depthimage_to_laserscan image:=camera/depth/image_raw

i get no response or any output window, whereas i can easily get rgb, ir and depth images using rosrun commands. can anybody help if there is needed some extra configuration in order to make it work?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-30 04:34:08 -0500

marguedas gravatar image

updated 2020-01-30 08:12:36 -0500

depthimage_to_laserscan takes a depth image (sensor_msgs/Image), converts it to a Laserscan (sensor_msgs/LaserScan) and publishes it. No "output window" is created.

By default the LaserScan is published on the /scan topic. You can check it exists with rostopic list | grep "/scan"

To visualize it, the most common would be to add a LaserScan plugin in RViz and select the /scan topic.


If this doesn't answer your question, can you please edit it to provide more information:

  • What you are trying to accomplish
  • What "response or output window" you expected?
  • "i can easily get rgb, ir and depth images using rosrun commands" -> What commands are you referring to ?
  • Any useful additional information following the Support Guidelines
edit flag offensive delete link more

Comments

is it necessary to run rosrun depthimage_to_laserscan command in order to publish laser scan data? or it is by default available when ros astra is running. and how can i check the values of sensor_msgs/Image? is there any command to get this value? i want to check whether it is receiving data or not?

noor gravatar image noor  ( 2020-01-30 05:19:15 -0500 )edit

i have run this command $rostopic list | grep "/scan" and i got this message "/scan" and when i run command $rostopic echo /scan , i get following message "header: seq: 45722 stamp: secs: 1580386854 nsecs: 953619949 frame_id: camera_depth_frame angle_min: -0.51137316227 angle_max: 0.483443826437 angle_increment: 0.00155683408957 time_increment: 0.0 scan_time: 0.0329999998212 range_min: 0.449999988079 range_max: 10.0 ranges: [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, ] intensities: " is it working, i don't know.

noor gravatar image noor  ( 2020-01-30 06:28:17 -0500 )edit

is it working, i don't know.

Without any information about what your setup is, what tutorial you are following and what you are trying to accomplish it's hard to tell

Please edit your original question with more information as suggested in the answer above

marguedas gravatar image marguedas  ( 2020-01-30 08:28:10 -0500 )edit

problem solved. Thanks for all your support. I have plotted the data received from /scan topic on MATLAB. I am using it for obstacle avoidance and navigation. The main reason that i was not receiving the scan topic data for astra pro 3d sensor is that i was missing the command $rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw for astra.

noor gravatar image noor  ( 2020-01-31 02:26:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-01-30 01:27:10 -0500

Seen: 556 times

Last updated: Jan 30 '20