mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-09 14:27:02 +08:00
refactor: rename and replace GigE Action Command with Action Command functionality
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Action Command
|
||||
|
||||
This example starts two Gemini 335Le cameras in Group Actions synchronization mode and one host-side Action Command sender.
|
||||
|
||||
## Before running
|
||||
|
||||
Use Gemini 335Le firmware 1.8.24 or later and Orbbec SDK 2.10.2 or later. Connect both cameras and the host to the same network, then set the two `net_device_ip` values in `multi_action_command.launch.py` to the camera IP addresses.
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_action_command.launch.py
|
||||
```
|
||||
|
||||
## Full guide
|
||||
|
||||
[Action Command (English)](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/multi_camera/action_command.html) · [中文指南](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/multi_camera/action_command.html)
|
||||
@@ -0,0 +1,55 @@
|
||||
import os
|
||||
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import GroupAction, IncludeLaunchDescription, TimerAction
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
package_dir = get_package_share_directory("orbbec_camera")
|
||||
camera_launch = os.path.join(
|
||||
package_dir, "launch", "gemini_330_series.launch.py"
|
||||
)
|
||||
|
||||
camera_01 = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(camera_launch),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_01",
|
||||
"enumerate_net_device": "false",
|
||||
"net_device_ip": "192.168.1.10",
|
||||
"net_device_port": "8090",
|
||||
"sync_mode": "group_actions",
|
||||
"enable_ptp_config": "true",
|
||||
"log_file_name": "camera_01.log",
|
||||
}.items(),
|
||||
)
|
||||
|
||||
camera_02 = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(camera_launch),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_02",
|
||||
"enumerate_net_device": "false",
|
||||
"net_device_ip": "192.168.1.11",
|
||||
"net_device_port": "8090",
|
||||
"sync_mode": "group_actions",
|
||||
"enable_ptp_config": "true",
|
||||
"log_file_name": "camera_02.log",
|
||||
}.items(),
|
||||
)
|
||||
|
||||
action_command_node = Node(
|
||||
package="orbbec_camera",
|
||||
executable="action_command_node",
|
||||
name="action_command_node",
|
||||
output="screen",
|
||||
)
|
||||
|
||||
return LaunchDescription(
|
||||
[
|
||||
action_command_node,
|
||||
TimerAction(period=0.0, actions=[GroupAction([camera_01])]),
|
||||
TimerAction(period=2.0, actions=[GroupAction([camera_02])]),
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user