EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
Toggle main menu visibility
Loading...
Searching...
No Matches
navigate.hpp
1
// Copyright 2026 Intelligent Robotics Lab
2
//
3
// This file is part of the project EasyFleet
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// http://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
16
#ifndef EASYFLEET_EASYNAV_NAVIGATION__BT_NODES__NAVIGATE_HPP_
17
#define EASYFLEET_EASYNAV_NAVIGATION__BT_NODES__NAVIGATE_HPP_
18
19
#include <map>
20
#include <memory>
21
#include <string>
22
23
#include "behaviortree_cpp/action_node.h"
24
#include "easynav_system/GoalManagerClient.hpp"
25
#include "geometry_msgs/msg/pose_stamped.hpp"
26
27
namespace
easyfleet_easynav_navigation
28
{
29
34
class
Navigate
:
public
BT::StatefulActionNode
35
{
36
public
:
42
Navigate
(
const
std::string & name,
const
BT::NodeConfig & config);
43
46
static
BT::PortsList
providedPorts
();
47
51
BT::NodeStatus
onStart
()
override
;
55
BT::NodeStatus
onRunning
()
override
;
59
void
onHalted
()
override
;
60
61
private
:
62
std::shared_ptr<const std::map<std::string, geometry_msgs::msg::PoseStamped>> waypoints_;
63
easynav::GoalManagerClient::SharedPtr gm_client_;
64
std::string last_goal_id_;
65
};
66
67
}
// namespace easyfleet_easynav_navigation
68
69
#endif
// EASYFLEET_EASYNAV_NAVIGATION__BT_NODES__NAVIGATE_HPP_
easyfleet_easynav_navigation::Navigate::onHalted
void onHalted() override
No-op: an in-flight EasyNav goal is left alone on halt, deliberately (see the class-level design note...
Definition
navigate.cpp:123
easyfleet_easynav_navigation::Navigate::Navigate
Navigate(const std::string &name, const BT::NodeConfig &config)
Constructs the BT node.
Definition
navigate.cpp:53
easyfleet_easynav_navigation::Navigate::onRunning
BT::NodeStatus onRunning() override
Polls gm_client_ for the in-flight goal's progress.
Definition
navigate.cpp:90
easyfleet_easynav_navigation::Navigate::onStart
BT::NodeStatus onStart() override
Resolves the goal_id input port against the waypoint registry and sends the corresponding pose throug...
Definition
navigate.cpp:69
easyfleet_easynav_navigation::Navigate::providedPorts
static BT::PortsList providedPorts()
This node's ports: the input port goal_id.
Definition
navigate.cpp:64
easyfleet_easynav_navigation
include
easyfleet_easynav_navigation
bt_nodes
navigate.hpp
Generated by
1.17.0