mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 12:07:46 +08:00
1.9 KiB
1.9 KiB
ROS Package QuickStarts
Introduction
This section provides a quick start to using the Orbbec ROS 2 wrapper. You will learn how to:
- Launch a camera node.
- Visualize depth/color streams in RViz2.
- Interact with topics and services using ROS 2 CLI tools.
Build your First Camera Application
Step 1: Source ROS 2 and Workspace
Make sure ROS 2 and your workspace environment are sourced:
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/ros2_ws/install/setup.bash
Step 2: Launch the Camera Node
- On terminal 1
. ./install/setup.bash
ros2 run orbbec_camera list_devices_node #Check if the camera is connected
ros2 launch orbbec_camera gemini_330_series.launch.py # Or other launch file, see below table
If you have multiple cameras connected, you can specify the serial number:
ros2 launch orbbec_camera gemini_330_series.launch.py serial_number:=<YourCameraSN>
Step 3: Visualize in RViz2
Launch RViz2 and load the default config:
- On terminal 2
rviz2
- Add an Image display, set topic to
/camera/color/image_raw. - Add another Image display for
/camera/depth/image_raw. - Optionally, add a PointCloud2 display for
/camera/depth/points.
You should now see the color stream, depth stream, and 3D point cloud in RViz2.
Sample Features
After the node is running, try some ROS 2 CLI commands:
List available topics / services/ parameters
ros2 topic list
ros2 service list
ros2 param list
Echo a topic
View depth camera data:
ros2 topic echo /camera/depth/camera_info
Call a service
For example, get device Information:
ros2 service call /camera/get_device_info orbbec_camera_msgs/srv/GetDeviceInfo '{}'
Record with rosbag2
ros2 bag record /camera/color/image_raw /camera/depth/image_raw