-
Notifications
You must be signed in to change notification settings - Fork 1.6k
TwistSubscriber: add constructor using NodeInterfaces #5355
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
base: jazzy
Are you sure you want to change the base?
TwistSubscriber: add constructor using NodeInterfaces #5355
Conversation
…th non-lifecycle nodes Signed-off-by: Jonas Otto <[email protected]>
a790049
to
f0b0be6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
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.
@ottojo heed the cpplint failing job
return output; | ||
} | ||
|
||
void declare_parameter_if_not_declared( |
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.
Please put this in the new nav2_ros_common
package where the other parameter utilities are relocated
qos, | ||
std::forward<TwistStampedCallbackT>(TwistStampedCallback)); | ||
twist_stamped_sub_ = | ||
rclcpp::create_subscription<geometry_msgs::msg::TwistStamped>( |
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.
Must use node->
per https://docs.nav2.org/migration/Kilted.html#new-nav2-ros-common-nav2-lifecycle-node or nav2_ros_common::interfaces::create_subscription
@ottojo these comments are more aligned with the |
This adds constructors using NodeInterfaces to TwistSubscriber. This allows use outside of nav2 with non-lifecycle nodes. It would also allow use in places where NodeInterfaces are already used, or places where a node handle is available in any other form than
shared_ptr<LifecycleNode>
.Basic Info
Description of contribution in a few bullet points
declare_parameter_if_not_declared
(used in ctor)Description of documentation updates required from your changes
Description of how this change was tested
Future work that may be required in bullet points
For Maintainers:
backport-*
.