From 2393897d9ed25a92fd3bb732a3882de6b5313c96 Mon Sep 17 00:00:00 2001 From: Florian Vahl <7vahl@informatik.uni-hamburg.de> Date: Wed, 3 May 2023 19:04:34 +0200 Subject: [PATCH] Use rclcpp events executor --- bitbots_dynup/CMakeLists.txt | 3 --- bitbots_dynup/include/bitbots_dynup/dynup_node.h | 2 +- bitbots_dynup/package.xml | 1 - bitbots_dynup/src/dynup_node.cpp | 2 +- bitbots_hcm/CMakeLists.txt | 2 -- bitbots_hcm/package.xml | 1 - bitbots_hcm/src/hcm.cpp | 6 +++--- bitbots_moveit_bindings/CMakeLists.txt | 2 -- bitbots_moveit_bindings/package.xml | 1 - bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp | 6 +++--- bitbots_odometry/CMakeLists.txt | 3 --- bitbots_odometry/include/bitbots_odometry/motion_odometry.h | 2 +- bitbots_odometry/include/bitbots_odometry/odometry_fuser.h | 2 +- bitbots_odometry/package.xml | 1 - bitbots_odometry/src/motion_odometry.cpp | 2 +- bitbots_odometry/src/odometry_fuser.cpp | 2 +- bitbots_quintic_walk/CMakeLists.txt | 3 --- .../include/bitbots_quintic_walk/walk_node.h | 2 +- bitbots_quintic_walk/package.xml | 1 - bitbots_quintic_walk/src/walk_node.cpp | 2 +- 20 files changed, 14 insertions(+), 32 deletions(-) diff --git a/bitbots_dynup/CMakeLists.txt b/bitbots_dynup/CMakeLists.txt index 2c6d0a7f..244bcdfe 100644 --- a/bitbots_dynup/CMakeLists.txt +++ b/bitbots_dynup/CMakeLists.txt @@ -28,7 +28,6 @@ find_package(tf2_geometry_msgs REQUIRED) find_package(tf2_ros REQUIRED) find_package(Eigen3 REQUIRED) find_package(backward_ros REQUIRED) -find_package(irobot_events_executor REQUIRED) find_package(ros2_python_extension REQUIRED) find_package(pybind11 REQUIRED) @@ -63,7 +62,6 @@ ament_target_dependencies(DynupNode control_msgs control_toolbox geometry_msgs - irobot_events_executor moveit_ros_planning_interface rclcpp ros2_python_extension @@ -92,7 +90,6 @@ ament_target_dependencies(libpy_dynup PUBLIC control_msgs control_toolbox geometry_msgs - irobot_events_executor moveit_ros_planning_interface rclcpp ros2_python_extension diff --git a/bitbots_dynup/include/bitbots_dynup/dynup_node.h b/bitbots_dynup/include/bitbots_dynup/dynup_node.h index 793b1aef..18be5e5d 100644 --- a/bitbots_dynup/include/bitbots_dynup/dynup_node.h +++ b/bitbots_dynup/include/bitbots_dynup/dynup_node.h @@ -9,7 +9,7 @@ #include #include "rclcpp_action/rclcpp_action.hpp" -#include +#include #include #include #include diff --git a/bitbots_dynup/package.xml b/bitbots_dynup/package.xml index 95e10aa4..d5881f52 100644 --- a/bitbots_dynup/package.xml +++ b/bitbots_dynup/package.xml @@ -23,7 +23,6 @@ moveit_ros_move_group bitbots_splines geometry_msgs - irobot_events_executor bitbots_msgs moveit_ros_robot_interaction moveit_ros_planning_interface diff --git a/bitbots_dynup/src/dynup_node.cpp b/bitbots_dynup/src/dynup_node.cpp index 06ae2193..d8472dec 100644 --- a/bitbots_dynup/src/dynup_node.cpp +++ b/bitbots_dynup/src/dynup_node.cpp @@ -408,7 +408,7 @@ int main(int argc, char **argv) { rclcpp::init(argc, argv); // init node auto node = std::make_shared(); - rclcpp::executors::EventsExecutor exec; + rclcpp::experimental::executors::EventsExecutor exec; exec.add_node(node); exec.spin(); diff --git a/bitbots_hcm/CMakeLists.txt b/bitbots_hcm/CMakeLists.txt index 20c7984e..2afd6cc9 100644 --- a/bitbots_hcm/CMakeLists.txt +++ b/bitbots_hcm/CMakeLists.txt @@ -11,7 +11,6 @@ find_package(bitbots_msgs REQUIRED) find_package(builtin_interfaces REQUIRED) find_package(geometry_msgs REQUIRED) find_package(humanoid_league_msgs REQUIRED) -find_package(irobot_events_executor REQUIRED) find_package(pybind11 REQUIRED) find_package(Python3 REQUIRED) find_package(PythonLibs REQUIRED) @@ -36,7 +35,6 @@ ament_target_dependencies(HCM builtin_interfaces geometry_msgs humanoid_league_msgs - irobot_events_executor rclcpp ros2_python_extension sensor_msgs diff --git a/bitbots_hcm/package.xml b/bitbots_hcm/package.xml index 11ef6926..48f0b36c 100644 --- a/bitbots_hcm/package.xml +++ b/bitbots_hcm/package.xml @@ -22,7 +22,6 @@ bitbots_msgs geometry_msgs humanoid_league_msgs - irobot_events_executor pybind11-dev rclpy ros2_python_extension diff --git a/bitbots_hcm/src/hcm.cpp b/bitbots_hcm/src/hcm.cpp index ee5d8d21..fbd7b96a 100644 --- a/bitbots_hcm/src/hcm.cpp +++ b/bitbots_hcm/src/hcm.cpp @@ -13,7 +13,7 @@ #include "builtin_interfaces/msg/time.hpp" #include #include "std_msgs/msg/header.hpp" -#include +#include using std::placeholders::_1; @@ -268,7 +268,7 @@ class HCM_CPP : public rclcpp::Node { }; } // namespace bitbots_hcm -void thread_spin(rclcpp::executors::EventsExecutor::SharedPtr executor){ +void thread_spin(rclcpp::experimental::executors::EventsExecutor::SharedPtr executor){ executor->spin(); } @@ -276,7 +276,7 @@ int main(int argc, char** argv) { rclcpp::init(argc, argv); auto node = std::make_shared(); - rclcpp::executors::EventsExecutor::SharedPtr exec = std::make_shared(); + rclcpp::experimental::executors::EventsExecutor::SharedPtr exec = std::make_shared(); exec->add_node(node); std::thread thread_obj(thread_spin, exec); diff --git a/bitbots_moveit_bindings/CMakeLists.txt b/bitbots_moveit_bindings/CMakeLists.txt index f79d6a14..576c2560 100644 --- a/bitbots_moveit_bindings/CMakeLists.txt +++ b/bitbots_moveit_bindings/CMakeLists.txt @@ -23,7 +23,6 @@ find_package(ros2_python_extension) find_package(tf2 REQUIRED) find_package(tf2_ros REQUIRED) find_package(tf2_kdl REQUIRED) -find_package(irobot_events_executor REQUIRED) find_package(rclcpp REQUIRED) add_compile_options(-Wall -Wno-unused) @@ -47,7 +46,6 @@ ament_target_dependencies(libbitbots_moveit_bindings PUBLIC tf2 tf2_ros tf2_kdl - irobot_events_executor ) ament_python_install_package(${PROJECT_NAME}) diff --git a/bitbots_moveit_bindings/package.xml b/bitbots_moveit_bindings/package.xml index 53c2fd05..3b7312d3 100644 --- a/bitbots_moveit_bindings/package.xml +++ b/bitbots_moveit_bindings/package.xml @@ -18,7 +18,6 @@ moveit_ros_planning_interface pybind11_vendor ros2_python_extension - irobot_events_executor ament_cmake diff --git a/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp b/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp index 684c8162..769f69cd 100644 --- a/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp +++ b/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "rcl_interfaces/srv/get_parameters.hpp" namespace py = pybind11; @@ -88,7 +88,7 @@ class BitbotsMoveitBindings { if (!planning_scene_) { RCLCPP_ERROR_ONCE(node_->get_logger(), "failed to connect to planning scene"); } - exec_ = std::make_shared(); + exec_ = std::make_shared(); exec_->add_node(node_); } @@ -269,7 +269,7 @@ class BitbotsMoveitBindings { planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_; planning_scene::PlanningScenePtr planning_scene_; std::shared_ptr node_; - std::shared_ptr exec_; + std::shared_ptr exec_; std::thread t_; static tf2::Vector3 p(const geometry_msgs::msg::Point& p) { diff --git a/bitbots_odometry/CMakeLists.txt b/bitbots_odometry/CMakeLists.txt index e3b53c82..db10c2cb 100644 --- a/bitbots_odometry/CMakeLists.txt +++ b/bitbots_odometry/CMakeLists.txt @@ -20,7 +20,6 @@ find_package(tf2_ros REQUIRED) find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(Eigen3 REQUIRED) -find_package(irobot_events_executor REQUIRED) include_directories(include) @@ -43,7 +42,6 @@ ament_target_dependencies(motion_odometry sensor_msgs tf2_ros ament_cmake - irobot_events_executor rclcpp) ament_target_dependencies(odometry_fuser @@ -60,7 +58,6 @@ ament_target_dependencies(odometry_fuser tf2_ros ament_cmake rclcpp - irobot_events_executor Eigen3) enable_bitbots_docs() diff --git a/bitbots_odometry/include/bitbots_odometry/motion_odometry.h b/bitbots_odometry/include/bitbots_odometry/motion_odometry.h index 9ff52f1e..7b44cc1e 100644 --- a/bitbots_odometry/include/bitbots_odometry/motion_odometry.h +++ b/bitbots_odometry/include/bitbots_odometry/motion_odometry.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include using std::placeholders::_1; diff --git a/bitbots_odometry/include/bitbots_odometry/odometry_fuser.h b/bitbots_odometry/include/bitbots_odometry/odometry_fuser.h index 9673fa3f..6fd92317 100644 --- a/bitbots_odometry/include/bitbots_odometry/odometry_fuser.h +++ b/bitbots_odometry/include/bitbots_odometry/odometry_fuser.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include using std::placeholders::_1; diff --git a/bitbots_odometry/package.xml b/bitbots_odometry/package.xml index d6005b33..8d09bd8d 100644 --- a/bitbots_odometry/package.xml +++ b/bitbots_odometry/package.xml @@ -23,7 +23,6 @@ rot_conv bitbots_docs biped_interfaces - irobot_events_executor diff --git a/bitbots_odometry/src/motion_odometry.cpp b/bitbots_odometry/src/motion_odometry.cpp index 08e62962..b28efc02 100644 --- a/bitbots_odometry/src/motion_odometry.cpp +++ b/bitbots_odometry/src/motion_odometry.cpp @@ -223,7 +223,7 @@ int main(int argc, char **argv) { rclcpp::Duration timer_duration = rclcpp::Duration::from_seconds(1.0 / 200.0); rclcpp::TimerBase::SharedPtr timer = rclcpp::create_timer(node, node->get_clock(), timer_duration, [node]() -> void {node->loop();}); - rclcpp::executors::EventsExecutor exec; + rclcpp::experimental::executors::EventsExecutor exec; exec.add_node(node); exec.spin(); diff --git a/bitbots_odometry/src/odometry_fuser.cpp b/bitbots_odometry/src/odometry_fuser.cpp index 8ac33a9c..3411af15 100644 --- a/bitbots_odometry/src/odometry_fuser.cpp +++ b/bitbots_odometry/src/odometry_fuser.cpp @@ -249,7 +249,7 @@ void OdometryFuser::imuCallback( int main(int argc, char **argv) { rclcpp::init(argc, argv); auto node = std::make_shared(); - rclcpp::executors::EventsExecutor exec; + rclcpp::experimental::executors::EventsExecutor exec; exec.add_node(node); while(!node->wait_for_tf()){ exec.spin_some(); diff --git a/bitbots_quintic_walk/CMakeLists.txt b/bitbots_quintic_walk/CMakeLists.txt index 0ab4234f..f4bddc50 100644 --- a/bitbots_quintic_walk/CMakeLists.txt +++ b/bitbots_quintic_walk/CMakeLists.txt @@ -19,7 +19,6 @@ find_package(control_toolbox REQUIRED) find_package(generate_parameter_library REQUIRED) find_package(geometry_msgs REQUIRED) find_package(humanoid_league_msgs REQUIRED) -find_package(irobot_events_executor REQUIRED) find_package(moveit_ros_planning_interface REQUIRED) find_package(nav_msgs REQUIRED) find_package(rclcpp REQUIRED) @@ -72,7 +71,6 @@ ament_target_dependencies(WalkNode control_toolbox geometry_msgs humanoid_league_msgs - irobot_events_executor moveit_ros_planning_interface nav_msgs rclcpp @@ -102,7 +100,6 @@ ament_target_dependencies(libpy_quintic_walk PUBLIC control_toolbox geometry_msgs humanoid_league_msgs - irobot_events_executor moveit_ros_planning_interface nav_msgs rclcpp diff --git a/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.h b/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.h index f547ab56..f9bdca41 100644 --- a/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.h +++ b/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.h @@ -41,7 +41,7 @@ The original files can be found at: #include #include #include -#include +#include #include "bitbots_quintic_walk/walk_engine.h" #include "bitbots_quintic_walk/walk_stabilizer.h" diff --git a/bitbots_quintic_walk/package.xml b/bitbots_quintic_walk/package.xml index 0b021c32..ce1f7a3b 100644 --- a/bitbots_quintic_walk/package.xml +++ b/bitbots_quintic_walk/package.xml @@ -33,7 +33,6 @@ generate_parameter_library geometry_msgs humanoid_league_msgs - irobot_events_executor moveit_core moveit_ros_move_group moveit_ros_planning_interface diff --git a/bitbots_quintic_walk/src/walk_node.cpp b/bitbots_quintic_walk/src/walk_node.cpp index 9b984457..8b27651b 100644 --- a/bitbots_quintic_walk/src/walk_node.cpp +++ b/bitbots_quintic_walk/src/walk_node.cpp @@ -637,7 +637,7 @@ int main(int argc, char **argv) { node->initializeEngine(); rclcpp::Duration timer_duration = rclcpp::Duration::from_seconds(1.0 / node->getTimerFreq()); rclcpp::TimerBase::SharedPtr timer = rclcpp::create_timer(node, node->get_clock(), timer_duration, [node]() -> void {node->run();}); - rclcpp::executors::EventsExecutor exec; + rclcpp::experimental::executors::EventsExecutor exec; exec.add_node(node); exec.spin();