Public Member Functions

PlayerMotorPositionMapper Class Reference

Motor to position mapper for player integration. More...

#include "motor_mapper.h"

Inheritance diagram for PlayerMotorPositionMapper:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PlayerMotorPositionMapper (std::string varname, fawkes::MotorInterface *interface, PlayerCc::Position2dProxy *proxy)
 Constructor.
virtual void sync_fawkes_to_player ()
 Sync Fawkes interface to Player proxy.
virtual void sync_player_to_fawkes ()
 Sync Player proxy to Fawkes interface.

Detailed Description

Motor to position mapper for player integration.

This class is used to map a Player position2d proxy to a Fawkes MotorInterface.

It maps

Author:
Tim Niemueller

Definition at line 36 of file motor_mapper.h.


Constructor & Destructor Documentation

PlayerMotorPositionMapper::PlayerMotorPositionMapper ( std::string  varname,
fawkes::MotorInterface interface,
PlayerCc::Position2dProxy *  proxy 
)

Constructor.

Parameters:
varname variable name
interface Fawkes interface instance
proxy Player proxy instance

Definition at line 50 of file motor_mapper.cpp.


Member Function Documentation

void PlayerMotorPositionMapper::sync_fawkes_to_player (  )  [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().

void PlayerMotorPositionMapper::sync_player_to_fawkes (  )  [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().


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