From a8d74ca2f08ab33261719a2e92324e8c7e182edf Mon Sep 17 00:00:00 2001 From: Aldokan Date: Fri, 12 Jan 2024 08:45:54 +0100 Subject: [PATCH] Feature/freya launch file (#120) * Made a launch file that includes thruster_interface and thruster_allocator * cleanup --------- Co-authored-by: Aldokan --- asv_setup/launch/freya.launch.py | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 asv_setup/launch/freya.launch.py diff --git a/asv_setup/launch/freya.launch.py b/asv_setup/launch/freya.launch.py new file mode 100644 index 00000000..a412647b --- /dev/null +++ b/asv_setup/launch/freya.launch.py @@ -0,0 +1,35 @@ +import os +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription +from launch.actions import SetEnvironmentVariable, IncludeLaunchDescription +from launch.launch_description_sources import PythonLaunchDescriptionSource +from ament_index_python.packages import get_package_share_directory + +def generate_launch_description(): + # Set environment variable + set_env_var = SetEnvironmentVariable( + name='ROSCONSOLE_FORMAT', + value='[${severity}] [${time}] [${node}]: ${message}' + ) + + + # Thruster Allocator launch + thruster_allocator_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(get_package_share_directory('thruster_allocator'), 'launch/thruster_allocator.launch.py') + ) + ) + + #Thruster Interface launch + thruster_interface_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(get_package_share_directory('thruster_interface'), 'launch/thruster_interface.launch.py') + ) + ) + + # Return launch description + return LaunchDescription([ + set_env_var, + thruster_allocator_launch, + thruster_interface_launch + ])