The Global Waypoint Driver allows for the driving of platform to a target waypoint. More...
#include <globalwaypointdriver.h>
Public Member Functions | |
GlobalWaypointDriver () | |
Constructor. | |
virtual | ~GlobalWaypointDriver () |
Destructor. | |
virtual Message * | GenerateDriveCommand (const Byte status)=0 |
virtual Message * | GenerateIdleDriveCommand (const Byte status) const =0 |
virtual bool | IsWaypointAchieved (const GlobalPose ¤tPose, const JAUS::SetGlobalWaypoint &desiredWaypoint) const =0 |
virtual void | WaypointDriverUpdateEvent (const unsigned int timeSinceLastUpdateMs) |
virtual void | WaypointAchieved (const JAUS::SetGlobalWaypoint &waypoint)=0 |
virtual bool | SetGlobalWaypoint (const JAUS::SetGlobalWaypoint *command) |
Sets the current desired destination. | |
virtual bool | SetDesiredTravelSpeed (const JAUS::SetTravelSpeed *command) |
virtual bool | SetDesiredTravelSpeed (const double speed) |
Sets the current desired destination. | |
virtual bool | SetDriverToControl (const Address &driver) |
Sets the Address of the Driver to control. | |
virtual JAUS::SetGlobalWaypoint | GetGlobalWaypoint () const |
Returns the current Global Waypoint command received. | |
virtual GlobalPose | GetGlobalPose () const |
Returns the current Global Pose reported by the Global Pose sensor. | |
virtual VelocityState | GetVelocityState () const |
Returns the current Velocity State reported by the Velocity State sensor. | |
virtual JAUS::SetTravelSpeed | GetDesiredTravelSpeed () const |
Returns the desired Travel Speed command received. | |
virtual Time | GetGlobalWaypointTime () const |
virtual Time | GetTravelSpeedTime () const |
virtual Address | GetControlledDriverID () const |
virtual bool | GenerateEvent (const Events::Subscription &info) const |
Generates an event for the given information. | |
virtual bool | IsEventSupported (const Events::Type type, const double requestedPeriodicRate, const Message *queryMessage, double &confirmedPeriodicRate, std::string &errorMessage) const |
Checks if the event is supported by the Service. | |
virtual bool | IsDiscoverable () const |
virtual void | Receive (const Message *message) |
Processes message received by the Service. If not supported, then message is passed to inheriting services depending on what type of control has been established for the component. | |
virtual Message * | CreateMessage (const UShort messageCode) const |
Attempts to create the message desired. Only message supported by this Service can be created by this Service. | |
virtual void | PrintStatus () const |
Prints the status of the Global Waypoint Driver. | |
virtual bool | Resume () |
Method called when transitioning to a resume state. Confirms subscription to Sensors, and control of Driver. | |
virtual bool | Reset () |
// Method called to transition due to reset. Release Control of Driver, clear all data. | |
virtual bool | Standby () |
Method called when transitioning to a standby state. Release Control of the Driver and remove subscriptions if any. | |
virtual bool | SetEmergency () |
Method called when transitioning to an emergency state. Try to send a Idle command to the controlled Driver. Afterwards, Release control of the Driver and remove subscriptions if any. | |
virtual bool | ClearEmergency () |
Method called when leaving the emergency state, try to resume the the Waypoint if any. | |
virtual bool | ReleaseControl () |
Method called when control is released. Does not stop operatoin of driver. | |
Static Public Attributes | |
static const std::string | Name = "urn:jaus:jss:mobility:GlobalWaypointDriver" |
String name of the Service. |
The Global Waypoint Driver allows for the driving of platform to a target waypoint.
single target waypoint, desired travel speed, current platform pose and current velocity state. A single waypoint is provided via the Set Global Waypoint message. The waypoint remains unchanged until a new Set Global Waypoint message is received. A waypoint consists of the desired position and orientation of the platform. The second input consists of the desired travel speed. The travel speed remains unchanged unless a new Set Travel Speed Message is received. The travel speed may then be changed at any time during waypoint navigation. The travel speed is reset to zero for all transitions from the Ready State.
This implmentation of this service requires at a minimum a Global Pose and Velocity State sensor service on the same component that this service belongs to. The sensor services can be synchronizing versions of the services also (see example_synchronize.cpp for how to do this).
Definition at line 81 of file globalwaypointdriver.h.
GlobalWaypointDriver::GlobalWaypointDriver | ( | ) |
Constructor.
Definition at line 55 of file globalwaypointdriver.cpp.
GlobalWaypointDriver::~GlobalWaypointDriver | ( | ) | [virtual] |
Destructor.
Definition at line 70 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::ClearEmergency | ( | ) | [virtual] |
Method called when leaving the emergency state, try to resume the the Waypoint if any.
Reimplemented from JAUS::Management::Child.
Definition at line 529 of file globalwaypointdriver.cpp.
Attempts to create the message desired. Only message supported by this Service can be created by this Service.
[in] | messageCode | Message to create. |
Implements JAUS::Service.
Definition at line 392 of file globalwaypointdriver.cpp.
virtual Message* JAUS::GlobalWaypointDriver::GenerateDriveCommand | ( | const Byte | status ) | [pure virtual] |
bool GlobalWaypointDriver::GenerateEvent | ( | const Events::Subscription & | info ) | const [virtual] |
Generates an event for the given information.
[in] | info | The event information (ID, Sequence #, etc.) for generation. |
Implements JAUS::Events::Child.
Definition at line 232 of file globalwaypointdriver.cpp.
virtual Message* JAUS::GlobalWaypointDriver::GenerateIdleDriveCommand | ( | const Byte | status ) | const [pure virtual] |
Address GlobalWaypointDriver::GetControlledDriverID | ( | ) | const [virtual] |
Definition at line 216 of file globalwaypointdriver.cpp.
SetTravelSpeed GlobalWaypointDriver::GetDesiredTravelSpeed | ( | ) | const [virtual] |
Returns the desired Travel Speed command received.
Definition at line 178 of file globalwaypointdriver.cpp.
GlobalPose GlobalWaypointDriver::GetGlobalPose | ( | ) | const [virtual] |
Returns the current Global Pose reported by the Global Pose sensor.
Definition at line 149 of file globalwaypointdriver.cpp.
SetGlobalWaypoint GlobalWaypointDriver::GetGlobalWaypoint | ( | ) | const [virtual] |
Returns the current Global Waypoint command received.
Definition at line 135 of file globalwaypointdriver.cpp.
Time GlobalWaypointDriver::GetGlobalWaypointTime | ( | ) | const [virtual] |
Definition at line 191 of file globalwaypointdriver.cpp.
Time GlobalWaypointDriver::GetTravelSpeedTime | ( | ) | const [virtual] |
Definition at line 204 of file globalwaypointdriver.cpp.
VelocityState GlobalWaypointDriver::GetVelocityState | ( | ) | const [virtual] |
Returns the current Velocity State reported by the Velocity State sensor.
Definition at line 164 of file globalwaypointdriver.cpp.
virtual bool JAUS::GlobalWaypointDriver::IsDiscoverable | ( | ) | const [inline, virtual] |
Implements JAUS::Service.
Definition at line 129 of file globalwaypointdriver.h.
bool GlobalWaypointDriver::IsEventSupported | ( | const Events::Type | type, |
const double | requestedPeriodicRate, | ||
const Message * | queryMessage, | ||
double & | confirmedPeriodicRate, | ||
std::string & | errorMessage | ||
) | const [virtual] |
Checks if the event is supported by the Service.
[in] | type | The event type (Periodic/EveryChange). |
[in] | requestedPeriodicRate | If type == Periodic, then this is the desired update rate. |
[in] | queryMessage | The query message associated with the event. |
[out] | confirmedPeriodicRate | This is the confirmed periodic rate supported by the Service. |
[out] | errorMessage | If not supported, this is an optional error message. |
Implements JAUS::Events::Child.
Definition at line 286 of file globalwaypointdriver.cpp.
virtual bool JAUS::GlobalWaypointDriver::IsWaypointAchieved | ( | const GlobalPose & | currentPose, |
const JAUS::SetGlobalWaypoint & | desiredWaypoint | ||
) | const [pure virtual] |
void GlobalWaypointDriver::PrintStatus | ( | ) | const [virtual] |
Prints the status of the Global Waypoint Driver.
Reimplemented from JAUS::Service.
Definition at line 428 of file globalwaypointdriver.cpp.
void GlobalWaypointDriver::Receive | ( | const Message * | message ) | [virtual] |
Processes message received by the Service. If not supported, then message is passed to inheriting services depending on what type of control has been established for the component.
This Service supports GlobalWaypointDriver related messages only.
[in] | message | Message data to process. |
Reimplemented from JAUS::Service.
Definition at line 319 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::ReleaseControl | ( | ) | [virtual] |
Method called when control is released. Does not stop operatoin of driver.
Reimplemented from JAUS::Management::Child.
Definition at line 541 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::Reset | ( | ) | [virtual] |
// Method called to transition due to reset. Release Control of Driver, clear all data.
Implements JAUS::Management::Child.
Definition at line 473 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::Resume | ( | ) | [virtual] |
Method called when transitioning to a resume state. Confirms subscription to Sensors, and control of Driver.
Implements JAUS::Management::Child.
Definition at line 461 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::SetDesiredTravelSpeed | ( | const double | speed ) | [virtual] |
Sets the current desired destination.
[in] | speed | The desired speed of the Platform. |
Definition at line 97 of file globalwaypointdriver.cpp.
virtual bool JAUS::GlobalWaypointDriver::SetDesiredTravelSpeed | ( | const JAUS::SetTravelSpeed * | command ) | [inline, virtual] |
Definition at line 101 of file globalwaypointdriver.h.
bool GlobalWaypointDriver::SetDriverToControl | ( | const Address & | driver ) | [virtual] |
Sets the Address of the Driver to control.
Definition at line 114 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::SetEmergency | ( | ) | [virtual] |
Method called when transitioning to an emergency state. Try to send a Idle command to the controlled Driver. Afterwards, Release control of the Driver and remove subscriptions if any.
Reimplemented from JAUS::Management::Child.
Definition at line 508 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::SetGlobalWaypoint | ( | const JAUS::SetGlobalWaypoint * | command ) | [virtual] |
Sets the current desired destination.
Definition at line 80 of file globalwaypointdriver.cpp.
bool GlobalWaypointDriver::Standby | ( | ) | [virtual] |
Method called when transitioning to a standby state. Release Control of the Driver and remove subscriptions if any.
Implements JAUS::Management::Child.
Definition at line 495 of file globalwaypointdriver.cpp.
virtual void JAUS::GlobalWaypointDriver::WaypointAchieved | ( | const JAUS::SetGlobalWaypoint & | waypoint ) | [pure virtual] |
virtual void JAUS::GlobalWaypointDriver::WaypointDriverUpdateEvent | ( | const unsigned int | timeSinceLastUpdateMs ) | [inline, virtual] |
Definition at line 95 of file globalwaypointdriver.h.
const std::string GlobalWaypointDriver::Name = "urn:jaus:jss:mobility:GlobalWaypointDriver" [static] |
String name of the Service.
Definition at line 84 of file globalwaypointdriver.h.