This package provides a ROS 2 launch file to initialize and configure the OAK-D camera for RGBD, stereo, and point cloud processing. It includes adjustable camera configurations for transform frames, position, orientation, and depth processing parameters, along with a sample RViz configuration.
-
Execute the below command to install the required dependencies:
sudo wget -qO- https://docs.luxonis.com/install_dependencies.sh | bashPlease refer to Installation documentation if any issues occur.
-
Clone the repository and add it to your ROS 2 workspace:
git clone https://github.com/jmguerreroh/oak_d_camera.git
-
Install dependencies:
rosdep install --from-paths src --ignore-src -r -y
-
Build the workspace:
colcon build --symlink-install
To launch the OAK-D camera node with default parameters:
ros2 launch oak_d_camera camera.launch.py
The launch file provides several configurable arguments:
camera_model: Model of the camera. Options:OAK-D,OAK-D-LITE. Default:OAK-D-LITEtf_prefix: TF prefix for camera frames. Default:oakbase_frame: Name of the camera's base frame. Default:oak-d_frameparent_frame: Parent frame for the camera's base. Default:oak-d-base-frame
cam_pos_x,cam_pos_y,cam_pos_z: Camera position relative to the base frame. Default:0.0cam_roll,cam_pitch,cam_yaw: Camera orientation relative to the base frame. Default:0.0
lrcheck: Enable left-right consistency check. Default:Trueextended: Enable extended disparity range. Default:Falsesubpixel: Enable subpixel accuracy. Default:Trueconfidence: Set confidence threshold for depth estimation. Default:200LRchecktresh: Set left-right consistency threshold. Default:5
Please refer to StereoDepth documentation for more information.
only_color: Enable publishing of only Color images. Default:Falseuse_rviz: Launch RViz for visualization. Default:Trueuse_depth: Enable depth image publishing. Default:Trueuse_disparity: Enable disparity image publishing. Default:Trueuse_lr_raw: Enable left and right raw image publishing. Default:Trueuse_pointcloud: Enable point cloud publishing. Default:Truepc_color: Use color in the point cloud. Options:Truefor color orFalsefor intensity. Default:Trueuse_base: Use the STL base bracket. Default:True
The launch file opens RViz with a pre-configured view. You can modify rviz/camera.rviz to customize the visualization.
This project was made by José Miguel Guerrero, Associate Professor at Universidad Rey Juan Carlos.
Copyright © 2024.
This work is licensed under the terms of the MIT license.