Skip to content
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

Staticial replanning #3100

Draft
wants to merge 132 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
8cfe20f
statistical prototype
SteveMacenski Jun 15, 2022
beeb427
fixed two sample z-test
jwallace42 Jul 25, 2022
f697654
fixed 2 sample z test
jwallace42 Jul 25, 2022
7a14c46
rolling issue
jwallace42 Jul 25, 2022
10445f1
navfn produces costs
jwallace42 Jul 25, 2022
146ca55
complete updates
jwallace42 Aug 3, 2022
c1a499f
Revert "rolling issue"
jwallace42 Aug 5, 2022
5108c97
Revert "navfn produces costs"
jwallace42 Aug 5, 2022
827a0ba
adding plugin type for static in local + removing unused print (#3021)
SteveMacenski Jun 16, 2022
8ba8848
removed extra includes (#3026)
jwallace42 Jun 19, 2022
b7a13d3
remove extra sub (#3025)
jwallace42 Jun 19, 2022
ef0102b
Fix missing dependency on nav2_velocity_smoother (#3031)
hodnajit Jun 21, 2022
21d36bf
adding timeout for action client initialization (#3029)
vinnnyr Jun 22, 2022
2672bd1
- Modified findVelocitySignChange method to transform cusp into robot…
stevenbrills Jun 23, 2022
9e6be2e
cleanup warnings (#3028)
jwallace42 Jun 23, 2022
5f2eede
Update mergify.yml
SteveMacenski Jun 24, 2022
9c08a05
Draft: Added GoalUpdatedController BT plugin node (#3044)
relffok Jun 28, 2022
6a5165b
installing plugins folder of nav2_behaviors package (#3051)
SrijaneeBiswas Jun 28, 2022
e63eae1
Completed PR 2929 (#3038)
SteveMacenski Jun 30, 2022
02a8dab
zero z values in rpp transformed plan (#3066)
Aposhian Jul 8, 2022
84cd1d8
forward porting #3053 (#3064)
SteveMacenski Jul 11, 2022
1dd5d27
removing get node options default for nav2 utils (#3073)
SteveMacenski Jul 12, 2022
d40dcd6
adding looping timeout for lifecycle service clients + adding string …
SteveMacenski Jul 12, 2022
b15367f
Smac Planner 2D changes (#3083)
SteveMacenski Jul 20, 2022
35df8e6
Collision monitor (#2982)
AlexeyMerzlyakov Jul 20, 2022
252d844
removing the extra argument in class dec (#3084)
padhupradheep Jul 21, 2022
e8047ce
Fix for #3078, fix image path in YAML (#3082)
nakai-omer Jul 21, 2022
ffa0061
do not depend on velocity for approach scaling (#3047)
Aposhian Jul 21, 2022
ee06ded
Use correct timeout when checking future (#3087)
samiamlabs Jul 22, 2022
5cba027
Adds missing commas so default plugin names are not stuck together (#…
aaronchongth Aug 17, 2022
232d665
Fix Costmap Filters system tests (#3120)
SteveMacenski Aug 18, 2022
289a686
Finding distance H if obstacle H is <= 0 (#3122)
SteveMacenski Aug 18, 2022
e1830c9
Removed additional sign multiplication (#3088)
automech-rb Aug 19, 2022
aab082e
adding checks on goal IDs in results for waypoint follower (#3130)
SteveMacenski Aug 19, 2022
c9bab4d
Update nav2_multirobot_params_1.yaml
SteveMacenski Aug 22, 2022
72b5348
Update nav2_multirobot_params_2.yaml
SteveMacenski Aug 22, 2022
42b5bc8
ComputePathToPose Sets empty path on blackboard if action is aborted …
jwallace42 Aug 22, 2022
ca48a4d
Ignore feedback from old goals in waypoint follower (#3139)
pepisg Aug 22, 2022
6fdcfc1
apply joinchar in pathify (#3141)
ladianchad Aug 23, 2022
d4886a7
Log level (#3110)
jwallace42 Aug 23, 2022
676fe71
linting and uncrusitfy fixes for CI (#3144)
jwallace42 Aug 23, 2022
34524ed
start is now added to the path (#3140)
jwallace42 Aug 23, 2022
11285ea
Update README.md (#3147)
austin-InDro Aug 24, 2022
074e3e1
fixing linting problem
SteveMacenski Aug 24, 2022
7a6b11d
Setting map map's yaml path to empty string, since overridden in laun…
SteveMacenski Aug 24, 2022
344ac1c
use_sim_time refactoring (#3131)
Aug 25, 2022
2b34405
standalone assisted teleop (#2904)
jwallace42 Aug 25, 2022
1022f02
Add the support of range sensors to Collision Monitor (#3099)
AlexeyMerzlyakov Aug 26, 2022
7a18064
Fix #3152: Costmap extend did not include Y component (#3153)
SteveMacenski Aug 26, 2022
3360f18
missing nodes added to nav2_tree_nodes.xml (#3155)
enesbedir1 Aug 27, 2022
12b45f5
Change deprecated ceres function (#3158)
Tobias-Fischer Aug 30, 2022
79c73f6
remove camera_rgb_joint since child frame does not exist (#3162)
ipa-kut Aug 31, 2022
c5e4d1b
bugfix (#3109) deadlock when costmap receives new map (#3145)
daisukes Aug 31, 2022
78ed712
simple command costmap api - first few functions (#3159)
stevedanomodolor Aug 31, 2022
908a765
Fix missing dependency on nav2_collision_monitor (#3175)
fantalukas Sep 6, 2022
f424310
fixed start (#3168)
jwallace42 Sep 6, 2022
8ce0ead
Fix velocities comparison for rotation at place case (#3177)
AlexeyMerzlyakov Sep 9, 2022
72da017
set a empty path on halt (#3178)
jwallace42 Sep 9, 2022
7eeb91e
simple command costmap api - update few functions (#3169)
JacksonK9 Sep 12, 2022
9cbaf1a
clear names for bt nodes (#3183)
jwallace42 Sep 12, 2022
48ca6e1
[Smac] check if a node exists before creating (#3195)
SteveMacenski Sep 16, 2022
278f896
fixing benchmarkign for planners (#3202)
SteveMacenski Sep 19, 2022
5ae4b73
[Smac] Robin hood data structure improves performance by 10-15%! (#3201)
SteveMacenski Sep 20, 2022
f896415
[RPP] Add parameter to enable/disable collision detection (#3204)
fantalukas Sep 21, 2022
e853746
Update waffle.model
SteveMacenski Sep 21, 2022
c6bd5c5
Add a min_obstacle_height param to the nav2_costmap_2d's ObstacleLaye…
milidam Sep 22, 2022
f2713f7
add benchmark launch file + instructions (#3218)
SteveMacenski Sep 22, 2022
b45381d
removing hypotf from smac planner heuristic computation (#3217)
SteveMacenski Sep 22, 2022
1b24e28
complete smac planner tolerances (#3219)
SteveMacenski Sep 23, 2022
810f076
Disable Output Buffering (#3220)
ruffsl Sep 23, 2022
83f8b4f
fix majority of python linting errors introduced in python costmap AP…
SteveMacenski Sep 23, 2022
c1f837d
Add new constructor to cosmtap2DROS (#3222)
Sep 26, 2022
8df3c5d
Assisted teleop simple commander (#3198)
jwallace42 Sep 26, 2022
92dd352
added result codes for global planner (#3146)
jwallace42 Sep 28, 2022
53a6af5
Fix RMW deprecation warnings (#3226)
AndyZe Sep 30, 2022
3727175
Costmap Filter enabling service (#3229)
AlexeyMerzlyakov Oct 5, 2022
bd715a5
Fixing Ogre deprecation build warning
SteveMacenski Oct 5, 2022
185b7af
Add binary flip costmap filter (#3228)
AlexeyMerzlyakov Oct 10, 2022
81811e2
Update waffle.model
SteveMacenski Oct 11, 2022
b908b53
Revert "added result codes for global planner (#3146)" (#3237)
SteveMacenski Oct 11, 2022
b1922b6
Update waffle.model
SteveMacenski Oct 11, 2022
a96301c
Update test_actions.cpp
SteveMacenski Oct 11, 2022
5fe3345
odom alpha restriction to avoid overflow caused by user-misconfigurat…
Cryst4L9527 Oct 11, 2022
95fbd23
Expections (#3244)
jwallace42 Oct 12, 2022
4b54dfd
Update controller server goal checker (#3240)
NicolasRochaPacheco Oct 12, 2022
5d85e3f
map-size restriction to avoid overflow and nullptr caused by user-mis…
Cryst4L9527 Oct 14, 2022
aeec74a
Add Path Smoothers Benchmarking suite (#3236)
AlexeyMerzlyakov Oct 14, 2022
e7d4d98
Controller exceptions (#3227)
jwallace42 Oct 14, 2022
9b74dd0
CostmapLayer::matchSize may be executed concurrently (#3250)
Cryst4L9527 Oct 24, 2022
338e93e
Fix typo (#3262)
woawo1213 Nov 1, 2022
a94fdc4
Adding new Nav2 Smoother: Savitzky-Golay Smoother (#3264)
SteveMacenski Nov 3, 2022
c8053e3
refactoring RPP a bit for cleanliness on way to ROSCon (#3265)
SteveMacenski Nov 3, 2022
5161f7d
exceptions for compute path through poses (#3248)
jwallace42 Nov 3, 2022
80bd879
Reclaim Our CI Coverage from the Lords of Painful Subtle Regressions …
SteveMacenski Nov 3, 2022
607019c
Added Line Iterator (#3197)
afifswaidan Nov 7, 2022
d81cc62
Use SetParameter Launch API to set the yaml filename for map_server (…
stevedanomodolor Nov 7, 2022
ad5aa20
adding reconfigure test to thetastar (#3275)
padhupradheep Nov 9, 2022
ae268d8
Check for range_max of laserscan in updateFilter to avoid a implicit …
Cryst4L9527 Nov 10, 2022
61a967c
BT Service Node to throw if service was not available in time (#3256)
guilyx Nov 11, 2022
6d325e3
remove exec_depend on behaviortree_cpp_v3 (#3279)
Aposhian Nov 11, 2022
9b4bdde
add parameterized refinement recursion numbers in Smac Planner Smooth…
SteveMacenski Nov 15, 2022
a13d642
Add allow_unknown parameter to theta star planner (#3286)
pepisg Nov 16, 2022
95c951d
Include test cases waypoint follwer (#3288)
stevedanomodolor Nov 16, 2022
ab5dcd9
Dynamically changing polygons support (#3245)
AlexeyMerzlyakov Nov 17, 2022
1f74b4d
adding getCostScalingFactor (#3290)
SteveMacenski Nov 17, 2022
94fde9e
Implemented smoother selector bt node (#3283)
owen7900 Nov 18, 2022
cb391ed
Pipe error codes (#3251)
jwallace42 Nov 18, 2022
1a5313a
Solve bug when CostmapInfoServer is reactivated (#3292)
MartiBolet Nov 20, 2022
c415c76
Smoothness metrics update (#3294)
AlexeyMerzlyakov Nov 20, 2022
806bc68
preempt/cancel test for time behavior, spin pluguin (#3301)
stevedanomodolor Nov 29, 2022
6202f57
Migrate to createTreeFromFile for loading BTs (#3306)
SteveMacenski Dec 1, 2022
5c27a3e
update comment (#3309)
jwallace42 Dec 5, 2022
7c88750
Added a flag to not send goal in BtActionNode (#3293)
owen7900 Dec 5, 2022
6143295
Ensure that plugin initialization to be called before updating routin…
AlexeyMerzlyakov Dec 6, 2022
c119017
Make mapUpdateLoop() indicator variables to be thread-safe (#3308)
AlexeyMerzlyakov Dec 6, 2022
fe776fb
Fix Wrong Map Pointer (#3311) (#3315)
borongyuan Dec 6, 2022
bd3afbc
Add ability to publish layers of the costmap (#3254)
jwallace42 Dec 8, 2022
03876ea
Revert "Add ability to publish layers of the costmap (#3254)" (#3319)
SteveMacenski Dec 8, 2022
5e16d10
Publish layers (#3320)
jwallace42 Dec 9, 2022
fe9519d
Smoother error codes (#3296)
jwallace42 Dec 9, 2022
7f41234
fix (#3321)
jwallace42 Dec 10, 2022
6b02da4
rebase
Dec 14, 2022
e32431c
Revert "rolling issue"
jwallace42 Aug 5, 2022
d50a2d1
added Path with cost message
Dec 14, 2022
6664b93
switch to PathWithCost
Dec 14, 2022
dad593f
Merge branch 'main' into staticial_replanning
Dec 14, 2022
444b506
fix
Dec 14, 2022
5f08d1f
able to open in rviz
Dec 15, 2022
f3b3dc6
path with cost display working with new message type
Dec 16, 2022
0903d22
updates
Dec 19, 2022
acb0458
code review
Dec 20, 2022
27adc55
initial tests for path validator
Dec 21, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ComputePathThroughPosesAction
BT::InputPort<std::string>(
"planner_id", "",
"Mapped name to the planner plugin type to use"),
BT::OutputPort<nav_msgs::msg::Path>("path", "Path created by ComputePathThroughPoses node"),
BT::OutputPort<nav2_msgs::msg::PathWithCost>("path", "Path created by ComputePathThroughPoses node"),
BT::OutputPort<ActionResult::_error_code_type>(
"error_code_id", "The compute path through poses error code"),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string>

#include "nav2_msgs/action/compute_path_to_pose.hpp"
#include "nav_msgs/msg/path.h"
#include "nav2_msgs/msg/path_with_cost.hpp"
#include "nav2_behavior_tree/bt_action_node.hpp"

namespace nav2_behavior_tree
Expand Down Expand Up @@ -84,7 +84,7 @@ class ComputePathToPoseAction : public BtActionNode<nav2_msgs::action::ComputePa
BT::InputPort<std::string>(
"planner_id", "",
"Mapped name to the planner plugin type to use"),
BT::OutputPort<nav_msgs::msg::Path>("path", "Path created by ComputePathToPose node"),
BT::OutputPort<nav2_msgs::msg::PathWithCost>("path", "Path created by ComputePathToPose node"),
BT::OutputPort<ActionResult::_error_code_type>(
"error_code_id", "The compute path to pose error code"),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class FollowPathAction : public BtActionNode<nav2_msgs::action::FollowPath>
{
return providedBasicPorts(
{
BT::InputPort<nav_msgs::msg::Path>("path", "Path to follow"),
BT::InputPort<nav2_msgs::msg::PathWithCost>("path", "Path to follow"),
BT::InputPort<std::string>("controller_id", ""),
BT::InputPort<std::string>("goal_checker_id", ""),
BT::OutputPort<ActionResult::_error_code_type>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string>

#include "nav2_msgs/action/smooth_path.hpp"
#include "nav_msgs/msg/path.h"
#include "nav2_msgs/msg/path_with_cost.hpp"
#include "nav2_behavior_tree/bt_action_node.hpp"

namespace nav2_behavior_tree
Expand Down Expand Up @@ -74,13 +74,13 @@ class SmoothPathAction : public nav2_behavior_tree::BtActionNode<nav2_msgs::acti
{
return providedBasicPorts(
{
BT::InputPort<nav_msgs::msg::Path>("unsmoothed_path", "Path to be smoothed"),
BT::InputPort<nav2_msgs::msg::PathWithCost>("unsmoothed_path", "Path to be smoothed"),
BT::InputPort<double>("max_smoothing_duration", 3.0, "Maximum smoothing duration"),
BT::InputPort<bool>(
"check_for_collisions", false,
"If true collision check will be performed after smoothing"),
BT::InputPort<std::string>("smoother_id", ""),
BT::OutputPort<nav_msgs::msg::Path>(
BT::OutputPort<nav2_msgs::msg::PathWithCost>(
"smoothed_path",
"Path smoothed by SmootherServer node"),
BT::OutputPort<double>("smoothing_duration", "Time taken to smooth path"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <memory>
#include <string>

#include "nav_msgs/msg/path.hpp"
#include "nav2_msgs/msg/path_with_cost.hpp"

#include "behaviortree_cpp_v3/action_node.h"

Expand Down Expand Up @@ -48,8 +48,8 @@ class TruncatePath : public BT::ActionNodeBase
static BT::PortsList providedPorts()
{
return {
BT::InputPort<nav_msgs::msg::Path>("input_path", "Original Path"),
BT::OutputPort<nav_msgs::msg::Path>("output_path", "Path truncated to a certain distance"),
BT::InputPort<nav2_msgs::msg::PathWithCost>("input_path", "Original Path"),
BT::OutputPort<nav2_msgs::msg::PathWithCost>("output_path", "Path truncated to a certain distance"),
BT::InputPort<double>("distance", 1.0, "distance"),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string>
#include <limits>

#include "nav_msgs/msg/path.hpp"
#include "nav2_msgs/msg/path_with_cost.hpp"

#include "behaviortree_cpp_v3/action_node.h"
#include "tf2_ros/buffer.h"
Expand Down Expand Up @@ -50,8 +50,8 @@ class TruncatePathLocal : public BT::ActionNodeBase
static BT::PortsList providedPorts()
{
return {
BT::InputPort<nav_msgs::msg::Path>("input_path", "Original Path"),
BT::OutputPort<nav_msgs::msg::Path>(
BT::InputPort<nav2_msgs::msg::PathWithCost>("input_path", "Original Path"),
BT::OutputPort<nav2_msgs::msg::PathWithCost>(
"output_path", "Path truncated to a certain distance around robot"),
BT::InputPort<double>(
"distance_forward", 8.0,
Expand Down Expand Up @@ -115,8 +115,8 @@ class TruncatePathLocal : public BT::ActionNodeBase

std::shared_ptr<tf2_ros::Buffer> tf_buffer_;

nav_msgs::msg::Path path_;
nav_msgs::msg::Path::_poses_type::iterator closest_pose_detection_begin_;
nav2_msgs::msg::PathWithCost path_;
nav2_msgs::msg::PathWithCost::_poses_type::iterator closest_pose_detection_begin_;
};

} // namespace nav2_behavior_tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ class IsPathValidCondition : public BT::ConditionNode
static BT::PortsList providedPorts()
{
return {
BT::InputPort<nav_msgs::msg::Path>("path", "Path to Check"),
BT::InputPort<std::chrono::milliseconds>("server_timeout")
BT::InputPort<nav2_msgs::msg::PathWithCost>("path", "Path to Check"),
BT::InputPort<std::chrono::milliseconds>("server_timeout"),
BT::InputPort<bool>("consider_cost_change", true, "Consider cost changes")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to groot XML for people using it to build trees to have the option exposed

};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "rclcpp/rclcpp.hpp"
#include "behaviortree_cpp_v3/condition_node.h"
#include "nav_msgs/msg/path.hpp"
#include "nav2_msgs/msg/path_with_cost.hpp"

namespace nav2_behavior_tree
{
Expand Down Expand Up @@ -56,14 +56,14 @@ class PathExpiringTimerCondition : public BT::ConditionNode
{
return {
BT::InputPort<double>("seconds", 1.0, "Seconds"),
BT::InputPort<nav_msgs::msg::Path>("path")
BT::InputPort<nav2_msgs::msg::PathWithCost>("path")
};
}

private:
rclcpp::Node::SharedPtr node_;
rclcpp::Time start_;
nav_msgs::msg::Path prev_path_;
nav2_msgs::msg::PathWithCost prev_path_;
double period_;
bool first_time_;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <limits>

#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav_msgs/msg/path.hpp"
#include "nav2_msgs/msg/path_with_cost.hpp"
#include "behaviortree_cpp_v3/decorator_node.h"
#include "rclcpp/rclcpp.hpp"

Expand Down Expand Up @@ -50,7 +50,7 @@ class PathLongerOnApproach : public BT::DecoratorNode
static BT::PortsList providedPorts()
{
return {
BT::InputPort<nav_msgs::msg::Path>("path", "Planned Path"),
BT::InputPort<nav2_msgs::msg::PathWithCost>("path", "Planned Path"),
BT::InputPort<double>(
"prox_len", 3.0,
"Proximity length (m) for the path to be longer on approach"),
Expand All @@ -74,8 +74,8 @@ class PathLongerOnApproach : public BT::DecoratorNode
* @return whether the path is updated for the current goal
*/
bool isPathUpdated(
nav_msgs::msg::Path & new_path,
nav_msgs::msg::Path & old_path);
nav2_msgs::msg::PathWithCost & new_path,
nav2_msgs::msg::PathWithCost & old_path);

/**
* @brief Checks if the robot is in the goal proximity
Expand All @@ -84,7 +84,7 @@ class PathLongerOnApproach : public BT::DecoratorNode
* @return whether the robot is in the goal proximity
*/
bool isRobotInGoalProximity(
nav_msgs::msg::Path & old_path,
nav2_msgs::msg::PathWithCost & old_path,
double & prox_leng);

/**
Expand All @@ -95,13 +95,13 @@ class PathLongerOnApproach : public BT::DecoratorNode
* @return whether the new path is longer
*/
bool isNewPathLonger(
nav_msgs::msg::Path & new_path,
nav_msgs::msg::Path & old_path,
nav2_msgs::msg::PathWithCost & new_path,
nav2_msgs::msg::PathWithCost & old_path,
double & length_factor);

private:
nav_msgs::msg::Path new_path_;
nav_msgs::msg::Path old_path_;
nav2_msgs::msg::PathWithCost new_path_;
nav2_msgs::msg::PathWithCost old_path_;
double prox_len_ = std::numeric_limits<double>::max();
double length_factor_ = std::numeric_limits<double>::max();
rclcpp::Node::SharedPtr node_;
Expand Down
1 change: 1 addition & 0 deletions nav2_behavior_tree/nav2_tree_nodes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
<Condition ID="IsPathValid">
<input_port name="path"> Path to validate </input_port>
<input_port name="server_timeout"> Server timeout </input_port>
<input_port name="consider_cost_change"> Check for significant cost change</input_port>
</Condition>

<!-- ############################### CONTROL NODES ################################ -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ BT::NodeStatus ComputePathThroughPosesAction::on_success()

BT::NodeStatus ComputePathThroughPosesAction::on_aborted()
{
nav_msgs::msg::Path empty_path;
nav2_msgs::msg::PathWithCost empty_path;
setOutput("path", empty_path);
setOutput("error_code_id", result_.result->error_code);
return BT::NodeStatus::FAILURE;
}

BT::NodeStatus ComputePathThroughPosesAction::on_cancelled()
{
nav_msgs::msg::Path empty_path;
nav2_msgs::msg::PathWithCost empty_path;
setOutput("path", empty_path);
// Set empty error code, action was cancelled
setOutput("error_code_id", ActionGoal::NONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ BT::NodeStatus ComputePathToPoseAction::on_success()

BT::NodeStatus ComputePathToPoseAction::on_aborted()
{
nav_msgs::msg::Path empty_path;
nav2_msgs::msg::PathWithCost empty_path;
setOutput("path", empty_path);
setOutput("error_code_id", result_.result->error_code);
return BT::NodeStatus::FAILURE;
}

BT::NodeStatus ComputePathToPoseAction::on_cancelled()
{
nav_msgs::msg::Path empty_path;
nav2_msgs::msg::PathWithCost empty_path;
setOutput("path", empty_path);
// Set empty error code, action was cancelled
setOutput("error_code_id", ActionGoal::NONE);
Expand All @@ -64,7 +64,7 @@ BT::NodeStatus ComputePathToPoseAction::on_cancelled()

void ComputePathToPoseAction::halt()
{
nav_msgs::msg::Path empty_path;
nav2_msgs::msg::PathWithCost empty_path;
setOutput("path", empty_path);
BtActionNode::halt();
}
Expand Down
2 changes: 1 addition & 1 deletion nav2_behavior_tree/plugins/action/follow_path_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void FollowPathAction::on_wait_for_result(
std::shared_ptr<const Action::Feedback>/*feedback*/)
{
// Grab the new path
nav_msgs::msg::Path new_path;
nav2_msgs::msg::PathWithCost new_path;
getInput("path", new_path);

// Check if it is not same with the current one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <memory>
#include <limits>

#include "nav_msgs/msg/path.hpp"
#include "nav2_msgs/msg/path_with_cost.hpp"
#include "nav2_util/geometry_utils.hpp"

#include "nav2_behavior_tree/plugins/action/remove_passed_goals_action.hpp"
Expand Down
5 changes: 2 additions & 3 deletions nav2_behavior_tree/plugins/action/truncate_path_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

#include <string>
#include <memory>
#include <limits>

#include "nav_msgs/msg/path.hpp"
#include "nav2_msgs/msg/path_with_cost.hpp"
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/geometry_utils.hpp"
#include "behaviortree_cpp_v3/decorator_node.h"
Expand All @@ -40,7 +39,7 @@ inline BT::NodeStatus TruncatePath::tick()
{
setStatus(BT::NodeStatus::RUNNING);

nav_msgs::msg::Path input_path;
nav2_msgs::msg::PathWithCost input_path;

getInput("input_path", input_path);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/geometry_utils.hpp"
#include "nav2_util/robot_utils.hpp"
#include "nav_msgs/msg/path.hpp"
#include "nav2_msgs/msg/path_with_cost.hpp"
#include "tf2_ros/create_timer_ros.h"

#include "nav2_behavior_tree/plugins/action/truncate_path_local_action.hpp"
Expand Down Expand Up @@ -54,7 +54,7 @@ inline BT::NodeStatus TruncatePathLocal::tick()
getInput("max_robot_pose_search_dist", max_robot_pose_search_dist);

bool path_pruning = std::isfinite(max_robot_pose_search_dist);
nav_msgs::msg::Path new_path;
nav2_msgs::msg::PathWithCost new_path;
getInput("input_path", new_path);
if (!path_pruning || new_path != path_) {
path_ = new_path;
Expand Down Expand Up @@ -96,7 +96,7 @@ inline BT::NodeStatus TruncatePathLocal::tick()
auto backward_pose_it = nav2_util::geometry_utils::first_after_integrated_distance(
std::reverse_iterator(current_pose + 1), path_.poses.rend(), distance_backward);

nav_msgs::msg::Path output_path;
nav2_msgs::msg::PathWithCost output_path;
output_path.header = path_.header;
output_path.poses = std::vector<geometry_msgs::msg::PoseStamped>(
backward_pose_it.base(), forward_pose_it);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ IsPathValidCondition::IsPathValidCondition(

BT::NodeStatus IsPathValidCondition::tick()
{
nav_msgs::msg::Path path;
nav2_msgs::msg::PathWithCost path;
getInput("path", path);
bool consider_cost_change;
getInput("consider_cost_change", consider_cost_change);

auto request = std::make_shared<nav2_msgs::srv::IsPathValid::Request>();

request->path = path;
request->consider_cost_change = consider_cost_change;
auto result = client_->async_send_request(request);

if (rclcpp::spin_until_future_complete(node_, result, server_timeout_) ==
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ BT::NodeStatus PathExpiringTimerCondition::tick()
}

// Grab the new path
nav_msgs::msg::Path path;
nav2_msgs::msg::PathWithCost path;
getInput("path", path);

// Reset timer if the path has been updated
Expand Down
10 changes: 5 additions & 5 deletions nav2_behavior_tree/plugins/decorator/path_longer_on_approach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@ PathLongerOnApproach::PathLongerOnApproach(
}

bool PathLongerOnApproach::isPathUpdated(
nav_msgs::msg::Path & new_path,
nav_msgs::msg::Path & old_path)
nav2_msgs::msg::PathWithCost & new_path,
nav2_msgs::msg::PathWithCost & old_path)
{
return new_path != old_path && old_path.poses.size() != 0 &&
new_path.poses.size() != 0 &&
old_path.poses.back() == new_path.poses.back();
}

bool PathLongerOnApproach::isRobotInGoalProximity(
nav_msgs::msg::Path & old_path,
nav2_msgs::msg::PathWithCost & old_path,
double & prox_leng)
{
return nav2_util::geometry_utils::calculate_path_length(old_path, 0) < prox_leng;
}

bool PathLongerOnApproach::isNewPathLonger(
nav_msgs::msg::Path & new_path,
nav_msgs::msg::Path & old_path,
nav2_msgs::msg::PathWithCost & new_path,
nav2_msgs::msg::PathWithCost & old_path,
double & length_factor)
{
return nav2_util::geometry_utils::calculate_path_length(new_path, 0) >
Expand Down
Loading