Easy Navigation
Loading...
Searching...
No Matches
VelocityMux Class Reference

Decides, every RT cycle, which velocity command is sent to the robot. More...

#include <VelocityMux.hpp>

Classes

struct  Selection
 This cycle's selection. More...

Public Types

enum class  Choice {
  NONE , CONTROLLER , PAUSED , TAKEOVER ,
  OVERRIDE , SAFETY_STOP , INHIBITED
}
 Who the selected command comes from. More...

Public Member Functions

void reset ()
 Forgets the last target (e.g. on activation).
Selection select (NavState &nav_state)
 Takes this cycle's proposals from nav_state and selects the command.

Detailed Description

Decides, every RT cycle, which velocity command is sent to the robot.

Takes the commands proposed this cycle (see velocity_command) and picks, by priority:

  1. zero, during a protective stop of the safety channel ("safety_status"), or braking to zero while motion is inhibited ("inhibit_motion");
  2. an emergency override (VelocitySource::OVERRIDE, published as is, not smoothed);
  3. a command that takes over the robot's motion (VelocitySource::TAKEOVER);
  4. zero, while navigation is paused ("navigation_paused");
  5. the nominal controller's command (VelocitySource::CONTROLLER). With no new proposal, the last target is kept, so the smoother can keep ramping towards it.

Member Enumeration Documentation

◆ Choice

enum class Choice
strong

Who the selected command comes from.

Enumerator
NONE 
CONTROLLER 
PAUSED 
TAKEOVER 
OVERRIDE 
SAFETY_STOP 
INHIBITED 

Member Function Documentation

◆ reset()

void reset ( )

Forgets the last target (e.g. on activation).

◆ select()

VelocityMux::Selection select ( NavState & nav_state)

Takes this cycle's proposals from nav_state and selects the command.


The documentation for this class was generated from the following files: