-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Path trackin conditon node #5602
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: main
Are you sure you want to change the base?
Path trackin conditon node #5602
Conversation
|
@silanus23, your PR has failed to build. Please check CI outputs and resolve issues. |
...ee/include/nav2_behavior_tree/plugins/condition/is_within_path_tracking_bounds_condition.hpp
Outdated
Show resolved
Hide resolved
| <input_port name="battery_topic">Topic for battery info</input_port> | ||
| </Condition> | ||
|
|
||
| <Decorator ID="IsWithinPathTrackingBounds"> |
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.
For docs: this needs to be having its configuration guide page + add to Navigation Plugins table + migration guide with the larger feature description
nav2_behavior_tree/plugins/condition/is_within_path_tracking_bounds_condition.cpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/condition/is_within_path_tracking_bounds_condition.cpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/condition/is_within_path_tracking_bounds_condition.cpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/condition/is_within_path_tracking_bounds_condition.cpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/condition/is_within_path_tracking_bounds_condition.cpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/condition/is_within_path_tracking_bounds_condition.cpp
Show resolved
Hide resolved
Signed-off-by: silanus23 <[email protected]>
Signed-off-by: silanus23 <[email protected]>
Signed-off-by: silanus23 <[email protected]>
Signed-off-by: silanus23 <[email protected]>
Signed-off-by: silanus23 <[email protected]>
Signed-off-by: silanus23 <[email protected]>
61389fd to
3ea85d8
Compare
Signed-off-by: silanus23 <[email protected]>
Codecov Report❌ Patch coverage is
... and 10 files 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.
My sincere apologoes for the gross delay - ROSCon + vacation + time to get back to speed meant that some things didn't get my time until today. Overall this looks great and its just small quibbles and we should be able to merge this soon!
Can this be moved from a draft? Did you test this to work well?
For docs: this needs to be having its configuration guide page + add to Navigation Plugins table + migration guide with the larger feature description
+ if (!getInput("max_error_left", max_error_left_)) {
+ RCLCPP_ERROR(logger_, "max_error_left parameter not provided");
+ return BT::NodeStatus::FAILURE;
+ }
+
+ if (max_error_left_ < 0.0) {
+ RCLCPP_WARN(logger_, "max_error_left should be positive, using absolute value");
+ max_error_left_ = std::abs(max_error_left_);
+ }
+
+ if (!getInput("max_error_right", max_error_right_)) {
+ RCLCPP_ERROR(logger_, "max_error_right parameter not provided");
+ return BT::NodeStatus::FAILURE;
+ }
+
+ if (max_error_right_ < 0.0) {
+ RCLCPP_WARN(logger_, "max_error_right should be positive, using absolute value");
+ max_error_right_ = std::abs(max_error_right_);
+ }
These lines should be covered in tests
| : BT::ConditionNode(condition_name, conf), | ||
| last_error_(std::numeric_limits<double>::max()) | ||
| { | ||
| auto node = config().blackboard->get<nav2::LifecycleNode::SharedPtr>("node"); |
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.
Set logger_ = node->get_logger();
| rclcpp::Logger logger_{rclcpp::get_logger("is_within_path_tracking_bounds_node")}; | ||
| rclcpp::CallbackGroup::SharedPtr callback_group_; | ||
| rclcpp::executors::SingleThreadedExecutor callback_group_executor_; | ||
| rclcpp::Subscription<nav2_msgs::msg::TrackingFeedback>::SharedPtr tracking_feedback_sub_; |
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.
Use nav2::Subscription
| }; | ||
| } | ||
|
|
||
| private: |
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.
| private: | |
| protected: |
| double max_error_left_{1.5}; | ||
| std::chrono::milliseconds bt_loop_duration_; | ||
|
|
||
| void trackingFeedbackCallback(const nav2_msgs::msg::TrackingFeedback::SharedPtr msg); |
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.
Move this before the variables; all methods before all variables please. Also needs doxygen documentation for the API
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
BT node addition
max_error parameter
If there is a document for it maybe upcoming xml
Description of how this change was tested
I tried to take inspiration from is_battery_low condition node. I created unit tests too.
Future work that may be required in bullet points
place this in navigating path through pose xml.
Note:
I had to take out every file with copy paste to a new branch. Cause I had created this branch as a sub branch of the last messy branch. This was the only clean choice that can save me.
I think this will solve my cycling comments and confused commits problem.
For Maintainers: