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](http://learn.turtlebot.com/2015/02/01/8/), 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!
↧