-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix api differences on executors in ROS2 humble #42
base: fix/humble-compatibility
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -51,14 +51,14 @@ struct Node : public RTT::Service | |||||
virtual ~Node(); | ||||||
|
||||||
rclcpp::Node::SharedPtr node() {return node_;} | ||||||
rclcpp::executor::Executor::SharedPtr executor() {return executor_;} | ||||||
rclcpp::Executor::Executor::SharedPtr executor() {return executor_;} | ||||||
|
||||||
void spin(unsigned int number_of_threads = 1); | ||||||
void cancel(); | ||||||
|
||||||
protected: | ||||||
rclcpp::Node::SharedPtr node_; | ||||||
rclcpp::executor::Executor::SharedPtr executor_; | ||||||
rclcpp::Executor::Executor::SharedPtr executor_; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
std::thread thread_; | ||||||
}; | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -74,7 +74,7 @@ static void loadGlobalROSService() | |||||||||||||
|
||||||||||||||
// Call rclcpp::init() | ||||||||||||||
rclcpp::InitOptions init_options; | ||||||||||||||
init_options.shutdown_on_sigint = false; | ||||||||||||||
init_options.shutdown_on_signal = false; | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This flag was renamed in version 13.1.0 of rclcpp (ros2/rclcpp#1771), so only since ROS 2 Humble. Even though Galactic and older have reached their end-of-life already, I suggest to add a preprocessor condition in this case, to still support older ROS versions without having to maintain multiple branches. Something like
Suggested change
and #include "rclcpp/version.h" above should do. |
||||||||||||||
RTT::log(RTT::Info) << | ||||||||||||||
"Initializing ROS context with " << __os_main_argc() << " command-line arguments." << | ||||||||||||||
RTT::endlog(); | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
namespace executor
was deprecated since ros2/rclcpp#1083 and removed in ros2/rclcpp#1622, so all ROS 2 versions since Foxy. So probably fine to drop support of older versions. Same forrclcpp::ExecutorOptions
below.But I don't see how
rclcpp::Executor::Executor::SharedPtr
should work?rclcpp::Executor::Executor
would refer to the constructor of classrclcpp::Executor
, no?