From 93b517f123a328e7dfba077d58a40940d3216871 Mon Sep 17 00:00:00 2001 From: Chen Bainian Date: Thu, 8 Oct 2020 12:56:29 +0800 Subject: [PATCH 1/3] Add Foxy support: use action_tutorials_interface for ros2 fibonacci msg Signed-off-by: Chen Bainian --- CMakeLists.txt | 6 +++--- src/action_bridge_fibonacci_1_2.cpp | 4 ++-- src/action_bridge_fibonacci_2_1.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca3d786..5634a42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(rclcpp_action REQUIRED) -find_package(action_tutorials REQUIRED) +find_package(action_tutorials_interfaces REQUIRED) find_package(control_msgs REQUIRED) # find ROS 1 packages @@ -60,7 +60,7 @@ add_executable(action_bridge_fibonacci_1_2 ) ament_target_dependencies(action_bridge_fibonacci_1_2 "ros1_roscpp" "ros1_actionlib" "ros1_actionlib_tutorials" - "rclcpp" "rclcpp_action" "action_tutorials" + "rclcpp" "rclcpp_action" "action_tutorials_interfaces" ) add_executable(action_bridge_fibonacci_2_1 @@ -68,7 +68,7 @@ add_executable(action_bridge_fibonacci_2_1 ) ament_target_dependencies(action_bridge_fibonacci_2_1 "ros1_roscpp" "ros1_actionlib" "ros1_actionlib_tutorials" - "rclcpp" "rclcpp_action" "action_tutorials" + "rclcpp" "rclcpp_action" "action_tutorials_interfaces" ) install(TARGETS action_bridge_follow_joint_trajectory_1_2 action_bridge_follow_joint_trajectory_2_1 action_bridge_fibonacci_1_2 action_bridge_fibonacci_2_1 diff --git a/src/action_bridge_fibonacci_1_2.cpp b/src/action_bridge_fibonacci_1_2.cpp index af294bc..254ea82 100644 --- a/src/action_bridge_fibonacci_1_2.cpp +++ b/src/action_bridge_fibonacci_1_2.cpp @@ -24,10 +24,10 @@ #endif // include ROS 2 -#include +#include using FibonacciActionBridge = ActionBridge_1_2; + action_tutorials_interfaces::action::Fibonacci>; template <> void FibonacciActionBridge::translate_goal_1_to_2(const ROS1Goal &goal1, ROS2Goal &goal2) diff --git a/src/action_bridge_fibonacci_2_1.cpp b/src/action_bridge_fibonacci_2_1.cpp index 5b38b61..8b058d2 100644 --- a/src/action_bridge_fibonacci_2_1.cpp +++ b/src/action_bridge_fibonacci_2_1.cpp @@ -24,10 +24,10 @@ #endif // include ROS 2 -#include +#include using FibonacciActionBridge = ActionBridge_2_1; + action_tutorials_interfaces::action::Fibonacci>; template <> void FibonacciActionBridge::translate_goal_2_to_1(const ROS2Goal &goal2, ROS1Goal &goal1) From d0c833f23117704b654de5f774168c66a94a4f55 Mon Sep 17 00:00:00 2001 From: Chen Bainian Date: Thu, 8 Oct 2020 13:05:50 +0800 Subject: [PATCH 2/3] Update setup instructions to foxy Signed-off-by: Chen Bainian --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 05726b6..8df49f1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ A package to bridge actions between ROS1 and ROS2. **NOTE:** -- Currently supports forwarding goals from ROS1 (melodic) action client to ROS2 (dashing) action server +- Currently supports forwarding goals from ROS1 (noetic) action client to ROS2 (foxy) action server - As an example, implemented interfaces for the action bridge for FibonacciAction and FollowJointTrajectoryAction @@ -10,20 +10,20 @@ A package to bridge actions between ROS1 and ROS2. (*rosdep does not work properly with mixed ROS1 and ROS2 dependencies*) ``` -sudo apt install ros-melodic-actionlib ros-melodic-actionlib-tutorials ros-melodic-control-msgs ros-melodic-roscpp ros-dashing-control-msgs ros-dashing-rclcpp ros-dashing-rclcpp-action ros-dashing-action-tutorials +sudo apt install ros-noetic-actionlib ros-noetic-actionlib-tutorials ros-noetic-control-msgs ros-noetic-roscpp ros-foxy-control-msgs ros-foxy-rclcpp ros-foxy-rclcpp-action ros-foxy-action-tutorials-interfaces ``` **How to build:** Clone the repository in the `src` folder of your ROS2 workspace. ``` -git clone git@github.com:ipa-hsd/action_bridge.git -b dashing-devel +git clone git@github.com:ipa-hsd/action_bridge.git -b foxy-devel ``` Since `action_bridge` package depends on both ROS1 and ROS2, source both workspaces. ``` -source /opt/ros/melodic/local_setup.bash -source /opt/ros/dashing/local_setup.bash +source /opt/ros/noetic/local_setup.bash +source /opt/ros/foxy/local_setup.bash colcon build ``` Now you are ready to run the `action_bridge`! From 09740d83af5b49d9c55913df7f312cafd7ad5196 Mon Sep 17 00:00:00 2001 From: Chen Bainian Date: Thu, 8 Oct 2020 13:06:03 +0800 Subject: [PATCH 3/3] Remove some extra spaces Signed-off-by: Chen Bainian --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8df49f1..5532d2b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ A package to bridge actions between ROS1 and ROS2. - + **NOTE:** - Currently supports forwarding goals from ROS1 (noetic) action client to ROS2 (foxy) action server - As an example, implemented interfaces for the action bridge for FibonacciAction @@ -14,7 +14,7 @@ sudo apt install ros-noetic-actionlib ros-noetic-actionlib-tutorials ros-noetic- ``` **How to build:** - + Clone the repository in the `src` folder of your ROS2 workspace. ``` git clone git@github.com:ipa-hsd/action_bridge.git -b foxy-devel