scan topic not providing any data
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.
Edit
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 : []
Header
Seq : 937437
FrameId :
Stamp
Sec : 0
Nsec : 0
edited
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.
Asked by noor on 2020-01-27 02:58:59 UTC
Comments
To get the obvious once out of the way...
depthimage_to_laserscan
?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).
Asked by mgruhler on 2020-01-28 08:27:03 UTC
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.
Asked by tfoote on 2020-01-28 19:04:49 UTC
@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.
Asked by mgruhler on 2020-01-29 03:46:00 UTC
@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
andenv | grep TURTLEBOT
Asked by mgruhler on 2020-01-29 03:51:59 UTC
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.
Asked by noor on 2020-01-31 03:27:43 UTC