Edit: Thanks to @gvdhoorn for the input - I think that it's confirming what I seem to be finding out. By simply running the Astra drivers in place of the OpenNI2 drivers, I'm able to see the images from the Turtlebot as explained in the tutorial. I think that, with the new sensor, I simply have to use the Orbec drivers rather than the OpenNI drivers.
The problem now becomes that, once I get to the point in the tutorial that I'm using roslaunch turtlebot_bringup 3dsensor.launch
on the Turtlebot and roslaunch turtlebot_rviz_launchers view_robot.launch
on the workstation, the frames are not correctly configured to work with everything else. Here's what I've done so far to try to address the configuration issue:
3dsensor.launch
appears to use theTURTLEBOT_3D_SENSOR
environment variable to get the appropriate launch.xml file, so I don't think that there are any changes necessary here. However, there are a number of variables that get re-mapped here that I think may be relevant to getting what the Astra driver outputs to match up to what the Turtlebot looks for.- In
/opt/ros/indigo/share/turtlebot_bringup/launch/includes/3dsensor
, I copiedkinect.launch.xml
toastra.launch.xml
, the only difference between the files being that the include portion points toastra_launch/launch/astra.launch
rather thanfreenect_launch/launch/freenect.launch
. If I understand correctly, this configures the system to use the launch file from the Astra driver when the3dsensor.launch
file is used to start the 3d sensor system on the turtlebot. - I notice that the freenect package appears to have a file that points to
kinect_frames.launch
in the rgbd_launch project, which looks like it defines transforms for the camera. Simply making a copy of that file over to the astra_launch project and linking it to theastra.launch
file doesn't appear to fix the problem. I'm still getting an error in rviz saying that camera_rgb_optical_frame does not exist. Since this frame is defined by what is nowastra_frames.launch
, I'm guessing that this reference frame has to match an existing reference frame in the overall robot model to link the two? Because camera_rgb_optical_frame is not an option in the Global Options->Fixed Frame or the Grid->Reference Frame
I think that I need to look for some kind of tutorial on reference frames to better understand what is going on here and how I might be able to resolve it. Again, any help is appreciated. Thanks!
I'm working my way through the Turtlebot tutorials (http://learn.turtlebot.com/2015/02/01/8/), and I'm currently at the stage where I'm testing the 3D sensor. I'm running into a few problems since the Turtlebot that I purchased came with ROS installed on the laptop, but apparently not correctly configured. The sensor that came included is the Orbec Astra, which I had to go out separately to find drivers and such for. I can give that history if it's relevant, but given the symptoms I'm thinking that there is just some configuration subtlety that I'm missing.
Configuration
I'm working with a Turtlebot 2 using a Lenovo Thinkpad running Ubuntu 14.04 with ROS Indigo.
What Works
As a part of testing the Orbec Astra driver that I installed, I can run the following command successfully:
roslaunch astra_launch astra.launch
This produces the following output:
turtlebot@turtlebot:~/catkin_ws$ roslaunch astra_launch astra.launch ... logging to /home/turtlebot/.ros/log/862942be-1e5a-11e9-b052-7c7a9105e52e/roslaunch-turtlebot-19111.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://localhost:53104/ SUMMARY ======== PARAMETERS * /camera/camera_nodelet_manager/num_worker_threads: 4 * /camera/depth_rectify_depth/interpolation: 0 * /camera/driver/auto_exposure: True * /camera/driver/auto_white_balance: True * /camera/driver/bootorder: 0 * /camera/driver/color_depth_synchronization: False * /camera/driver/depth_camera_info_url: * /camera/driver/depth_frame_id: camera_depth_opti... * /camera/driver/depth_registration: False * /camera/driver/device_id: #1 * /camera/driver/devnums: 1 * /camera/driver/rgb_camera_info_url: * /camera/driver/rgb_frame_id: camera_rgb_optica... * /rosdistro: indigo * /rosversion: 1.11.10 NODES /camera/ camera_nodelet_manager (nodelet/nodelet) depth_metric (nodelet/nodelet) depth_metric_rect (nodelet/nodelet) depth_points (nodelet/nodelet) depth_rectify_depth (nodelet/nodelet) driver (nodelet/nodelet) points_xyzrgb_sw_registered (nodelet/nodelet) rectify_color (nodelet/nodelet) register_depth_rgb (nodelet/nodelet) / camera_base_link (tf/static_transform_publisher) camera_base_link1 (tf/static_transform_publisher) camera_base_link2 (tf/static_transform_publisher) camera_base_link3 (tf/static_transform_publisher) auto-starting new master process[master]: started with pid [19123] ROS_MASTER_URI=http://localhost:11311 setting /run_id to 862942be-1e5a-11e9-b052-7c7a9105e52e process[rosout-1]: started with pid [19136] started core service [/rosout] process[camera/camera_nodelet_manager-2]: started with pid [19153] process[camera/driver-3]: started with pid [19154] [ INFO] [1548170976.456609336]: Initializing nodelet with 4 worker threads. process[camera/rectify_color-4]: started with pid [19190] process[camera/depth_rectify_depth-5]: started with pid [19204] [ INFO] [1548170976.548044840]: Device "2bc5/0401@2/4" found. Warning: USB events thread - failed to set priority. This might cause loss of data... process[camera/depth_metric_rect-6]: started with pid [19234] process[camera/depth_metric-7]: started with pid [19289] process[camera/depth_points-8]: started with pid [19317] process[camera/register_depth_rgb-9]: started with pid [19331] process[camera/points_xyzrgb_sw_registered-10]: started with pid [19345] process[camera_base_link-11]: started with pid [19359] process[camera_base_link1-12]: started with pid [19372] process[camera_base_link2-13]: started with pid [19383] process[camera_base_link3-14]: started with pid [19410]
With this running, I can go into rviz, add topic /camera/depth/points/PointCloud2, set the Fixed Frame, and I can see the point cloud displayed in the grid. My understanding is that this indicates that the driver is installed correctly.
What Doesn't Work
According to the Turtlebot tutorial, the next step in verifying the depth sensor is to test it using the OpenNI package. Per the instructions, I bring up the Turtlebot in the minimal configuration and then run with openni. I've tried both versions available on my system: openni and openni2, the latter of which was installed trying to get the Astra camera working in the first place. Here's the output that I'm seeing:
turtlebot@turtlebot:~$ roslaunch openni_launch openni.launch > ... logging to /home/turtlebot/.ros/log/33ff7e72-1e5f-11e9-86f8-7c7a9105e52e/roslaunch-turtlebot-28502.log > Checking log directory for disk usage. This may take awhile. > Press Ctrl-C to interrupt > Done checking log file disk usage. Usage is <1GB. > > unused args [depth_registered_filtered] for include of [/opt/ros/indigo/share/rgbd_launch/launch/includes/processing.launch.xml] > The traceback for the exception was written to the log file > turtlebot@turtlebot:~$ roslaunch openni2_launch openni2.launch ... logging to /home/turtlebot/.ros/log/33ff7e72-1e5f-11e9-86f8-7c7a9105e52e/roslaunch-turtlebot-28609.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://localhost:47625/ SUMMARY ======== PARAMETERS * /camera/camera_nodelet_manager/num_worker_threads: 4 * /camera/depth_rectify_depth/interpolation: 0 * /camera/driver/auto_exposure: True * /camera/driver/auto_white_balance: True * /camera/driver/color_depth_synchronization: False * /camera/driver/depth_camera_info_url: * /camera/driver/depth_frame_id: camera_depth_opti... * /camera/driver/depth_registration: False * /camera/driver/device_id: #1 * /camera/driver/rgb_camera_info_url: * /camera/driver/rgb_frame_id: camera_rgb_optica... * /rosdistro: indigo * /rosversion: 1.11.10 NODES /camera/ camera_nodelet_manager (nodelet/nodelet) depth_metric (nodelet/nodelet) depth_metric_rect (nodelet/nodelet) depth_points (nodelet/nodelet) depth_rectify_depth (nodelet/nodelet) driver (nodelet/nodelet) points_xyzrgb_sw_registered (nodelet/nodelet) rectify_color (nodelet/nodelet) register_depth_rgb (nodelet/nodelet) / camera_base_link (tf/static_transform_publisher) camera_base_link1 (tf/static_transform_publisher) camera_base_link2 (tf/static_transform_publisher) camera_base_link3 (tf/static_transform_publisher) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[camera/camera_nodelet_manager-1]: started with pid [28628] process[camera/driver-2]: started with pid [28636] [ INFO] [1548173016.697688262]: Initializing nodelet with 4 worker threads. process[camera/rectify_color-3]: started with pid [28667] process[camera/depth_rectify_depth-4]: started with pid [28682] [ INFO] [1548173016.819368063]: No matching device found.... waiting for devices. Reason: std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/buildd/ros-indigo-openni2-camera-0.2.3-0trusty-20150327-0611/src/openni2_driver.cpp @ 623 : Invalid device number 1, there are 0 devices connected. process[camera/depth_metric_rect-5]: started with pid [28710] process[camera/depth_metric-6]: started with pid [28725] process[camera/depth_points-7]: started with pid [28742] process[camera/register_depth_rgb-8]: started with pid [28757] process[camera/points_xyzrgb_sw_registered-9]: started with pid [28772] process[camera_base_link-10]: started with pid [28787] process[camera_base_link1-11]: started with pid [28799] process[camera_base_link2-12]: started with pid [28811] process[camera_base_link3-13]: started with pid [28823] [ INFO] [1548173019.819603347]: No matching device found.... waiting for devices. Reason: std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/buildd/ros-indigo-openni2-camera-0.2.3-0trusty-20150327-0611/src/openni2_driver.cpp @ 623 : Invalid device number 1, there are 0 devices connected. [ INFO] [1548173022.819789168]: No matching device found.... waiting for devices. Reason: std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/buildd/ros-indigo-openni2-camera-0.2.3-0trusty-20150327-0611/src/openni2_driver.cpp @ 623 : Invalid device number 1, there are 0 devices connected.
This looks to me like the OpenNI2 driver doesn't know the right port or the right configuration for the Astra camera, but I'm not sure where that would be defined that I could fix it. My plan at the moment is to look at the difference between the astra.launch and openni2.launch files to see if I can see where the ports are defined. I'm also planning to look at the URDF file, since I copied that from the Kinect and I think that the two connect differently. I'm posting this here both for help and so that I can document any solution I find in case anyone else runs into the same problem. Help is very much appreciated!
Originally posted by teddybouch on ROS Answers with karma: 320 on 2019-01-22
Post score: 0
Original comments
Comment by gvdhoorn on 2019-01-22:
I'm not an expert on this topic, so take this as additional input, but: I believe the tutorial you link to assumes a "regular" TB2 (ie: old one) that came with either a Kinect or an Xtion.
After those became (very) hard to purchase, a switch was made to the Astra. I'm not sure OpenNI ..
Comment by gvdhoorn on 2019-01-22:
.. stuff can be used with that camera, but again, I'm not an expert.
The driver (most likely) doesn't care about the URDF. What would be important would be for the respective topics to exist after you've launched the driver. Seeing as you can see a pointcloud in RViz, I would say they are, and ..
Comment by gvdhoorn on 2019-01-22:
.. you should be able to continue from there.
I'm not sure what the status of the Astra integration into the TB2 pkgs is. I've never used/needed it, as I only have old TB2s here, with Kinects.