Skip to content
Closed

Humble #3688

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
bd77dde
Bring most galactic changes to humble
Oct 20, 2022
f29c171
.
Oct 20, 2022
b5bb757
.
Oct 20, 2022
dcd1089
fix
Oct 20, 2022
d42440a
fix
Oct 20, 2022
248be1b
.
Oct 24, 2022
2ea88ff
fixes
Oct 25, 2022
f0da859
Add our changes to Backup
Oct 25, 2022
7a8598c
.
Oct 25, 2022
8f89ef8
Increase timeout
Oct 26, 2022
8b6ef7b
Btpanel (#427)
Nov 3, 2022
34f9055
Merge pull request #3 from logivations/humble-migration
Nov 15, 2022
c9c241b
events executor
Dec 4, 2022
d5842ae
revert some changes
jplapp Dec 4, 2022
08cec04
add events executor to main
Dec 4, 2022
971aeb8
fix nodethread
Dec 4, 2022
31bcdb0
fix
Dec 4, 2022
9a18b16
adapt to comments
jplapp Dec 5, 2022
1d257dd
cleanup
jplapp Dec 5, 2022
630681a
Merge pull request #4 from logivations/events_executor
jplapp Dec 5, 2022
f9ea8d9
revert NodeThread events executor
jplapp Dec 5, 2022
bf3e922
Merge pull request #5 from logivations/revert_events_exec_node_thread
jplapp Dec 5, 2022
3fd5af6
rm lifecycle manager
jplapp Dec 6, 2022
8c262a0
Merge pull request #6 from logivations/humble_test
jplapp Dec 6, 2022
6a43ff7
waiting longer for action server to become available
andriimaistruk Dec 19, 2022
b9f444c
fix error message, std::string doesn't have such constructor
andriimaistruk Dec 19, 2022
f1e261d
Increase timeout and fix exception message #7
andriimaistruk Dec 19, 2022
897a4bd
AMRNAV-3826 Fix for nav2_velocity_smoother
HovorunB Jan 8, 2023
d665b9e
check command_ directly
HovorunB Jan 9, 2023
8b33f05
match pr for upstream
HovorunB Jan 13, 2023
2e79f94
Merge pull request #8 from logivations/AMRNAV-3826_smoother_driving
HovorunB Jan 13, 2023
9a86daa
AMRNAV-3826 Add dynamic parameters to nav2_collision_monitor
Jan 27, 2023
f3e9a78
revert
Jan 27, 2023
7be5f20
fix
Jan 27, 2023
b5c4311
Merge pull request #9 from logivations/AMRNAV-3826_add_dynamic_parame…
HovorunB Jan 30, 2023
11ab57c
Fix collison_monitor performance
HovorunB Feb 7, 2023
56c1766
move
HovorunB Feb 7, 2023
0d737ec
add return, docs
HovorunB Feb 8, 2023
3aae34a
Revert "add return, docs"
HovorunB Feb 8, 2023
d34b8da
Revert "move"
HovorunB Feb 8, 2023
dabed0d
Revert "Fix collison_monitor performance"
HovorunB Feb 8, 2023
e165fda
Change lookuptransform parameters
HovorunB Feb 8, 2023
22a3498
Merge pull request #11 from logivations/fix_collision_monitor_perform…
HovorunB Feb 9, 2023
4386cba
Added a flag to not send goal in BtActionNode (#3293)
owen7900 Dec 5, 2022
f8fdce3
Merge pull request #13 from logivations/add-flag-to-not-send-goal-in-…
Feb 28, 2023
511882d
AMRNAV-4244 Reset blackboard on goal completion
HovorunB Feb 28, 2023
bcaf607
Merge pull request #15 from logivations/AMRNAV-4244_reset_blackboard_…
HovorunB Mar 1, 2023
9c4084c
Add codeowners
Mar 1, 2023
fe015f7
Merge pull request #16 from logivations/add-codeowner
Mar 1, 2023
fe0072e
Merge remote-tracking branch 'ros2/humble' into humble-sync
Mar 1, 2023
ecbee73
fix
Mar 1, 2023
8ae72ad
mini fix
Mar 3, 2023
be2c7e4
.
Mar 3, 2023
8d5bc22
Merge pull request #18 from logivations/humble-sync
Mar 3, 2023
ba00de5
Merge branch 'ros-planning:humble' into humble
tonynajjar Mar 5, 2023
0b575e9
Fix Serivce qos build error
Mar 6, 2023
3a5cb47
[MPPI] Fix transformed path oscillations (#3443) (#3453)
mergify[bot] Mar 7, 2023
c158589
Fix vector size
Mar 9, 2023
124843c
namespace trajectory visualizer markers
Mar 10, 2023
4b23dd1
Check compile options
Mar 17, 2023
063c5ab
Revert "Check compile options"
Mar 17, 2023
7634967
Merge commit '0f826150fed0f0da0e180ac960270367a6c69c93' into humble
Mar 20, 2023
617f60a
Add flag to not send request in BTServiceNode (#3431)
tonynajjar Mar 20, 2023
9517382
Add Publish Action
Mar 22, 2023
b8152a1
fix
Mar 22, 2023
56d71ac
.
Mar 22, 2023
8428cf0
.
Mar 22, 2023
8996e15
Merge pull request #20 from logivations/collision-monitor-add-publish…
Mar 22, 2023
7405bdf
Add frequency as parameter
Mar 23, 2023
4cf839b
Merge pull request #21 from logivations/collision-monitor-add-frequency
Mar 23, 2023
bf41ca2
add option to succeed when sending request is not needed
andriimaistruk Apr 10, 2023
0652a53
Merge pull request #22 from logivations/amrnav_3995
andriimaistruk Apr 11, 2023
12e0ea4
Add BT conversion TransformStamped
Apr 18, 2023
72f6639
Merge pull request #23 from logivations/add-transform-stamped-bt-conv…
Apr 19, 2023
52ba869
add new option
andriimaistruk Apr 21, 2023
4141387
Merge pull request #24 from logivations/amrnav_4517
andriimaistruk Apr 26, 2023
21052e5
AMRNAV-4638 behavior tree logs
jplapp May 3, 2023
015c164
cleanup
jplapp May 3, 2023
caf0988
Merge pull request #26 from logivations/AMRNAV-4638_behavior_tree_logs
jplapp May 3, 2023
0365507
Merge branch 'ros-planning:humble' into humble
tonynajjar May 4, 2023
4323421
draft
AnastasiaPittel May 4, 2023
3b3f4d1
draft
AnastasiaPittel May 4, 2023
d5d2f86
draft
AnastasiaPittel May 4, 2023
787fd97
draft
AnastasiaPittel May 4, 2023
b52e60e
Merge pull request #27 from logivations/AMRNAV-1988_Migrate_backup_BT…
AnastasiaPittel May 8, 2023
f016e9e
draft
AnastasiaPittel May 8, 2023
22a2bd5
Merge pull request #28 from logivations/AMRNAV-1988_Migrate_backup_BT…
AnastasiaPittel May 8, 2023
ae0a7e8
fix
andriimaistruk May 15, 2023
af8e108
fix
andriimaistruk May 15, 2023
f99ff22
Merge pull request #29 from logivations/fix_drive_on_heading_driving_…
andriimaistruk May 15, 2023
10c48cb
fix
andriimaistruk May 15, 2023
8ced5d0
Merge pull request #30 from logivations/fix_drive_on_heading_v2
andriimaistruk May 15, 2023
0f3dabd
draft
AnastasiaPittel May 23, 2023
a3b34da
draft
AnastasiaPittel May 23, 2023
e4fa434
draft
AnastasiaPittel May 23, 2023
bc2d60e
draft
AnastasiaPittel May 23, 2023
61feb72
draft
AnastasiaPittel May 24, 2023
d3f69de
Merge pull request #31 from logivations/AMRNAV-4429_Nav2_diagnostics_…
AnastasiaPittel Jun 14, 2023
d790dee
Dynamically set max_points for collision monitor
HovorunB Jun 22, 2023
ed9b318
remove log
HovorunB Jun 22, 2023
de2cc96
Merge pull request #32 from logivations/AMRNAV-4974_dynamically_set_m…
HovorunB Jun 23, 2023
9ed76fb
add a controller reset (#3326)
SteveMacenski Dec 15, 2022
9142c59
Merge pull request #34 from logivations/backport-reset
Jun 30, 2023
6ccc384
Add Minimum velocity before stopping
Jul 7, 2023
f8f5a94
fix
Jul 7, 2023
5c70ba4
.
Jul 7, 2023
a4dc91d
Merge pull request #36 from logivations/add-min-vel-before-stop
Jul 7, 2023
838357d
Fix free_goal_vel type
HovorunB Jul 7, 2023
4a82bf2
Merge pull request #37 from logivations/fix_follow_path_type
jplapp Jul 8, 2023
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @tonynajjar @jplapp @andriimaistruk
4 changes: 4 additions & 0 deletions nav2_behavior_tree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ find_package(tf2_geometry_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(nav2_util REQUIRED)
find_package(angles REQUIRED)

nav2_package()

Expand All @@ -41,6 +42,7 @@ set(dependencies
std_msgs
std_srvs
nav2_util
angles
)

add_library(${library_name} SHARED
Expand Down Expand Up @@ -208,6 +210,8 @@ install(DIRECTORY include/
DESTINATION include/
)

install(FILES test/test_action_server.hpp test/test_service.hpp DESTINATION include/nav2_behavior_tree)

install(FILES nav2_tree_nodes.xml DESTINATION share/${PROJECT_NAME})

if(BUILD_TESTING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <memory>
#include <string>
#include <vector>
#include "rclcpp/rclcpp.hpp"

#include "behaviortree_cpp_v3/behavior_tree.h"
#include "behaviortree_cpp_v3/bt_factory.h"
Expand Down Expand Up @@ -61,6 +62,7 @@ class BehaviorTreeEngine
BT::Tree * tree,
std::function<void()> onLoop,
std::function<bool()> cancelRequested,
rclcpp::Logger logger,
std::chrono::milliseconds loopTimeout = std::chrono::milliseconds(10));

/**
Expand Down
20 changes: 15 additions & 5 deletions nav2_behavior_tree/include/nav2_behavior_tree/bt_action_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BtActionNode : public BT::ActionNodeBase
const std::string & xml_tag_name,
const std::string & action_name,
const BT::NodeConfiguration & conf)
: BT::ActionNodeBase(xml_tag_name, conf), action_name_(action_name)
: BT::ActionNodeBase(xml_tag_name, conf), action_name_(action_name), should_send_goal_(true)
{
node_ = config().blackboard->template get<rclcpp::Node::SharedPtr>("node");
callback_group_ = node_->create_callback_group(
Expand Down Expand Up @@ -93,9 +93,9 @@ class BtActionNode : public BT::ActionNodeBase

// Make sure the server is actually there before continuing
RCLCPP_DEBUG(node_->get_logger(), "Waiting for \"%s\" action server", action_name.c_str());
if (!action_client_->wait_for_action_server(1s)) {
if (!action_client_->wait_for_action_server(20s)) {
RCLCPP_ERROR(
node_->get_logger(), "\"%s\" action server not available after waiting for 1 s",
node_->get_logger(), "\"%s\" action server not available after waiting for 20 s",
action_name.c_str());
throw std::runtime_error(
std::string("Action server ") + action_name +
Expand Down Expand Up @@ -190,9 +190,15 @@ class BtActionNode : public BT::ActionNodeBase
// setting the status to RUNNING to notify the BT Loggers (if any)
setStatus(BT::NodeStatus::RUNNING);

// user defined callback
// reset the flag to send the goal or not, allowing the user the option to set it in on_tick
should_send_goal_ = true;

// user defined callback, may modify "should_send_goal_".
on_tick();

if (!should_send_goal_) {
return BT::NodeStatus::FAILURE;
}
send_new_goal();
}

Expand Down Expand Up @@ -225,7 +231,8 @@ class BtActionNode : public BT::ActionNodeBase
feedback_.reset();

auto goal_status = goal_handle_->get_status();
if (goal_updated_ && (goal_status == action_msgs::msg::GoalStatus::STATUS_EXECUTING ||
if (goal_updated_ &&
(goal_status == action_msgs::msg::GoalStatus::STATUS_EXECUTING ||
goal_status == action_msgs::msg::GoalStatus::STATUS_ACCEPTED))
{
goal_updated_ = false;
Expand Down Expand Up @@ -446,6 +453,9 @@ class BtActionNode : public BT::ActionNodeBase
std::shared_ptr<std::shared_future<typename rclcpp_action::ClientGoalHandle<ActionT>::SharedPtr>>
future_goal_handle_;
rclcpp::Time time_goal_sent_;

// Can be set in on_tick or on_wait_for_result to indicate if a goal should be sent.
bool should_send_goal_;
};

} // namespace nav2_behavior_tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class BtActionServer
* @brief Getter function for the current BT tree
* @return BT::Tree Current behavior tree
*/
const BT::Tree & getTree() const
const BT::Tree* getTree() const
{
return tree_;
}
Expand All @@ -180,9 +180,12 @@ class BtActionServer
*/
void haltTree()
{
tree_.rootNode()->halt();
tree_->rootNode()->halt();
}

void resetBlackboard();
std::map<std::size_t, BT::Tree> cached_trees;
std::vector<std::size_t> cached_tree_hashes;
protected:
/**
* @brief Action server callback
Expand All @@ -196,7 +199,7 @@ class BtActionServer
std::shared_ptr<ActionServer> action_server_;

// Behavior Tree to be executed when goal is received
BT::Tree tree_;
BT::Tree* tree_;

// The blackboard shared by all of the nodes in the tree
BT::Blackboard::Ptr blackboard_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <set>
#include <exception>
#include <vector>
#include <algorithm>

#include "nav2_msgs/action/navigate_to_pose.hpp"
#include "nav2_behavior_tree/bt_action_server.hpp"
Expand Down Expand Up @@ -142,7 +143,7 @@ bool BtActionServer<ActionT>::on_cleanup()
plugin_lib_names_.clear();
current_bt_xml_filename_.clear();
blackboard_.reset();
bt_->haltAllActions(tree_.rootNode());
bt_->haltAllActions(tree_->rootNode());
bt_.reset();
return true;
}
Expand All @@ -153,11 +154,17 @@ bool BtActionServer<ActionT>::loadBehaviorTree(const std::string & bt_xml_filena
// Empty filename is default for backward compatibility
auto filename = bt_xml_filename.empty() ? default_bt_xml_filename_ : bt_xml_filename;

// This is removed as part of the changes about BT hashing as we still want to check for
// changes in the xml file even if current_bt_xml_filename_ == filename

/*
// Use previous BT if it is the existing one
if (current_bt_xml_filename_ == filename) {
RCLCPP_DEBUG(logger_, "BT will not be reloaded as the given xml is already loaded");
return true;
}
*/


// Read the input BT XML from the specified file into a string
std::ifstream xml_file(filename);
Expand All @@ -171,28 +178,50 @@ bool BtActionServer<ActionT>::loadBehaviorTree(const std::string & bt_xml_filena
std::istreambuf_iterator<char>(xml_file),
std::istreambuf_iterator<char>());

// Create the Behavior Tree from the XML input
try {
tree_ = bt_->createTreeFromText(xml_string, blackboard_);
} catch (const std::exception & e) {
RCLCPP_ERROR(logger_, "Exception when loading BT: %s", e.what());
return false;
std::hash<std::string> hasher;

std::size_t tree_hash = hasher(xml_string);

// if a tree was used before we fetch it from the cached trees not to create it one more time
if (std::find(cached_tree_hashes.begin(), cached_tree_hashes.end(), tree_hash) != cached_tree_hashes.end())
{
RCLCPP_DEBUG(logger_, "BT will not be loaded as it exists in cache");
tree_ = &cached_trees[tree_hash];
}
else
{
RCLCPP_DEBUG(logger_, "BT will be loaded as it doesn't exist in cache");

// Create the Behavior Tree from the XML input
cached_trees[tree_hash] = bt_->createTreeFromText(xml_string, blackboard_);
cached_tree_hashes.push_back(tree_hash);
tree_ = &cached_trees[tree_hash];
}

topic_logger_ = std::make_unique<RosTopicLogger>(client_node_, tree_);
topic_logger_ = std::make_unique<RosTopicLogger>(client_node_, *tree_);

current_bt_xml_filename_ = filename;

return true;
}

template<class ActionT>
void BtActionServer<ActionT>::resetBlackboard()
{
blackboard_->clear();
blackboard_->set<rclcpp::Node::SharedPtr>("node", client_node_); // NOLINT
blackboard_->set<std::chrono::milliseconds>("server_timeout", default_server_timeout_); // NOLINT
blackboard_->set<std::chrono::milliseconds>("bt_loop_duration", bt_loop_duration_); // NOLINT
}

template<class ActionT>
void BtActionServer<ActionT>::executeCallback()
{
if (!on_goal_received_callback_(action_server_->get_current_goal())) {
action_server_->terminate_current();
return;
}

RCLCPP_INFO(logger_, "Action server name is %s", action_name_.c_str());
auto is_canceling = [&]() {
if (action_server_ == nullptr) {
RCLCPP_DEBUG(logger_, "Action server unavailable. Canceling.");
Expand All @@ -214,11 +243,14 @@ void BtActionServer<ActionT>::executeCallback()
};

// Execute the BT that was previously created in the configure step
nav2_behavior_tree::BtStatus rc = bt_->run(&tree_, on_loop, is_canceling, bt_loop_duration_);
nav2_behavior_tree::BtStatus rc = bt_->run(tree_, on_loop, is_canceling, logger_, bt_loop_duration_);

// send remaining logs
topic_logger_->flush();

// Make sure that the Bt is not in a running state from a previous execution
// note: if all the ControlNodes are implemented correctly, this is not needed.
bt_->haltAllActions(tree_.rootNode());
bt_->haltAllActions(tree_->rootNode());

// Give server an opportunity to populate the result message or simple give
// an indication that the action is complete.
Expand Down
29 changes: 29 additions & 0 deletions nav2_behavior_tree/include/nav2_behavior_tree/bt_conversions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "geometry_msgs/msg/point.hpp"
#include "geometry_msgs/msg/quaternion.hpp"
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "geometry_msgs/msg/transform_stamped.hpp"

namespace BT
{
Expand Down Expand Up @@ -100,6 +101,34 @@ inline geometry_msgs::msg::PoseStamped convertFromString(const StringView key)
}
}

/**
* @brief Parse XML string to geometry_msgs::msg::TransformStamped
* @param key XML string
* @return geometry_msgs::msg::TransformStamped
*/
template<>
inline geometry_msgs::msg::TransformStamped convertFromString(const StringView key)
{
// 7 real numbers separated by semicolons
auto parts = BT::splitString(key, ';');
if (parts.size() != 10) {
throw std::runtime_error("invalid number of fields for TransformStamped attribute)");
} else {
geometry_msgs::msg::TransformStamped transform_stamped;
transform_stamped.header.stamp = rclcpp::Time(BT::convertFromString<int64_t>(parts[0]));
transform_stamped.header.frame_id = BT::convertFromString<std::string>(parts[1]);
transform_stamped.child_frame_id = BT::convertFromString<std::string>(parts[2]);
transform_stamped.transform.translation.x = BT::convertFromString<double>(parts[3]);
transform_stamped.transform.translation.y = BT::convertFromString<double>(parts[4]);
transform_stamped.transform.translation.z = BT::convertFromString<double>(parts[5]);
transform_stamped.transform.rotation.x = BT::convertFromString<double>(parts[6]);
transform_stamped.transform.rotation.y = BT::convertFromString<double>(parts[7]);
transform_stamped.transform.rotation.z = BT::convertFromString<double>(parts[8]);
transform_stamped.transform.rotation.w = BT::convertFromString<double>(parts[9]);
return transform_stamped;
}
}

/**
* @brief Parse XML string to std::chrono::milliseconds
* @param key XML string
Expand Down
27 changes: 23 additions & 4 deletions nav2_behavior_tree/include/nav2_behavior_tree/bt_service_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ class BtServiceNode : public BT::ActionNodeBase
RCLCPP_DEBUG(
node_->get_logger(), "Waiting for \"%s\" service",
service_name_.c_str());
if (!service_client_->wait_for_service(1s)) {
if (!service_client_->wait_for_service(10s)) {
RCLCPP_ERROR(
node_->get_logger(), "\"%s\" service server not available after waiting for 1 s",
service_node_name.c_str());
node_->get_logger(), "\"%s\" service server not available after waiting for 10 s",
service_name_.c_str());
throw std::runtime_error(
std::string(
"Service server %s not available",
service_node_name.c_str()));
service_name_.c_str()));
}

RCLCPP_DEBUG(
Expand Down Expand Up @@ -128,7 +128,22 @@ class BtServiceNode : public BT::ActionNodeBase
BT::NodeStatus tick() override
{
if (!request_sent_) {
// reset the flag to send the request or not,
// allowing the user the option to set it in on_tick
should_send_request_ = true;
should_fail_not_sent_request_ = true;

// user defined callback, may modify "should_send_request_".
on_tick();

if (!should_send_request_) {
if (should_fail_not_sent_request_) {
return BT::NodeStatus::FAILURE;
} else {
return BT::NodeStatus::SUCCESS;
}
}

future_result_ = service_client_->async_send_request(request_).share();
sent_time_ = node_->now();
request_sent_ = true;
Expand Down Expand Up @@ -240,6 +255,10 @@ class BtServiceNode : public BT::ActionNodeBase
std::shared_future<typename ServiceT::Response::SharedPtr> future_result_;
bool request_sent_{false};
rclcpp::Time sent_time_;

// Can be set in on_tick or on_wait_for_result to indicate if a request should be sent.
bool should_send_request_;
bool should_fail_not_sent_request_;
};

} // namespace nav2_behavior_tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class BackUpAction : public BtActionNode<nav2_msgs::action::BackUp>
{
BT::InputPort<double>("backup_dist", 0.15, "Distance to backup"),
BT::InputPort<double>("backup_speed", 0.025, "Speed at which to backup"),
BT::InputPort<double>("time_allowance", 10.0, "Allowed time for reversing")
BT::InputPort<double>("time_allowance", 10.0, "Allowed time for reversing"),
});
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class DriveOnHeadingAction : public BtActionNode<nav2_msgs::action::DriveOnHeadi
{
BT::InputPort<double>("dist_to_travel", 0.15, "Distance to travel"),
BT::InputPort<double>("speed", 0.025, "Speed at which to travel"),
BT::InputPort<double>("time_allowance", 10.0, "Allowed time for driving on heading")
BT::InputPort<double>("time_allowance", 10.0, "Allowed time for driving on heading"),
BT::InputPort<bool>("free_goal_vel", false, "Don't stop when goal reached"),
BT::InputPort<bool>("check_local_costmap", true, "Check local costmap for collisions")
});
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class FollowPathAction : public BtActionNode<nav2_msgs::action::FollowPath>
{
BT::InputPort<nav_msgs::msg::Path>("path", "Path to follow"),
BT::InputPort<std::string>("controller_id", ""),
BT::InputPort<bool>("free_goal_vel", "Don't stop when goal reached"),
BT::InputPort<std::string>("goal_checker_id", ""),
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class GoalReachedCondition : public BT::ConditionNode
return {
BT::InputPort<geometry_msgs::msg::PoseStamped>("goal", "Destination"),
BT::InputPort<std::string>("global_frame", std::string("map"), "Global frame"),
BT::InputPort<double>("xy_goal_tolerance", 0.1, "xy goal tolerance"),
BT::InputPort<double>("yaw_goal_tolerance", 0.1, "yaw goal tolerance"),
BT::InputPort<std::string>("robot_base_frame", std::string("base_link"), "Robot base frame")
};
}
Expand All @@ -91,6 +93,7 @@ class GoalReachedCondition : public BT::ConditionNode

bool initialized_;
double goal_reached_tol_;
double goal_reached_tol_yaw_;
std::string global_frame_;
std::string robot_base_frame_;
double transform_tolerance_;
Expand Down
Loading