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());
SetMotorStateMessage Fawkes BlackBoard Interface Message.
bool msgq_empty()
Check if queue is empty.
void set_odometry_position_y(const float new_odometry_position_y)
Set odometry_position_y value.
Fawkes library namespace.
float y() const
Get y value.
void set_odometry_orientation(const float new_odometry_orientation)
Set odometry_orientation value.
void write()
Write from local copy into BlackBoard memory.
float phi() const
Get phi value.
ResetOdometryMessage Fawkes BlackBoard Interface Message.
void msgq_pop()
Erase first message from queue.
Player proxy to Fawkes interface mapper interface.
PlayerMotorPositionMapper(const std::string &varname, fawkes::MotorInterface *interface, PlayerCc::Position2dProxy *proxy)
Constructor.
Message * msgq_first()
Get the first message from the message queue.
bool msgq_first_is()
Check if first message has desired type.
uint32_t motor_state() const
Get motor_state value.
virtual void sync_fawkes_to_player()
Sync Fawkes interface to Player proxy.
void set_odometry_position_x(const float new_odometry_position_x)
Set odometry_position_x value.
MotorInterface Fawkes BlackBoard Interface.
GotoMessage Fawkes BlackBoard Interface Message.
float x() const
Get x value.
virtual void sync_player_to_fawkes()
Sync Player proxy to Fawkes interface.