epuckDriver.hpp
virtual void Publish(player_devaddr_t addr, QueuePointer &queue, uint8_t type, uint8_t subtype, void *src=NULL, size_t deprecated=0, double *timestamp=NULL, bool copy=true)
Publish a message via one of this driver's interfaces.
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
Struct which represents the pose and velocity of e-puck.
Definition: epuckPosition2d.hpp:46
virtual int MainSetup()
Sets up the resources needed by the driver thread.
Definition: epuckDriver.cpp:222
const char * ReadString(int section, const char *name, const char *value)
Read a string value.
@ RGB_565_MODE
RGB color mode, with 16 bits per pixel.
Definition: epuckCamera.hpp:83
float height
Height of e-puck body.
Definition: epuckPosition2d.hpp:41
EpuckCamera(const SerialPort *const serialPort, unsigned sensor_x1, unsigned sensor_y1, unsigned sensor_width, unsigned sensor_height, unsigned zoom_fact_width, unsigned zoom_fact_height, ColorModes color_mode)
The EpuckCamera class constructor.
Definition: epuckCamera.cpp:43
ColorModes
Possible color modes for e-puck camera.
Definition: epuckCamera.hpp:81
QueuePointer InQueue
Queue for all incoming messages for this driver.
Definition: driver.h:285
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
Plug-in driver for the e-puck robot, in conformity with Player version 2.1.
Definition: epuckDriver.hpp:42
unsigned recvUnsigned() const
Receive an unsigned interger from e-puck.
Definition: serialPort.cpp:115
std::vector< float > voltages
The raw IR readings.
Definition: epuckIR.hpp:41
Struct which represents the geometry of e-puck body.
Definition: epuckPosition2d.hpp:39
Triple velocity
E-puck velocity in a 2D surface.
Definition: epuckPosition2d.hpp:48
void sendInt(int message) const
Send an integer to e-puck.
Definition: serialPort.cpp:172
const SerialPort *const serialPort
A SerialPort class instance shared among the device interfaces.
Definition: epuckInterface.hpp:59
static const unsigned RING_LEDS_NUM
The quantity of LEDs in e-puck ring LEDs.
Definition: epuckLEDs.hpp:36
int ReadDeviceAddr(player_devaddr_t *addr, int section, const char *name, int code, int index, const char *key)
Read a device id.
std::vector< float > ranges
The equivalent obstacle distance.
Definition: epuckIR.hpp:42
@ GREY_SCALE_MODE
Grey color mode, with 8 bits per pixel.
Definition: epuckCamera.hpp:82
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
Definition: epuckDriver.cpp:290
int initialize()
Open the serial port device and set the configurations for it.
Definition: serialPort.cpp:39
virtual void MainQuit()
Cleanup method for driver thread (called when main exits)
Definition: epuckDriver.cpp:257
float width
Width of e-puck body.
Definition: epuckPosition2d.hpp:40
virtual int Unsubscribe(player_devaddr_t addr)
Unsubscribe from this driver.
Definition: epuckDriver.cpp:274
virtual int Subscribe(player_devaddr_t addr)
Subscribe to this driver.
Definition: epuckDriver.cpp:263
@ YUV_MODE
YUV color mode, with 16 bits per pixel.
Definition: epuckCamera.hpp:84
Struct which represents a triple (x,y,theta).
Definition: epuckInterface.hpp:39
Triple pose
E-puck pose in a 2D surface.
Definition: epuckPosition2d.hpp:47
uint16_t interf
The interface provided by the device; must be one of PLAYER_*_CODE.
Definition: player.h:153
#define PLAYER_MSGQUEUE_DEFAULT_MAXLEN
Default maximum length for a message queue.
Definition: player.h:76