Using realsense-ros wrapper with D555 over Ethernet
Hello,
I am using a D555 camera on Linux with Realsense SDK version 2.58.1, Ros jazzy, and realsense-ros 4.58.1.
I can detect the camera via rs-enumerate-devices. But when I try to launch the wrapper via
`ros2 launch realsense2_camera rs_launch.py` the camera cannot be detected.
I intend to change the stream profiles and camera namespace via the wrapper. It seems it should work according to this issue: https://github.com/realsenseai/librealsense/issues/14284#issuecomment-3346940205
I'd be very thankful for any idea on what might prevent the discovery of the device. If the wrapper is not meant to be used for DDS devices, then how can I change the stream profile and activate the transmission of data over Ros topics?
This is the current output:
```
$ ros2 launch realsense2_camera rs_launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2026-05-06-23-00-06-336681-user-ubuntu-tower-166965
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [launch.user]: 🚀 Launching as Normal ROS Node
[INFO] [realsense2_camera_node-1]: process started with pid [166969]
[realsense2_camera_node-1] [INFO] [1778101206.533139818] [camera.camera]: RealSense ROS v4.58.1
[realsense2_camera_node-1] [INFO] [1778101206.533249929] [camera.camera]: Built with LibRealSense v2.58.1
[realsense2_camera_node-1] [INFO] [1778101206.533264602] [camera.camera]: Running with LibRealSense v2.58.1
[realsense2_camera_node-1] 06/05 23:00:06,533 DEBUG [129198147581632] (context.cpp:60) Librealsense VERSION: 2.58.1.0
[realsense2_camera_node-1] 06/05 23:00:06,534 DEBUG [129198147581632] (context.cpp:36) Loading configuration file from: /home/user/.realsense-config.json
[realsense2_camera_node-1] 06/05 23:00:06,534 DEBUG [129198147581632] (context.cpp:48) Loaded context configuration: {
[realsense2_camera_node-1] "dds": {
[realsense2_camera_node-1] "domain": 0,
[realsense2_camera_node-1] "enabled": true
[realsense2_camera_node-1] }
[realsense2_camera_node-1] }
[realsense2_camera_node-1] 06/05 23:00:06,535 DEBUG [129198147581632] (context-libusb.cpp:19) Attempting libusb_init (attempt 1/10)...
[realsense2_camera_node-1] 06/05 23:00:06,542 INFO [129198147581632] (context-libusb.cpp:25) Found 10 USB devices
[realsense2_camera_node-1] 06/05 23:00:06,545 DEBUG [129197875898048] (network-adapter-watcher.cpp:117) starting network adapter watcher
[realsense2_camera_node-1] 06/05 23:00:06,545 DEBUG [129198147581632] (dds-network-adapter-watcher.cpp:102) +adapter 192.168.11.70
[realsense2_camera_node-1] 06/05 23:00:06,545 DEBUG [129198147581632] (dds-network-adapter-watcher.cpp:102) +adapter 192.168.178.21
[realsense2_camera_node-1] 06/05 23:00:06,546 DEBUG [129198147581632] (dds-participant.cpp:268) participant 1e31398cee9d.0.1c1 'realsense2_came'
[realsense2_camera_node-1] flow-controllers
[realsense2_camera_node-1] 'dfu' FIFO 376320 bytes every 250 ms
[realsense2_camera_node-1] allocation
[realsense2_camera_node-1] locators
[realsense2_camera_node-1] max-unicast-locators 10*
[realsense2_camera_node-1] max-multicast-locators 1
[realsense2_camera_node-1] transport
[realsense2_camera_node-1] udp
[realsense2_camera_node-1] max-initial-peers-range 4
[realsense2_camera_node-1] max-message-size 65500
[realsense2_camera_node-1] use-builtin-transports 0*
[realsense2_camera_node-1] listen-socket-buffer-size 0
[realsense2_camera_node-1] send-socket-buffer-size 0
[realsense2_camera_node-1] wire-protocol
[realsense2_camera_node-1] participant-id -1
[realsense2_camera_node-1] builtin
[realsense2_camera_node-1] discovery-config
[realsense2_camera_node-1] lease-duration 3.0*
[realsense2_camera_node-1] announcement-period 1.5*
[realsense2_camera_node-1] avoid-builtin-multicast 1
[realsense2_camera_node-1] properties
[realsense2_camera_node-1] fastdds.max_message_size 1470
[realsense2_camera_node-1] is up on domain 0 from settings: {
[realsense2_camera_node-1] "domain": 0,
[realsense2_camera_node-1] "enabled": true
[realsense2_camera_node-1] }
[realsense2_camera_node-1] 06/05 23:00:06,546 DEBUG [129197909468864] (dds-participant.cpp:118) realsense2_came: +participant '/.1' 1e31398ceb21.0
[realsense2_camera_node-1] 06/05 23:00:06,548 DEBUG [129198147581632] (dds-participant.cpp:165) realsense2_came: +reader (.104) of 'realsense/device-info' [ realdds::topics::raw::flexible reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,549 DEBUG [129198147581632] (dds-device-watcher.cpp:170) DDS device watcher started on 'realsense2_came' 1e31398cee9d.0
[realsense2_camera_node-1] 06/05 23:00:06,549 INFO [129198147581632] (backend-v4l2.cpp:809) Cannot access /sys/class/d4xx-class
[realsense2_camera_node-1] 06/05 23:00:06,549 DEBUG [129198147581632] (context-libusb.cpp:19) Attempting libusb_init (attempt 1/10)...
[realsense2_camera_node-1] 06/05 23:00:06,556 INFO [129198147581632] (context-libusb.cpp:25) Found 10 USB devices
[realsense2_camera_node-1] 06/05 23:00:06,557 DEBUG [129198147581632] (rsdds-device-factory.cpp:230) waiting 3-5 seconds for devices on domain 0 ...
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.103) publishing 'ros_discovery_info' [ rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_ reliable transient-local ]
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.303) publishing 'rt/rosout' [ rcl_interfaces::msg::dds_::Log_ reliable transient-local ]
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.503) publishing 'rr/camera/camera/get_parametersReply' [ rcl_interfaces::srv::dds_::GetParameters_Response_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.703) publishing 'rr/camera/camera/get_parameter_typesReply' [ rcl_interfaces::srv::dds_::GetParameterTypes_Response_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.903) publishing 'rr/camera/camera/set_parametersReply' [ rcl_interfaces::srv::dds_::SetParameters_Response_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.b03) publishing 'rr/camera/camera/set_parameters_atomicallyReply' [ rcl_interfaces::srv::dds_::SetParametersAtomically_Response_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.d03) publishing 'rr/camera/camera/describe_parametersReply' [ rcl_interfaces::srv::dds_::DescribeParameters_Response_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,628 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.f03) publishing 'rr/camera/camera/list_parametersReply' [ rcl_interfaces::srv::dds_::ListParameters_Response_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,629 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.1003) publishing 'rt/parameter_events' [ rcl_interfaces::msg::dds_::ParameterEvent_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,629 DEBUG [129197909468864] (dds-participant.cpp:145) realsense2_came: +writer (/.1.1303) publishing 'rr/camera/camera/get_type_descriptionReply' [ type_description_interfaces::srv::dds_::GetTypeDescription_Response_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,647 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.204) of 'ros_discovery_info' [ rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_ reliable transient-local ]
[realsense2_camera_node-1] 06/05 23:00:06,647 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.404) of 'rq/camera/camera/get_parametersRequest' [ rcl_interfaces::srv::dds_::GetParameters_Request_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,647 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.604) of 'rq/camera/camera/get_parameter_typesRequest' [ rcl_interfaces::srv::dds_::GetParameterTypes_Request_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,647 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.804) of 'rq/camera/camera/set_parametersRequest' [ rcl_interfaces::srv::dds_::SetParameters_Request_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,647 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.a04) of 'rq/camera/camera/set_parameters_atomicallyRequest' [ rcl_interfaces::srv::dds_::SetParametersAtomically_Request_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,648 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.c04) of 'rq/camera/camera/describe_parametersRequest' [ rcl_interfaces::srv::dds_::DescribeParameters_Request_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,648 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.e04) of 'rq/camera/camera/list_parametersRequest' [ rcl_interfaces::srv::dds_::ListParameters_Request_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,648 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.1104) of 'rt/parameter_events' [ rcl_interfaces::msg::dds_::ParameterEvent_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:06,648 DEBUG [129197909468864] (dds-participant.cpp:165) realsense2_came: +reader (/.1.1204) of 'rq/camera/camera/get_type_descriptionRequest' [ type_description_interfaces::srv::dds_::GetTypeDescription_Request_ reliable ]
[realsense2_camera_node-1] 06/05 23:00:09,557 DEBUG [129198147581632] (rsdds-device-factory.cpp:249) query_devices wait stopped with 2 seconds left
[realsense2_camera_node-1] 06/05 23:00:09,557 DEBUG [129198147581632] (context.cpp:144) Found 0 RealSense devices (0xfe requested & 0xff from device-mask in settings)
[realsense2_camera_node-1] [WARN] [1778101209.557893129] [camera.camera]: No RealSense devices were found!
```
-
Hi Niklas Schlueter Launching the ROS2 wrapper in D555's DDS ethernet mode is supported. If your camera has firmware driver. I note though that you are using librealsense and wrapper versions that are newer than the current latest master releases, which at the time of writing this are librealsense 2.57.7 and wrapper 4.57.6. Did you build your .58.1 versions using the /r branches below, please?
https://github.com/realsenseai/librealsense/tree/r/2.58.1
https://github.com/realsenseai/realsense-ros/tree/r/4.58.1
I would first recommend testing whether ROS topics are accessible at all on your D555 by using ros2 topic list without launching the rs_launch.py wrapper. The camera should be able to publish a small list of DDS topics without the wrapper being active that resembles the list below.
/parameter_events /realsense/D555_342622302478_Color /realsense/D555_342622302478_Depth /realsense/D555_342622302478_Infrared_1 /realsense/D555_342622302478_Infrared_2 /realsense/D555_342622302478_Motion /rosout -
Hello,
Thanks for the quick reply. Actually, after restarting my computer and camera it magically started working. The wrapper ran successfully and I can also see the standard DDS topics you have mentioned.
Regarding your question: Yes, I used the r/ branches to build the sdk and wrapper myself as I though there might be an issue with the version that you can install via apt.
To make sure the issue still exists I have also tried it on the version installed through the tutorials (SDK) https://github.com/realsenseai/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages and (wrapper) https://github.com/realsenseai/realsense-ros#option-1-install-debian-package-from-ros-servers-foxy-eol-distro-is-not-supported-by-this-option
By running rs-enumerate-devices in a terminal where I have ros jazzy initialised I get$ /opt/ros/jazzy/bin/rs-enumerate-devices --version
/opt/ros/jazzy/bin/rs-enumerate-devices version: 2.57.7.0
$ /opt/ros/jazzy/bin/rs-enumerate-devices
No device detected. Is it plugged in?But in a terminal that does not have ros initialised I can run the sdk's rs-enumerate-devices
$ /bin/rs-enumerate-devices --version
/bin/rs-enumerate-devices version: 2.57.7.10378
$ /bin/rs-enumerate-devices
Device info:
Name : Intel RealSense D555
Serial Number : 342622301250
Firmware Version : 7.56.37776.6014
Physical Port : realsense/D555_342622301250
Product Id : DDS
Camera Locked : YES
Product Line : D500
Firmware Update Id : 342622301250
Connection Type : DDS
Imu Type : BMI088
Stream Profiles supported by RGB Camera
...However, once I initialise the ros environment, the rs-enumerate-devices command seems to use one of the libraries installed in ros, which makes it not detect any devices. Could there be an issue with the libraries in ros?
$ ldd /bin/rs-enumerate-devices | grep realsense
librealsense2.so.2.57 => /lib/x86_64-linux-gnu/librealsense2.so.2.57 (0x0000778e37000000)
$ source /opt/ros/jazzy/setup.sh
$ ldd /bin/rs-enumerate-devices | grep realsense
librealsense2.so.2.57 => /opt/ros/jazzy/lib/x86_64-linux-gnu/librealsense2.so.2.57 (0x0000760ee6a00000)
$ /bin/rs-enumerate-devices
No device detected. Is it plugged in?
$ /bin/rs-enumerate-devices --version
/bin/rs-enumerate-devices version: 2.57.7.10378At the same time DDS topics are still transmitted and received:
$ ros2 topic list
parameter_events
/realsense/D555_342622301250/tf_static
/realsense/D555_342622301250_Color
...
$ ros2 topic hz /realsense/D555_342622301250_Color
average rate: 29.965
min: 0.028s max: 0.038s std dev: 0.00170s window: 32
average rate: 29.984
min: 0.028s max: 0.038s std dev: 0.00121s window: 63And thus the wrapper of course cannot find the device aswell:
$ ros2 launch realsense2_camera rs_launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2026-05-07-12-04-00-546235-user-ubuntu-tower-12820
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [launch.user]: 🚀 Launching as Normal ROS Node
[INFO] [realsense2_camera_node-1]: process started with pid [12832]
[realsense2_camera_node-1] [INFO] [1778148240.923083879] [camera.camera]: RealSense ROS v4.57.7
[realsense2_camera_node-1] [INFO] [1778148240.923157283] [camera.camera]: Built with LibRealSense v2.57.7
[realsense2_camera_node-1] [INFO] [1778148240.923169340] [camera.camera]: Running with LibRealSense v2.57.7
[realsense2_camera_node-1] [WARN] [1778148240.940575921] [camera.camera]: No RealSense devices were found! -
The recommended method of installing the librealsense SDK for use with DDS is to build it with source code with CMake using the 'installation.md' instructions and include the flag -DBUILD_WITH_DDS=ON in the CMake build instruction.
https://github.com/realsenseai/librealsense/issues/14284#issuecomment-3349204762
And then build the ROS wrapper from source code with colcon build using the Option 2 instructions instead of the Option 1 package installation instructions.
However, you should be able to test whether DDS is working well on your computer just by installing librealsense with DDS enabled in the CMake build instruction. This is because the 7.56.37776.6014 firmware driver that you have installed in your camera has support for native ROS.
This means that you can launch a data visualization application such as realsense-viewer and then change the image in the visualization application (e.g the Viewer) by inputting commands such as 'ros2 param set' ones into the ROS2 terminal without having to have the ROS2 wrapper installed and launched.
-
So that means DDS is not supported with the ROS installation available via apt? As mentioned before, the SDK seems to work without any issues in both cases, installing it via apt or building manually with the DBUILD_WITH_DDS flag.
It appears that the ROS wrapper version 4.58.1 is the issue. If installing via apt is not recommended, I can just work with the newer versions, which run perfectly fine. But of course it would be easier to use the apt installation for the setup in my organisation.
Regarding your advice with the use of the native ROS support: Maybe I am missing something, but when you use the camera without the wrapper, there is no node running in my local ROS system. How should I then change something via ros2 param set? Of course the topics are transmitted via DDS, but I'm still missing a way to interact with the camera without having a wrapper or node in any other kind running in my local ROS.
Of course the wrapper and realsense-viewer use some kind of interface to communicate with the camera. Is this available as a non GUI application, which can be used by scripts or similar, or is it required to use either the realsense-viewer or the wrapper to change preferences for the camera behaviour? -
To use librealsense applications such as realsense-viewer on a DDS connection, it should be necessary to build librealsense from source code with the -DBUILD_WITH_DDS=ON flag.
In regard to ROS2 though, the D555 camera has built-in 'plug and play' integration with ROS2, making a short list of DDS topics available for streaming to ROS2 nodes without requiring additional SDK or wrapper installation.
As you are using the .6014 firmware with native ROS support, you can use ros2 param set without a node such as the wrapper by including the unique /D555 number in the DDS topics (which is based on the camera's serial number) in the param command. For example, your topic list includes the one below:
/realsense/D555_342622301250_Color
So you can use a ros2 param set command like the example below that disables auto-exposure:
ros2 param set /D555_342622301250 RGB.option.Enable_Auto_Exposure 0You can obtain a list of available parameters to use with ros2 param set with the ros2 param list command.
Parameters can also be changed with program scripting after the ROS2 wrapper has been launched, using a Python node script like the ones at the link below. This requires wrapper installation though.
https://github.com/realsenseai/realsense-ros/tree/ros2-master/realsense2_camera/scripts
-
I have been building the SDK with the -DBUILD_WITH_DDS=ON flag. It seems that the SDK is working well, as rs-enumerate-devices reliably shows the camera. But the ros wrapper does not work still. In very few instances it is able to detect the camera, but it is not reproducible and in the vast majority of attempts it will not find the camera. I have no idea what the cause could be. If you have any information on how to get the wrapper to run with DDS, I'd be very thankful.
Regarding your comment about setting the parameter: It does not work for me. I get the following output:ros2 param set /realsense/D555_342622301250 RGB.option.Enable_Auto_Exposure 0
Node not found, which makes sense to me, as there is no node running without starting the wrapper.
-
Does detection during ROS wrapper launch become any more reliable if you add initial_reset:=true to the launch command to reset the camera at launch?
Is it detectable if you launch the wrapper node with ros2 run instead of ros2 launch?
ros2 run realsense2_camera realsense2_camera_node --ros-args -p initial_reset:=true -
Hi Niklas Schlueter Do you require further assistance with this case, please? Thanks!
Please sign in to leave a comment.
Comments
8 comments