Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Use rclcpp events executor #403

Merged
merged 1 commit into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions bitbots_dynup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bitbots_dynup/include/bitbots_dynup/dynup_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <unistd.h>

#include "rclcpp_action/rclcpp_action.hpp"
#include <rclcpp/executors/events_executor/events_executor.hpp>
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>
#include <std_msgs/msg/char.hpp>
#include <sensor_msgs/msg/imu.hpp>
#include <sensor_msgs/msg/joint_state.hpp>
Expand Down
1 change: 0 additions & 1 deletion bitbots_dynup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<depend>moveit_ros_move_group</depend>
<depend>bitbots_splines</depend>
<depend>geometry_msgs</depend>
<depend>irobot_events_executor</depend>
<depend>bitbots_msgs</depend>
<depend>moveit_ros_robot_interaction</depend>
<depend>moveit_ros_planning_interface</depend>
Expand Down
2 changes: 1 addition & 1 deletion bitbots_dynup/src/dynup_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ int main(int argc, char **argv) {
rclcpp::init(argc, argv);
// init node
auto node = std::make_shared<bitbots_dynup::DynupNode>();
rclcpp::executors::EventsExecutor exec;
rclcpp::experimental::executors::EventsExecutor exec;
exec.add_node(node);

exec.spin();
Expand Down
2 changes: 0 additions & 2 deletions bitbots_hcm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -36,7 +35,6 @@ ament_target_dependencies(HCM
builtin_interfaces
geometry_msgs
humanoid_league_msgs
irobot_events_executor
rclcpp
ros2_python_extension
sensor_msgs
Expand Down
1 change: 0 additions & 1 deletion bitbots_hcm/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<depend>bitbots_msgs</depend>
<depend>geometry_msgs</depend>
<depend>humanoid_league_msgs</depend>
<depend>irobot_events_executor</depend>
<depend>pybind11-dev</depend>
<depend>rclpy</depend>
<depend>ros2_python_extension</depend>
Expand Down
6 changes: 3 additions & 3 deletions bitbots_hcm/src/hcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "builtin_interfaces/msg/time.hpp"
#include <ros2_python_extension/serialization.hpp>
#include "std_msgs/msg/header.hpp"
#include <rclcpp/executors/events_executor/events_executor.hpp>
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>


using std::placeholders::_1;
Expand Down Expand Up @@ -268,15 +268,15 @@ 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();
}

int main(int argc, char** argv) {
rclcpp::init(argc, argv);
auto node = std::make_shared<bitbots_hcm::HCM_CPP>();

rclcpp::executors::EventsExecutor::SharedPtr exec = std::make_shared<rclcpp::executors::EventsExecutor>();
rclcpp::experimental::executors::EventsExecutor::SharedPtr exec = std::make_shared<rclcpp::experimental::executors::EventsExecutor>();
exec->add_node(node);
std::thread thread_obj(thread_spin, exec);

Expand Down
2 changes: 0 additions & 2 deletions bitbots_moveit_bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
Expand Down
1 change: 0 additions & 1 deletion bitbots_moveit_bindings/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<depend>moveit_ros_planning_interface</depend>
<depend>pybind11_vendor</depend>
<depend>ros2_python_extension</depend>
<depend>irobot_events_executor</depend>
<export>

<build_type>ament_cmake</build_type>
Expand Down
6 changes: 3 additions & 3 deletions bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <rclcpp/rclcpp.hpp>
#include <ros2_python_extension/serialization.hpp>
#include <tf2_eigen/tf2_eigen.hpp>
#include <rclcpp/executors/events_executor/events_executor.hpp>
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>

#include "rcl_interfaces/srv/get_parameters.hpp"
namespace py = pybind11;
Expand Down Expand Up @@ -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<rclcpp::executors::EventsExecutor>();
exec_ = std::make_shared<rclcpp::experimental::executors::EventsExecutor>();
exec_->add_node(node_);
}

Expand Down Expand Up @@ -269,7 +269,7 @@ class BitbotsMoveitBindings {
planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_;
planning_scene::PlanningScenePtr planning_scene_;
std::shared_ptr<rclcpp::Node> node_;
std::shared_ptr<rclcpp::executors::EventsExecutor> exec_;
std::shared_ptr<rclcpp::experimental::executors::EventsExecutor> exec_;
std::thread t_;

static tf2::Vector3 p(const geometry_msgs::msg::Point& p) {
Expand Down
3 changes: 0 additions & 3 deletions bitbots_odometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -43,7 +42,6 @@ ament_target_dependencies(motion_odometry
sensor_msgs
tf2_ros
ament_cmake
irobot_events_executor
rclcpp)

ament_target_dependencies(odometry_fuser
Expand All @@ -60,7 +58,6 @@ ament_target_dependencies(odometry_fuser
tf2_ros
ament_cmake
rclcpp
irobot_events_executor
Eigen3)

enable_bitbots_docs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <biped_interfaces/msg/phase.hpp>
#include <unistd.h>
#include <tf2_ros/buffer.h>
#include <rclcpp/executors/events_executor/events_executor.hpp>
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>

using std::placeholders::_1;

Expand Down
2 changes: 1 addition & 1 deletion bitbots_odometry/include/bitbots_odometry/odometry_fuser.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <message_filters/sync_policies/approximate_time.h>
#include <biped_interfaces/msg/phase.hpp>
#include <unistd.h>
#include <rclcpp/executors/events_executor/events_executor.hpp>
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>

using std::placeholders::_1;

Expand Down
1 change: 0 additions & 1 deletion bitbots_odometry/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<depend>rot_conv</depend>
<depend>bitbots_docs</depend>
<depend>biped_interfaces</depend>
<depend>irobot_events_executor</depend>

<export>
<bitbots_documentation>
Expand Down
2 changes: 1 addition & 1 deletion bitbots_odometry/src/motion_odometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion bitbots_odometry/src/odometry_fuser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void OdometryFuser::imuCallback(
int main(int argc, char **argv) {
rclcpp::init(argc, argv);
auto node = std::make_shared<OdometryFuser>();
rclcpp::executors::EventsExecutor exec;
rclcpp::experimental::executors::EventsExecutor exec;
exec.add_node(node);
while(!node->wait_for_tf()){
exec.spin_some();
Expand Down
3 changes: 0 additions & 3 deletions bitbots_quintic_walk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The original files can be found at:
#include <moveit/robot_model_loader/robot_model_loader.h>
#include <moveit/kinematics_base/kinematics_base.h>
#include <moveit/move_group_interface/move_group_interface.h>
#include <rclcpp/executors/events_executor/events_executor.hpp>
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>

#include "bitbots_quintic_walk/walk_engine.h"
#include "bitbots_quintic_walk/walk_stabilizer.h"
Expand Down
1 change: 0 additions & 1 deletion bitbots_quintic_walk/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<depend>generate_parameter_library</depend>
<depend>geometry_msgs</depend>
<depend>humanoid_league_msgs</depend>
<depend>irobot_events_executor</depend>
<depend>moveit_core</depend>
<depend>moveit_ros_move_group</depend>
<depend>moveit_ros_planning_interface</depend>
Expand Down
2 changes: 1 addition & 1 deletion bitbots_quintic_walk/src/walk_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down