Skip to content

Camera Development Example

Before developing with the camera driver, check that the depth camera is properly connected:

  1. Confirm that Intel RealSense D435i is displayed in the left sidebar;
  2. Click the on/off switches for Stereo Module and RGB Camera. If the depth image and color image open successfully, the depth camera is properly connected.

realsense-stream

The librealsense libraries are compiled with CUDA support and installed to /usr/local/lib and /usr/local/include. For secondary development, include the corresponding header files and link the corresponding libraries.

realsense-include

realsense-lib

The realsense-ros package is located at /home/ysc/lite_cog/drivers/realsense_ws. Related functions can be started via system service:

Terminal window
sudo systemctl start realsense

This command uses the dr_camera.launch file in /home/ysc/lite_cog/drivers/realsense_ws/src/realsense2_camera/launch to start the realsense camera. To modify camera startup parameters, edit this launch file.

The ROS1 version of realsense-ros is located at /home/ysc/lite_cog/drivers/realsense_ws. Related functions can be started, stopped, and checked via system service:

Terminal window
sudo systemctl start realsense
sudo systemctl stop realsense
sudo systemctl status realsense

This command uses the dr_camera.launch file in ~/lite_cog/drivers/realsense_ws/src/realsense2_camera/launch to start the realsense camera. To modify camera startup parameters, edit this launch file.

The ROS2 version of realsense-ros is located at /home/ysc/lite_cog_ros2/driver/realsense_ws. Related functions can be started, stopped, and checked via system service:

Terminal window
sudo systemctl start realsense_ros2
sudo systemctl stop realsense_ros2
sudo systemctl status realsense_ros2

This command uses the dr_camera_launch.py file in ~/lite_cog_ros2/drivers/realsense_ws/src/realsense2_camera/launch to start the realsense camera. To modify camera startup parameters, edit this launch.py file.