From 224288aef8972d3babcf12810717ef87708d1ad4 Mon Sep 17 00:00:00 2001 From: fmessmer Date: Mon, 10 Jul 2023 16:09:59 +0200 Subject: [PATCH 1/2] add launch file for action_bridges used in amr scenarios --- CMakeLists.txt | 5 +++++ launch/amr_action_bridge_launch.py | 29 +++++++++++++++++++++++++++++ package.xml | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 launch/amr_action_bridge_launch.py diff --git a/CMakeLists.txt b/CMakeLists.txt index cbf89cca..01d44b56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,3 +319,8 @@ install( DIRECTORY resource DESTINATION share/${PROJECT_NAME} ) + +install( + DIRECTORY launch + DESTINATION share/${PROJECT_NAME} +) diff --git a/launch/amr_action_bridge_launch.py b/launch/amr_action_bridge_launch.py new file mode 100644 index 00000000..e62cc62c --- /dev/null +++ b/launch/amr_action_bridge_launch.py @@ -0,0 +1,29 @@ +from launch import LaunchDescription +from launch_ros.actions import Node + + +def generate_launch_description(): + return LaunchDescription( + [ + Node( + package='ros1_bridge', + executable='action_bridge', + output='screen', + name='action_bridge_execute_transferjob', + namespace='action_bridge_execute_transferjob', # corresponds to setting argument "--ros-args --remap __name:=action_bridge_execute_transferjob" + respawn=True, + respawn_delay=1, + arguments=["ros2", "amr_road_network_msgs", "action/ExecuteTransferJob", "/execute_transferjob"] + ), + Node( + package='ros1_bridge', + executable='action_bridge', + output='screen', + name='action_bridge_execute_transferjob_flexbe', + namespace='action_bridge_execute_transferjob_flexbe', # corresponds to setting argument "--ros-args --remap __name:=action_bridge_execute_transferjob_flexbe" + respawn=True, + respawn_delay=1, + arguments=["ros1", "amr_road_network_msgs", "ExecuteTransferJob", "/execute_transferjob_flexbe"] + ), + ] + ) diff --git a/package.xml b/package.xml index 4c24c522..99a89366 100644 --- a/package.xml +++ b/package.xml @@ -44,6 +44,8 @@ rcutils std_msgs + ros2launch + ament_lint_auto ament_lint_common demo_nodes_cpp From f27d98c049d12ada0e7f78e818951188aab0b3d8 Mon Sep 17 00:00:00 2001 From: fmessmer Date: Tue, 11 Jul 2023 14:34:13 +0200 Subject: [PATCH 2/2] fix run_tests --- launch/amr_action_bridge_launch.py | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/launch/amr_action_bridge_launch.py b/launch/amr_action_bridge_launch.py index e62cc62c..76349967 100644 --- a/launch/amr_action_bridge_launch.py +++ b/launch/amr_action_bridge_launch.py @@ -1,3 +1,18 @@ +# Copyright 2023 4am Robotics GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + from launch import LaunchDescription from launch_ros.actions import Node @@ -10,20 +25,26 @@ def generate_launch_description(): executable='action_bridge', output='screen', name='action_bridge_execute_transferjob', - namespace='action_bridge_execute_transferjob', # corresponds to setting argument "--ros-args --remap __name:=action_bridge_execute_transferjob" + namespace='action_bridge_execute_transferjob', respawn=True, respawn_delay=1, - arguments=["ros2", "amr_road_network_msgs", "action/ExecuteTransferJob", "/execute_transferjob"] + arguments=['ros2', + 'amr_road_network_msgs', + 'action/ExecuteTransferJob', + '/execute_transferjob'] ), Node( package='ros1_bridge', executable='action_bridge', output='screen', name='action_bridge_execute_transferjob_flexbe', - namespace='action_bridge_execute_transferjob_flexbe', # corresponds to setting argument "--ros-args --remap __name:=action_bridge_execute_transferjob_flexbe" + namespace='action_bridge_execute_transferjob_flexbe', respawn=True, respawn_delay=1, - arguments=["ros1", "amr_road_network_msgs", "ExecuteTransferJob", "/execute_transferjob_flexbe"] + arguments=['ros1', + 'amr_road_network_msgs', + 'ExecuteTransferJob', + '/execute_transferjob_flexbe'] ), ] )