A ROS2 package for publishing pointcloud data from the OAK-D camera.
This package provides ROS2 nodes for:
- Publishing rectified stereo images and depth from OAK-D
- Applying median and WLS filtering to depth data
- Converting depth to pointcloud (planned)
Required:
- ROS2 Jazzy (or another ROS2 distro if you adapt the dependencies)
- OpenCV
- depthai (optional - package can build without it)
- cv_bridge (optional - package can build without it)
# Clone the repository into your ROS2 workspace
cd ~/ros_ws/src
git clone https://github.com/GarryLeo0911/pcloud.git oakd_pcloud
# Install dependencies (Ubuntu/Debian)
sudo apt update
sudo apt install ros-jazzy-cv-bridge ros-jazzy-depthai-ros
# Build the package
cd ~/ros_ws
colcon build --packages-select oakd_pcloudIf you don't have the DepthAI SDK or ROS2 packages installed, you can build the package in a limited mode:
cd ~/ros_ws
colcon build --packages-select oakd_pcloud --cmake-args -DBUILD_WITHOUT_DEPTHAI=ONIn this mode, the nodes will start but won't connect to actual camera hardware.
Source your workspace:
source ~/ros_ws/install/setup.bashBasic stereo publisher:
ros2 run oakd_pcloud stereo_rectified_rgb_nodeWith median filter:
# Coming soon - launch file will be providedWhen running with DepthAI enabled:
/stereo/depth(sensor_msgs/Image) - Raw depth data/rectified_left/image(sensor_msgs/Image) - Rectified left camera image/rectified_right/image(sensor_msgs/Image) - Rectified right camera image/color/image(sensor_msgs/Image) - Color camera preview
camera_name- Name/identifier for the cameracamera_param_uri- URI to camera calibration parameters
This is a ROS2 port of the original ROS1 package. Current status:
- Basic node structure converted to ROS2
- CMake/package.xml updated for ROS2
- Stereo publisher node working
- Launch files need conversion to Python
- Full message_filters integration pending
- More testing needed
This package is released under the MIT License. See LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
This is a ROS2 port of the original oakd_pcloud package.