IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.51k stars 1.74k forks source link

ROS Wrapper Not Showing Proper Node/Topics #1649

Open dlee640 opened 3 years ago

dlee640 commented 3 years ago

Hello. I have been working to enable ros-wrapper for Intel realsense D435 device on Ubuntu 18.04. I have issues with rostopic and rosnode not showing up, despite the fact that build was successful and the fact that I was able to run roslaunch realsense2_camera rs_camera.launch without errors.

Here is the overview of the problem:

Upon typing: $ roslaunch realsense2_camera rs_camera.launch, I get:

unitree@nx:~$ roslaunch realsense2_camera rs_camera.launch ... logging to /home/unitree/.ros/log/5aa94cb0-6011-11eb-ac1b-48b02d0790cc/roslaunch-nx-13423.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://nx:44581/

SUMMARY

PARAMETERS

NODES /camera/ realsense2_camera (nodelet/nodelet) realsense2_camera_manager (nodelet/nodelet)

ROS_MASTER_URI=http://localhost:11311

process[camera/realsense2_camera_manager-1]: started with pid [13438] process[camera/realsense2_camera-2]: started with pid [13439] [ INFO] [1611692136.671169014]: Initializing nodelet with 6 worker threads. [ INFO] [1611692157.210983999]: RealSense ROS v2.2.21 [ INFO] [1611692157.211182884]: Built with LibRealSense v2.40.0 [ INFO] [1611692157.211313223]: Running with LibRealSense v2.41.0

[ WARN] [1611692157.211468554]: running with a different librealsense version [ WARN] [1611692157.211531692]: than the one the wrapper was compiled with!

[ INFO] [1611692157.247221186]:
[ INFO] [1611692157.267145037]: Device with serial number 014122070971 was found.

[ INFO] [1611692157.267290320]: Device with physical ID /sys/devices/3610000.xhci/usb2/2-3/2-3.3/2-3.3:1.0/video4linux/video0 was found. [ INFO] [1611692157.267370930]: Device with name Intel RealSense D435I was found. [ INFO] [1611692157.269029176]: Device with port number 2-3.3 was found. [ INFO] [1611692157.269139066]: Device USB type: 3.2

[ INFO] [1611692157.433630215]: JSON file is not provided [ INFO] [1611692157.433805163]: ROS Node Namespace: camera [ INFO] [1611692157.433965838]: Device Name: Intel RealSense D435I [ INFO] [1611692157.434072721]: Device Serial No: 014122070971 [ INFO] [1611692157.434148850]: Device physical port: /sys/devices/3610000.xhci/usb2/2-3/2-3.3/2-3.3:1.0/video4linux/video0 [ INFO] [1611692157.434214964]: Device FW version: 05.12.10.00 [ INFO] [1611692157.434296246]: Device Product ID: 0x0B3A [ INFO] [1611692157.434355799]: Enable PointCloud: Off [ INFO] [1611692157.434412569]: Align Depth: Off [ INFO] [1611692157.434467962]: Sync Mode: Off [ INFO] [1611692157.434645982]: Device Sensors: [ INFO] [1611692157.448651136]: Stereo Module was found. [ INFO] [1611692157.477819488]: RGB Camera was found. [ INFO] [1611692157.478787574]: Motion Module was found. [ INFO] [1611692157.478947642]: (Confidence, 0) sensor isn't supported by current device! -- Skipping... [ INFO] [1611692157.479074941]: num_filters: 0 [ INFO] [1611692157.479180672]: Setting Dynamic reconfig parameters. [ WARN] [1611692157.574684279]: Param '/camera/rgb_camera/power_line_frequency' has value 3 that is not in the enum { {50Hz: 1} {60Hz: 2} {Disabled: 0} }. Removing this parameter from dynamic reconfigure options. [ INFO] [1611692157.591942084]: Done Setting Dynamic reconfig parameters. [ INFO] [1611692157.593628875]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16 [ INFO] [1611692157.595578680]: color stream is enabled - width: 640, height: 480, fps: 30, Format: RGB8

[ INFO] [1611692157.603136390]: Expected frequency for depth = 30.00000 [ INFO] [1611692157.611618633]: Expected frequency for color = 30.00000

[ INFO] [1611692157.618916722]: insert Depth to Stereo Module [ INFO] [1611692157.619074645]: insert Color to RGB Camera [ INFO] [1611692157.685289770]: SELECTED BASE:Depth, 0 [ INFO] [1611692157.711732555]: RealSense Node Is Up! [camera/realsense2_camera-2] process has finished cleanly log file: /home/unitree/.ros/log/5aa94cb0-6011-11eb-ac1b-48b02d0790cc/camera-realsense2_camera-2*.log

Weird thing is, I do not get full list of nodes and topics that I am supposed to be getting.

**unitree@nx:~$ rosnode list /camera/realsense2_camera_manager /rosout

unitree@nx:~$ rostopic list /rosout /rosout_agg**

Sometimes, I do get $ /camera/realsense2_camera and the full list of topics described on readme.md doc, but they are very temporary (only available for like 3 seconds, then they disappear)

What could be wrong? My realsense_viewer works fine, so it doesn't seem to be an issue related to camera and PC connection.

doronhi commented 3 years ago

The following line in the log: "[camera/realsense2_camera-2] process has finished cleanly" says that the node is dead, therefore, no node in the list and no topics. As for why did the node crash there are no helping messages I can see, except that it is running with LibRealSense v2.41.0 while it was built with LibRealSense v2.40.0. Please rebuild realsense2_camera to get that fixed.

MartyG-RealSense commented 3 years ago

Hi @dlee640 I second the advice of @doronhi - if librealsense is updated after the RealSense ROS wrapper has been built then the ROS wrapper should be built again after the new librealsense version has been installed.