23 #include "motor_mapper.h"
25 #include <interfaces/MotorInterface.h>
26 #include <libplayerc++/playerc++.h>
30 using namespace PlayerCc;
53 PlayerCc::Position2dProxy *proxy)
56 interface_ = interface;
63 if (proxy_->IsFresh()) {
81 proxy_->SetMotorEnable(m->
motor_state() == MotorInterface::MOTOR_ENABLED);
83 proxy_->ResetOdometry();
86 proxy_->GoTo(m->
x(), m->
y(), m->
phi());
virtual void sync_fawkes_to_player()
Sync Fawkes interface to Player proxy.
PlayerMotorPositionMapper(const std::string &varname, fawkes::MotorInterface *interface, PlayerCc::Position2dProxy *proxy)
Constructor.
virtual void sync_player_to_fawkes()
Sync Player proxy to Fawkes interface.
Player proxy to Fawkes interface mapper interface.
bool msgq_first_is()
Check if first message has desired type.
void msgq_pop()
Erase first message from queue.
Message * msgq_first()
Get the first message from the message queue.
void write()
Write from local copy into BlackBoard memory.
bool msgq_empty()
Check if queue is empty.
GotoMessage Fawkes BlackBoard Interface Message.
float phi() const
Get phi value.
float x() const
Get x value.
float y() const
Get y value.
ResetOdometryMessage Fawkes BlackBoard Interface Message.
SetMotorStateMessage Fawkes BlackBoard Interface Message.
uint32_t motor_state() const
Get motor_state value.
MotorInterface Fawkes BlackBoard Interface.
void set_odometry_orientation(const float new_odometry_orientation)
Set odometry_orientation value.
void set_odometry_position_x(const float new_odometry_position_x)
Set odometry_position_x value.
void set_odometry_position_y(const float new_odometry_position_y)
Set odometry_position_y value.
Fawkes library namespace.