mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-13 07:49:49 +08:00
modify for 4 G335L multi camera sync
This commit is contained in:
@@ -2,19 +2,22 @@
|
|||||||
"save_rgbir_params": {
|
"save_rgbir_params": {
|
||||||
"image_number": "100",
|
"image_number": "100",
|
||||||
"usb_ports": [
|
"usb_ports": [
|
||||||
"2-7",
|
|
||||||
"2-2",
|
"2-2",
|
||||||
|
"2-3.3",
|
||||||
|
"2-3.1",
|
||||||
"2-1"
|
"2-1"
|
||||||
],
|
],
|
||||||
"ir_topics": [
|
"ir_topics": [
|
||||||
"/G0_4J/left_ir/image_raw",
|
"/G0_51/left_ir/image_raw",
|
||||||
"/G1_F0/left_ir/image_raw",
|
"/G1_54/left_ir/image_raw",
|
||||||
"/G2_15/left_ir/image_raw"
|
"/G2_5Y/left_ir/image_raw",
|
||||||
|
"/G3_47/left_ir/image_raw"
|
||||||
],
|
],
|
||||||
"color_topics": [
|
"color_topics": [
|
||||||
"/G0_4J/color/image_raw",
|
"/G0_51/color/image_raw",
|
||||||
"/G1_F0/color/image_raw",
|
"/G1_54/color/image_raw",
|
||||||
"/G2_15/color/image_raw"
|
"/G2_5Y/color/image_raw",
|
||||||
|
"/G3_47/color/image_raw"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@ def generate_launch_description():
|
|||||||
DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser'
|
DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser'
|
||||||
DeclareLaunchArgument('interleave_frame_enable', default_value='true'),
|
DeclareLaunchArgument('interleave_frame_enable', default_value='true'),
|
||||||
DeclareLaunchArgument('interleave_skip_enable', default_value='true'),
|
DeclareLaunchArgument('interleave_skip_enable', default_value='true'),
|
||||||
DeclareLaunchArgument('interleave_skip_index', default_value='1'), # 0:partern ir 1:flood ir
|
DeclareLaunchArgument('interleave_skip_index', default_value='1'), # 0:skip pattern ir 1: skip flood ir
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_params(context, args):
|
def get_params(context, args):
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ def generate_launch_description():
|
|||||||
DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser'
|
DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser'
|
||||||
DeclareLaunchArgument('interleave_frame_enable', default_value='true'),
|
DeclareLaunchArgument('interleave_frame_enable', default_value='true'),
|
||||||
DeclareLaunchArgument('interleave_skip_enable', default_value='false'),
|
DeclareLaunchArgument('interleave_skip_enable', default_value='false'),
|
||||||
DeclareLaunchArgument('interleave_skip_index', default_value='1'), # 0:partern ir 1:flood ir
|
DeclareLaunchArgument('interleave_skip_index', default_value='1'), # 0:skip pattern ir 1: skip flood ir
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_params(context, args):
|
def get_params(context, args):
|
||||||
|
|||||||
@@ -13,67 +13,54 @@ def generate_launch_description():
|
|||||||
config_file_dir = os.path.join(package_dir, "config")
|
config_file_dir = os.path.join(package_dir, "config")
|
||||||
config_file_path = os.path.join(config_file_dir, "camera_params.yaml")
|
config_file_path = os.path.join(config_file_dir, "camera_params.yaml")
|
||||||
|
|
||||||
G0_4J = IncludeLaunchDescription(
|
G0_51 = IncludeLaunchDescription(
|
||||||
PythonLaunchDescriptionSource(
|
PythonLaunchDescriptionSource(
|
||||||
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
||||||
),
|
),
|
||||||
launch_arguments={
|
launch_arguments={
|
||||||
"camera_name": "G0_4J",
|
"camera_name": "G0_51",
|
||||||
"usb_port": "2-7",
|
"usb_port": "2-2",
|
||||||
"device_num": "5",
|
"device_num": "4",
|
||||||
"sync_mode": "standalone",
|
"sync_mode": "primary",
|
||||||
"enable_left_ir":"true",
|
"enable_left_ir":"true",
|
||||||
"config_file_path": config_file_path,
|
"config_file_path": config_file_path,
|
||||||
}.items(),
|
}.items(),
|
||||||
)
|
)
|
||||||
|
|
||||||
G1_F0 = IncludeLaunchDescription(
|
G1_54 = IncludeLaunchDescription(
|
||||||
PythonLaunchDescriptionSource(
|
PythonLaunchDescriptionSource(
|
||||||
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
||||||
),
|
),
|
||||||
launch_arguments={
|
launch_arguments={
|
||||||
"camera_name": "G1_F0",
|
"camera_name": "G1_54",
|
||||||
"usb_port": "2-2",
|
"usb_port": "2-3.3",
|
||||||
"device_num": "5",
|
"device_num": "4",
|
||||||
"sync_mode": "standalone",
|
|
||||||
"enable_left_ir":"true",
|
|
||||||
"config_file_path": config_file_path,
|
|
||||||
}.items(),
|
|
||||||
)
|
|
||||||
G2_15 = IncludeLaunchDescription(
|
|
||||||
PythonLaunchDescriptionSource(
|
|
||||||
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
|
||||||
),
|
|
||||||
launch_arguments={
|
|
||||||
"camera_name": "G2_15",
|
|
||||||
"usb_port": "2-1",
|
|
||||||
"device_num": "5",
|
|
||||||
"sync_mode": "standalone",
|
|
||||||
"enable_left_ir":"true",
|
|
||||||
"config_file_path": config_file_path,
|
|
||||||
}.items(),
|
|
||||||
)
|
|
||||||
G3_1M = IncludeLaunchDescription(
|
|
||||||
PythonLaunchDescriptionSource(
|
|
||||||
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
|
||||||
),
|
|
||||||
launch_arguments={
|
|
||||||
"camera_name": "G3_1M",
|
|
||||||
"usb_port": "2-1.4.3",
|
|
||||||
"device_num": "5",
|
|
||||||
"sync_mode": "secondary_synced",
|
"sync_mode": "secondary_synced",
|
||||||
"enable_left_ir":"true",
|
"enable_left_ir":"true",
|
||||||
"config_file_path": config_file_path,
|
"config_file_path": config_file_path,
|
||||||
}.items(),
|
}.items(),
|
||||||
)
|
)
|
||||||
G4_74 = IncludeLaunchDescription(
|
G2_5Y = IncludeLaunchDescription(
|
||||||
PythonLaunchDescriptionSource(
|
PythonLaunchDescriptionSource(
|
||||||
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
||||||
),
|
),
|
||||||
launch_arguments={
|
launch_arguments={
|
||||||
"camera_name": "G4_74",
|
"camera_name": "G2_5Y",
|
||||||
"usb_port": "2-1.4.4.1",
|
"usb_port": "2-3.1",
|
||||||
"device_num": "5",
|
"device_num": "4",
|
||||||
|
"sync_mode": "secondary_synced",
|
||||||
|
"enable_left_ir":"true",
|
||||||
|
"config_file_path": config_file_path,
|
||||||
|
}.items(),
|
||||||
|
)
|
||||||
|
G3_47 = IncludeLaunchDescription(
|
||||||
|
PythonLaunchDescriptionSource(
|
||||||
|
os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py")
|
||||||
|
),
|
||||||
|
launch_arguments={
|
||||||
|
"camera_name": "G3_47",
|
||||||
|
"usb_port": "2-1",
|
||||||
|
"device_num": "4",
|
||||||
"sync_mode": "secondary_synced",
|
"sync_mode": "secondary_synced",
|
||||||
"enable_left_ir":"true",
|
"enable_left_ir":"true",
|
||||||
"config_file_path": config_file_path,
|
"config_file_path": config_file_path,
|
||||||
@@ -95,11 +82,10 @@ def generate_launch_description():
|
|||||||
TimerAction(
|
TimerAction(
|
||||||
period=2.0,
|
period=2.0,
|
||||||
actions=[
|
actions=[
|
||||||
TimerAction(period=0.2, actions=[GroupAction([G1_F0])]),
|
TimerAction(period=0.5, actions=[GroupAction([G1_54])]),
|
||||||
TimerAction(period=0.2, actions=[GroupAction([G2_15])]),
|
TimerAction(period=0.5, actions=[GroupAction([G2_5Y])]),
|
||||||
# TimerAction(period=0.2, actions=[GroupAction([G3_1M])]),
|
TimerAction(period=0.5, actions=[GroupAction([G3_47])]),
|
||||||
# TimerAction(period=0.2, actions=[GroupAction([G4_74])]),
|
TimerAction(period=0.5, actions=[GroupAction([G0_51])]),
|
||||||
TimerAction(period=0.2, actions=[GroupAction([G0_4J])]),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
# The primary camera should be launched at last
|
# The primary camera should be launched at last
|
||||||
|
|||||||
Reference in New Issue
Block a user