The plain, manual controller: a mission script decides everything by hand (which robot runs which capability, when), SimpleController just hosts the FleetSession that makes talking to those robots possible.
More...
#include <simple_controller.hpp>
The plain, manual controller: a mission script decides everything by hand (which robot runs which capability, when), SimpleController just hosts the FleetSession that makes talking to those robots possible.
Owns a FleetSession by composition and forwards every call straight to it – there is no behavior here beyond the session's own. This is deliberate: SimpleController is meant to be the reference example of "a controller with zero decision-making logic of its own", so it also doubles as the template for writing a different one (an LLMController, a PlanSys2Controller, or one of your own) – see FleetSession's own doc comment for why those should be built the same way (own a FleetSession, add logic around it) rather than by subclassing this class.
Usage:
easyfleet::init(argc, argv);
A remote robot's capabilities, as seen and commanded from a mission script.
Definition robot_handle.hpp:75
The plain, manual controller: a mission script decides everything by hand (which robot runs which cap...
Definition simple_controller.hpp:65
void discover_capabilities(std::chrono::milliseconds window=std::chrono::milliseconds(2500))
See FleetSession::discover_capabilities().
Definition simple_controller.hpp:92
void shutdown()
See FleetSession::shutdown().
Definition simple_controller.hpp:109
void add_robot(RobotHandle &robot)
Adds robot to this controller's session.
Definition simple_controller.hpp:71
◆ add_robot()
Adds robot to this controller's session.
- Parameters
-
◆ discover_capabilities()
| void discover_capabilities |
( |
std::chrono::milliseconds | window = std::chrono::milliseconds(2500) | ) |
|
|
inline |
◆ find_robot()
| std::optional< std::reference_wrapper< RobotHandle > > find_robot |
( |
const std::string & | name | ) |
const |
|
inlinenoexcept |
◆ node()
| rclcpp::Node::SharedPtr node |
( |
| ) |
const |
|
inlinenoexcept |
◆ robots()
| const std::vector< std::reference_wrapper< RobotHandle > > & robots |
( |
| ) |
const |
|
inlinenoexcept |
◆ spin_for()
| void spin_for |
( |
std::chrono::milliseconds | duration | ) |
|
|
inline |
The documentation for this class was generated from the following file: