DUNE: Uniform Navigational Environment  2.6.0-rc4
Maneuver::FollowReference::AUV::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void consume (const IMC::FollowReference *msg)
 
uint8_t pathDifferences (const IMC::DesiredPath *msg1, const IMC::DesiredPath *msg2)
 
bool sameReference (const IMC::Reference *msg1, const IMC::Reference *msg2)
 
void consume (const IMC::Reference *msg)
 
void consume (const IMC::EstimatedState *msg)
 
void onPathControlState (const IMC::PathControlState *pcs)
 
IMC::SpeedUnits parseSpeedUnitsStr (std::string sunits_str)
 
IMC::ZUnits parseZUnitsStr (std::string zunits_str)
 
void guide (const IMC::PathControlState *pcs, IMC::Reference *ref, const IMC::EstimatedState *state)
 
void enableMovement (bool enable)
 
- Public Member Functions inherited from DUNE::IMC::Message
 Message (void)
 
virtual ~Message (void)
 
virtual Messageclone (void) const =0
 
virtual void clear (void)=0
 
virtual int validate (void) const =0
 
virtual const char * getName (void) const =0
 
virtual uint16_t getId (void) const =0
 
double setTimeStamp (double ts)
 
double setTimeStamp (void)
 
double getTimeStamp (void) const
 
uint16_t getSource (void) const
 
void setSource (uint16_t src)
 
uint8_t getSourceEntity (void) const
 
void setSourceEntity (uint8_t src_ent)
 
uint16_t getDestination (void) const
 
void setDestination (uint16_t dst)
 
uint8_t getDestinationEntity (void) const
 
void setDestinationEntity (uint8_t dst_ent)
 
virtual uint16_t getSubId (void) const
 
virtual void setSubId (uint16_t subid)
 
virtual fp64_t getValueFP (void) const
 
virtual void setValueFP (fp64_t val)
 
unsigned getSerializationSize (void) const
 
unsigned getPayloadSerializationSize (void) const
 
virtual unsigned getFixedSerializationSize (void) const
 
virtual unsigned getVariableSerializationSize (void) const
 
void toJSON (std::ostream &os) const
 
void toText (std::ostream &os) const
 
virtual uint8_t * serializeFields (uint8_t *bfr) const =0
 
virtual uint16_t deserializeFields (const uint8_t *bfr, uint16_t len)=0
 
virtual uint16_t reverseDeserializeFields (const uint8_t *bfr, uint16_t len)=0
 
virtual void fieldsToJSON (std::ostream &os, unsigned indent_level) const
 
bool operator== (const Message &other) const
 
bool operator!= (const Message &other) const
 

Public Attributes

IMC::FollowReference m_spec
 
IMC::Reference m_cur_ref
 
IMC::Reference m_last_ref
 
IMC::EstimatedState m_estate
 
IMC::PathControlState m_pcs
 
IMC::FollowRefState m_fref_state
 
bool m_got_reference
 
bool m_moving
 
double m_last_ref_time
 
Arguments m_args
 
IMC::DesiredPath m_last_desired_path
 
bool m_path_sent
 

Static Public Attributes

static const uint8_t Z_CHANGED
 
static const uint8_t SPEED_CHANGED
 
static const uint8_t LOC_CHANGED
 
static const uint8_t RADIUS_CHANGED
 

Additional Inherited Members

- Protected Member Functions inherited from DUNE::IMC::Message
virtual void setTimeStampNested (double value)
 
virtual void setSourceNested (uint16_t value)
 
virtual void setSourceEntityNested (uint8_t value)
 
virtual void setDestinationNested (uint16_t value)
 
virtual void setDestinationEntityNested (uint8_t value)
 
virtual bool fieldsEqual (const Message &other) const
 
- Protected Attributes inherited from DUNE::IMC::Message
Header m_header
 

Constructor & Destructor Documentation

Member Function Documentation

void Maneuver::FollowReference::AUV::Task::consume ( const IMC::FollowReference *  msg)
inline
void Maneuver::FollowReference::AUV::Task::consume ( const IMC::Reference *  msg)
inline

Consume Reference messages and generate DesiredPath messages accordingly Whenever a new Reference is received from a valid source, a new desired_path gets commanded to the vehicle.

See Also
https://!whale.fe.up.pt/imc/doc/trunk/Maneuvering.html#follow-reference-maneuver
Parameters
msgthe Reference message to be processed

References guide(), m_cur_ref, m_estate, m_fref_state, m_got_reference, m_last_ref, m_last_ref_time, m_pcs, and m_spec.

void Maneuver::FollowReference::AUV::Task::consume ( const IMC::EstimatedState *  msg)
inline
void Maneuver::FollowReference::AUV::Task::enableMovement ( bool  enable)
inline

Function for enabling and disabling the control loops.

References m_last_desired_path, m_moving, and m_path_sent.

void Maneuver::FollowReference::AUV::Task::guide ( const IMC::PathControlState *  pcs,
IMC::Reference *  ref,
const IMC::EstimatedState *  state 
)
inline
void Maneuver::FollowReference::AUV::Task::onPathControlState ( const IMC::PathControlState *  pcs)
inline

References m_pcs.

IMC::SpeedUnits Maneuver::FollowReference::AUV::Task::parseSpeedUnitsStr ( std::string  sunits_str)
inline
IMC::ZUnits Maneuver::FollowReference::AUV::Task::parseZUnitsStr ( std::string  zunits_str)
inline
uint8_t Maneuver::FollowReference::AUV::Task::pathDifferences ( const IMC::DesiredPath *  msg1,
const IMC::DesiredPath *  msg2 
)
inline
bool Maneuver::FollowReference::AUV::Task::sameReference ( const IMC::Reference *  msg1,
const IMC::Reference *  msg2 
)
inline

Referenced by guide().

Member Data Documentation

const uint8_t Maneuver::FollowReference::AUV::Task::LOC_CHANGED
static

Referenced by pathDifferences().

Arguments Maneuver::FollowReference::AUV::Task::m_args

Task arguments.

Referenced by guide(), and Task().

IMC::Reference Maneuver::FollowReference::AUV::Task::m_cur_ref

Store latest received reference.

Referenced by consume().

IMC::EstimatedState Maneuver::FollowReference::AUV::Task::m_estate

Estimated state.

Referenced by consume().

IMC::FollowRefState Maneuver::FollowReference::AUV::Task::m_fref_state

FollowRefState.

Referenced by consume(), and guide().

bool Maneuver::FollowReference::AUV::Task::m_got_reference

Did we get a reference already?

Referenced by consume(), and Task().

IMC::DesiredPath Maneuver::FollowReference::AUV::Task::m_last_desired_path

Referenced by consume(), and enableMovement().

IMC::Reference Maneuver::FollowReference::AUV::Task::m_last_ref

Referenced by consume(), and guide().

double Maneuver::FollowReference::AUV::Task::m_last_ref_time

Store last timestamp when reference was received.

Referenced by consume(), and Task().

bool Maneuver::FollowReference::AUV::Task::m_moving

Are we moving or idle (floating)

Referenced by consume(), enableMovement(), and Task().

bool Maneuver::FollowReference::AUV::Task::m_path_sent

Referenced by consume(), enableMovement(), and Task().

IMC::PathControlState Maneuver::FollowReference::AUV::Task::m_pcs

Path Control state.

Referenced by consume(), and onPathControlState().

IMC::FollowReference Maneuver::FollowReference::AUV::Task::m_spec

Store maneuver specification.

Referenced by consume().

const uint8_t Maneuver::FollowReference::AUV::Task::RADIUS_CHANGED
static

Referenced by pathDifferences().

const uint8_t Maneuver::FollowReference::AUV::Task::SPEED_CHANGED
static

Referenced by pathDifferences().

const uint8_t Maneuver::FollowReference::AUV::Task::Z_CHANGED
static

Referenced by pathDifferences().

Collaboration diagram for Maneuver::FollowReference::AUV::Task:
Collaboration graph