scan topic not providing any data

asked 2020-01-27 01:58:59 -0500

noor gravatar image

updated 2020-01-30 01:51:30 -0500

jayess gravatar image

Hi, (i have edited the post providing more detail of problem)

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


thanks all for reply. Here is the detail.

machine 1: windows 10 with MatLab 2017

machine 2 (turtlebot pc): ubuntu 14 with ROS indigo attached with TURTLEBOT 2 and ROS ASTRA PRO.

both machines can ping each other and i can see the rostopics from Matlab machine node also. I run following commands on machine 1

$ roscore
$ roslaunch turtlebot_bringup minimal.launch

i am activating my 3d sensor "orbbec astra pro" using following command

$ source devel/setup.bash
$rosrun astra_camera create_udev_rules
$roslaunch astra_launch astra_pro.launch

I was trying to run MatLab code from explore basic behaviour of turtlebot example on machine 2 . and i got MatLab error at code line laser = rossubscriber('/scan'); while I was not getting /scan topic listed on MatLab output for rostopic list also. then I executed the following command also on machine 1 and executed again Matlab code on pc2. and this time i resolved this problem and listed /scan topic also in rostopic list on Matlab output successfully.

$ roslaunch turtlebot_rviz_launchers view_navigation.launch

but now i am stuck at next line of /scan topic code line

scan = receive(laser,10)

and getting timeout error message

Error using robotics.ros.Subscriber/receive The function did not receive any data and timed out.

i even tried and checked all help on my setup from these two threads link 1 and link 2. still, i am getting same timeout error message and i am not able to run code completely for turtlebot. when i printed its scan data variable that shows no data in the variable.

Error in LaserScanWondering (line 51)
scan = receive(laser,10)
>> showdetails(scan)

  AngleMin       :  0
  AngleMax       :  0
  AngleIncrement :  0
  TimeIncrement  :  0
  ScanTime       :  0
  RangeMin       :  0
  RangeMax       :  0
  Ranges         :  []
  Intensities    :  []
    Seq     :  937437
    FrameId :  
      Sec  :  0
      Nsec :  0


when i run

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

in turtlebot machine , i get no response/output whereas i can easily get rgb, ir and depth images using rosrun commands.

I am not using any LIDAR sensor, but can I get laser scan values from /scan topic of astra pro sensor? I am not using any customized code and i have also not edited any package values used. because they are read-only, Is there a way to modify the default values also? also when i run gampping or amcl package on turtlebot machine (in simulation or with real turtlebot) then my laser scan does not match with the map and it has overlapping values.

edit retag flag offensive close merge delete



To get the obvious once out of the way...

  1. Please provide the exact commands you called to get your system up and running
  2. Have you modified any of the launch files you call, or if you custom-made them, please show them here.
  3. What kind of LiDAR do you use? Special hardware or "fake" using depthimage_to_laserscan?
  4. Have you launched the respective driver for the lidar system, if special hardware is used?

Last, but not least, and especially since indigo is long EOL: Please specify exactly which version of the relevant packages you are using, from source (branch/commit SHA) or apt (debian package number).

mgruhler gravatar image mgruhler  ( 2020-01-28 07:27:03 -0500 )edit

Related to #3 from @mgruhler . Why do you expect there to be a laser scan topic? You have specified that you have a depth camera on the device not a laser scanner.

tfoote gravatar image tfoote  ( 2020-01-28 18:04:49 -0500 )edit

@noor this is not a forum, but a Q&A page, please don't answer to provide more details, but edit your question. I've done this for you.

mgruhler gravatar image mgruhler  ( 2020-01-29 02:46:00 -0500 )edit

@noor thanks for the update.

However, you haven't answered my questions #2-#4, as well as the last one about the versions you use.

Also, the tutorial you link to specifies you should also roslaunch turtlebot_bringup 3d_sensor.launch. Have you done that? How did you launch the astra?

Also provide the ouput of env | grep ROS and env | grep TURTLEBOT

mgruhler gravatar image mgruhler  ( 2020-01-29 02:51:59 -0500 )edit

problem solved. Thanks for all your support. I have plotted the data received from /scan topic on MATLAB. 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:27:43 -0500 )edit