Fawkes API
Fawkes Development Version
|
Motor to position mapper for player integration. More...
#include "motor_mapper.h"
Public Member Functions | |
PlayerMotorPositionMapper (std::string varname, fawkes::MotorInterface *interface, PlayerCc::Position2dProxy *proxy) | |
Constructor. More... | |
virtual void | sync_fawkes_to_player () |
Sync Fawkes interface to Player proxy. More... | |
virtual void | sync_player_to_fawkes () |
Sync Player proxy to Fawkes interface. More... | |
![]() | |
PlayerProxyFawkesInterfaceMapper (std::string varname) | |
Constructor. More... | |
virtual | ~PlayerProxyFawkesInterfaceMapper () |
Virtual empty destructor. More... | |
std::string | varname () const |
Get variable name. More... | |
Motor to position mapper for player integration.
This class is used to map a Player position2d proxy to a Fawkes MotorInterface.
It maps
Definition at line 36 of file motor_mapper.h.
PlayerMotorPositionMapper::PlayerMotorPositionMapper | ( | std::string | varname, |
fawkes::MotorInterface * | interface, | ||
PlayerCc::Position2dProxy * | proxy | ||
) |
Constructor.
varname | variable name |
interface | Fawkes interface instance |
proxy | Player proxy instance |
Definition at line 50 of file motor_mapper.cpp.
|
virtual |
Sync Fawkes interface to Player proxy.
This method should be implemented to copy any outstanding data from the Fawkes interface (messages) to the Player interface. This method will be called in the ACT_EXEC hook of the BlockedTimingAspect (cf. MainLoop).
Implements PlayerProxyFawkesInterfaceMapper.
Definition at line 75 of file motor_mapper.cpp.
References fawkes::MotorInterface::SetMotorStateMessage::motor_state(), fawkes::Interface::msgq_empty(), fawkes::Interface::msgq_first(), fawkes::Interface::msgq_first_is(), fawkes::Interface::msgq_pop(), fawkes::MotorInterface::GotoMessage::phi(), fawkes::MotorInterface::GotoMessage::x(), and fawkes::MotorInterface::GotoMessage::y().
|
virtual |
Sync Player proxy to Fawkes interface.
This method should be implemented to copy any outstanding data from the Player proxy to the Fawkes interface. This method will be called in the ACT_EXEC hook of the BlockedTimingAspect (cf. MainLoop).
Implements PlayerProxyFawkesInterfaceMapper.
Definition at line 61 of file motor_mapper.cpp.
References fawkes::MotorInterface::set_odometry_orientation(), fawkes::MotorInterface::set_odometry_position_x(), fawkes::MotorInterface::set_odometry_position_y(), and fawkes::Interface::write().