Skip to content
Snippets Groups Projects
Commit 06771c17 authored by Steven Macenski's avatar Steven Macenski
Browse files

fixing BT library v3 issues

parent 399241a2
No related branches found
No related tags found
No related merge requests found
......@@ -43,12 +43,10 @@ public:
geometry_msgs::msg::Point position;
geometry_msgs::msg::Quaternion orientation;
bool have_position = getInput("position", position);
bool have_orientation = getInput("orientation", orientation);
if (!have_position || !have_orientation) {
if (!getInput("position", position) || !getInput("orientation", orientation)) {
RCLCPP_ERROR(node_->get_logger(),
"NavigateToPoseAction: position or orientation not provided");
return;
}
goal_.pose.pose.position = position;
......@@ -59,8 +57,8 @@ public:
static BT::PortsList providedPorts()
{
return providedBasicPorts({
BT::InputPort<geometry_msgs::msg::Point>("position", "0;0;0", "Position"),
BT::InputPort<geometry_msgs::msg::Quaternion>("orientation", "0;0;0;0", "Orientation")
BT::InputPort<geometry_msgs::msg::Point>("position", "Position"),
BT::InputPort<geometry_msgs::msg::Quaternion>("orientation", "Orientation")
});
}
};
......
......@@ -26,8 +26,10 @@ namespace nav2_behavior_tree
class RandomCrawlAction : public BtActionNode<nav2_msgs::action::RandomCrawl>
{
public:
explicit RandomCrawlAction(const std::string & action_name)
: BtActionNode<nav2_msgs::action::RandomCrawl>(action_name)
explicit RandomCrawlAction(
const std::string & action_name,
const BT::NodeConfiguration & conf)
: BtActionNode<nav2_msgs::action::RandomCrawl>(action_name, conf)
{
}
};
......
......@@ -50,7 +50,7 @@ public:
{
return {
BT::InputPort<int>("number_of_retries", 1, "Number of retries")
}
};
}
private:
......@@ -141,7 +141,7 @@ private:
return BT::NodeStatus::FAILURE;
}
void RecoveryNode::halt() override
void halt() override
{
ControlNode::halt();
current_child_idx_ = 0;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment