Skip to content

Commit

Permalink
Update rs_launch.py
Browse files Browse the repository at this point in the history
add namespace launch argument
  • Loading branch information
hyunseok-yang authored Jun 2, 2023
1 parent dad99e5 commit eb7643e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions realsense2_camera/launch/rs_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@


configurable_parameters = [{'name': 'camera_name', 'default': 'camera', 'description': 'camera unique name'},
{'name': 'namespace', 'default': '', 'description': 'namespace for camera'},
{'name': 'serial_no', 'default': "''", 'description': 'choose device by serial number'},
{'name': 'usb_port_id', 'default': "''", 'description': 'choose device by usb port id'},
{'name': 'device_type', 'default': "''", 'description': 'choose device by type'},
Expand Down Expand Up @@ -94,7 +95,7 @@ def launch_setup(context, *args, **kwargs):
return [
launch_ros.actions.Node(
package='realsense2_camera',
node_namespace=LaunchConfiguration("camera_name"),
node_namespace=LaunchConfiguration("namespace"),
node_name=LaunchConfiguration("camera_name"),
node_executable='realsense2_camera_node',
prefix=['stdbuf -o L'],
Expand All @@ -109,7 +110,7 @@ def launch_setup(context, *args, **kwargs):
return [
launch_ros.actions.Node(
package='realsense2_camera',
namespace=LaunchConfiguration("camera_name"),
namespace=LaunchConfiguration("namespace"),
name=LaunchConfiguration("camera_name"),
executable='realsense2_camera_node',
parameters=[set_configurable_parameters(configurable_parameters)
Expand Down

0 comments on commit eb7643e

Please sign in to comment.