Skip to content

Commit

Permalink
Merge pull request #32 from pariaspe/rolling
Browse files Browse the repository at this point in the history
Added namespace and config file as launch arguments
  • Loading branch information
fmrico authored Jul 8, 2024
2 parents cd166d0 + 7ef9cfe commit f388859
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mocap4r2_optitrack_driver/launch/optitrack2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

from launch import LaunchDescription
from launch.actions import EmitEvent
from launch.actions import SetEnvironmentVariable
from launch.actions import SetEnvironmentVariable,DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import LifecycleNode
from launch_ros.events.lifecycle import ChangeState

Expand All @@ -45,11 +46,11 @@ def generate_launch_description():

driver_node = LifecycleNode(
name='mocap4r2_optitrack_driver_node',
namespace='',
namespace=LaunchConfiguration('namespace'),
package='mocap4r2_optitrack_driver',
executable='mocap4r2_optitrack_driver_main',
output='screen',
parameters=[params_file_path],
parameters=[LaunchConfiguration('config_file')],
)

# Make the driver node take the 'configure' transition
Expand All @@ -72,6 +73,8 @@ def generate_launch_description():
ld = LaunchDescription()

ld.add_action(stdout_linebuf_envvar)
ld.add_action(DeclareLaunchArgument('namespace', default_value=''))
ld.add_action(DeclareLaunchArgument('config_file', default_value=params_file_path))
ld.add_action(driver_node)
ld.add_action(driver_configure_trans_event)
# ld.add_action(driver_activate_trans_event)
Expand Down

0 comments on commit f388859

Please sign in to comment.