Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple cameras in multiple robots #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions orbbec_camera/include/orbbec_camera/ob_camera_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ class OBCameraNode {
std::unique_ptr<ob::Pipeline> pipeline_ = nullptr;
std::unique_ptr<ob::Pipeline> imuPipeline_ = nullptr;
std::atomic_bool pipeline_started_{false};
std::string prefix_ = "";
std::string camera_name_ = "camera";
const std::string imu_optical_frame_id_ = "camera_gyro_optical_frame";
const std::string imu_frame_id_ = "camera_gyro_frame";
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/astra.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -99,14 +100,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -119,7 +120,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/astra2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -107,14 +108,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -127,7 +128,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/astra_adv.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -99,14 +100,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -119,7 +120,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/astra_embedded_s.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -99,14 +100,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -119,7 +120,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/astra_pro2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -99,14 +100,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -119,7 +120,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/astra_stereo_u3.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -99,14 +100,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -119,7 +120,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/dabai.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -99,14 +100,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -119,7 +120,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/dabai_d1.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('serial_number', default_value=''),
DeclareLaunchArgument('usb_port', default_value=''),
Expand Down Expand Up @@ -83,14 +84,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -103,7 +104,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/dabai_dcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -120,14 +121,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -140,7 +141,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
11 changes: 6 additions & 5 deletions orbbec_camera/launch/dabai_dcw.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
def generate_launch_description():
# Declare arguments
args = [
DeclareLaunchArgument('prefix', default_value=''),
DeclareLaunchArgument('camera_name', default_value='camera'),
DeclareLaunchArgument('depth_registration', default_value='false'),
DeclareLaunchArgument('serial_number', default_value=''),
Expand Down Expand Up @@ -99,14 +100,14 @@ def generate_launch_description():
compose_node = ComposableNode(
package="orbbec_camera",
plugin="orbbec_camera::OBCameraNodeDriver",
name=LaunchConfiguration("camera_name"),
namespace="",
name="orbbec_node_driver",
namespace=LaunchConfiguration("camera_name"),
parameters=parameters,
)
# Define the ComposableNodeContainer
container = ComposableNodeContainer(
name="camera_container",
namespace="",
name="container",
namespace=LaunchConfiguration("camera_name"),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
Expand All @@ -119,7 +120,7 @@ def generate_launch_description():
args
+ [
GroupAction(
[PushRosNamespace(LaunchConfiguration("camera_name")), container]
[PushRosNamespace(LaunchConfiguration("prefix")), container]
)
]
)
Expand Down
Loading