Class RobotUpdateHandle::Unstable

Nested Relationships

This class is a nested type of Class RobotUpdateHandle.

Nested Types

Class Documentation

class Unstable

This API is experimental and will not be supported in the future. Users are to avoid relying on these feature for any integration.

Public Types

enum class Decision

Values:

enumerator Undefined
enumerator Clear
enumerator Crowded
using Decide = std::function<void(Decision)>

A callback with this signature will be given to the watchdog when the robot is ready to enter a lift. If the watchdog passes in a true, then the robot will proceed to enter the lift. If the watchdog passes in a false, then the fleet adapter will release its session with the lift and resume later.

using Watchdog = std::function<void(const std::string&, Decide)>

Public Functions

bool is_commissioned() const

True if this robot is allowed to accept new tasks. False if the robot will not accept any new tasks.

void decommission()

Stop this robot from accepting any new tasks. It will continue to perform tasks that are already in its queue. To reassign those tasks, you will need to use the task request API to cancel the tasks and re-request them.

void recommission()

Allow this robot to resume accepting new tasks.

rmf_traffic::schedule::Participant *get_participant()

Get the schedule participant of this robot.

void change_participant_profile(double footprint_radius, double vicinity_radius)

Change the radius of the footprint and vicinity of this participant.

void declare_holding(std::string on_map, Eigen::Vector3d at_position, rmf_traffic::Duration for_duration = std::chrono::seconds(30))

Override the schedule to say that the robot will be holding at a certain position. This should not be used while tasks with automatic schedule updating are running, or else the traffic schedule will have jumbled up information, which can be disruptive to the overall traffic management.

rmf_traffic::PlanId current_plan_id() const

Get the current Plan ID that this robot has sent to the traffic schedule.

Stubbornness be_stubborn()

Tell this robot to be a stubborn negotiator.

void set_lift_entry_watchdog(Watchdog watchdog, rmf_traffic::Duration wait_duration = std::chrono::seconds(10))

Set a callback that can be used to check whether the robot is clear to enter the lift.

class Stubbornness

Hold onto this class to tell the robot to behave as a “stubborn

negotiator”, meaning it will always refuse to accommodate the schedule of any other agent. This could be used when teleoperating a robot, to tell other robots that the agent is unable to negotiate.

When the object is destroyed, the stubbornness will automatically be released.

Public Functions

void release()

Stop being stubborn.