Realsense¶
ROS2 Realsense. (Only installed by default for the template workspace.)
To enable Realsense, set the REALSENSE argument to YES in the compose.yaml file of your desired workspace (e.g., husky_ws/docker/compose.yaml). After making these changes, rebuild the Docker image.
Note: These scripts have only been tested on the RealSense D435i and D455.
See Last tested for the latest validation status.
🐳 Start Container¶
Make sure your system meets the system requirements and have followed the setup instructions before using this workspace.
Run the following commands in a Ubuntu desktop environment. If you are using a remote server, make sure you're using a terminal within a remote desktop session (e.g., VNC) instead of SSH (i.e., don't use ssh -X or ssh -Y).
cd ~/ros2-essentials/template_ws/docker
docker compose build
xhost +local:docker
docker compose up -d
# The initial build will take a while, please wait patiently.
If your user's UID is
1000, you may replace thedocker compose buildcommand withdocker compose pull.
The commands in the following sections assume that you are inside the Docker container:
# in a new terminal
docker exec -it ros2-template-ws bash
# and then start systemd-udevd in the container
sudo /lib/systemd/systemd-udevd --daemon
If the initial build somehow failed, run:
Once you have finished testing, you can stop and remove the container with:
Simulation¶
Realsense test with gazebo¶
- realsense_gazebo package: Gazebo simulation of the robot with RealSense D435 camera.
- Launch Gazebo with turtlebot3 in
tmux
- Run the control tool in new window of
tmux
Real Hardware¶
Realsense test in real world¶
You can modify the camera setting in realsense.yaml under realsense_launch/config
- Launch Realsense camera node
- Along with RViz
If you encountered strange issues, make sure that systemd-udevd is running in the container, which is required to access IMU data.
Tools¶
Realsense viewer:
Updating Firmware¶
Updating firmware via realsense-viewer will fail at 30% if systemd-udevd is not running, which could result in the following error:
Make sure to start systemd-udevd in the container before updating firmware:
sudo /lib/systemd/systemd-udevd --daemon
realsense-viewer
# and then update firmware via realsense-viewer
systemd-udevd is required to detect when the (recovery) device reconnects after requesting the camera to switch to recovery mode.
Example output of a successful firmware update:
Started Firmware Update process Trying to back-up camera flash memory Backup completed and saved as '/home/user/.xxxxxxxxxxxx.xxxxxxxx_xxxxxx.bin' Requesting to switch to recovery mode DFU device 'xxxxxxxxxxxx' found Recovery device connected, starting update.. Internal write is in progress Please DO NOT DISCONNECT the camera Firmware Download completed, await DFU transition event Discovered connection of the original device Device reconnected successfully! FW update process completed successfully
Troubleshooting¶
Check USB devices (on host):
Check udev rules:
Show extrinsic and intrinsics:
Show serial number:
List firmware version: