41 #include <playerconfig.h>
46 #include <libplayercore/playercore.h>
110 public:
virtual void UpdateSensorData(
void);
113 private:
virtual void Main(
void);
119 private:
void InitFilter(
void);
122 private:
bool UpdateFilter();
125 private:
void PutDataLocalize(
double time);
128 private:
void PutDataPosition(
pf_vector_t delta,
double time);
133 #ifdef INCLUDE_RTKGUI
135 private:
int SetupGUI(
void);
138 private:
int ShutdownGUI(
void);
141 private:
void UpdateGUI(
void);
144 private:
void DrawPoseEst();
156 private:
int sensor_count;
160 private:
int init_sensor;
163 private:
int action_sensor;
167 private:
int pf_min_samples, pf_max_samples;
168 private:
double pf_err, pf_z;
171 private:
int q_size, q_start, q_len;
175 private:
int hyp_count;
176 private:
int hyp_alloc;
179 private: pthread_mutex_t best_hyp_lock;
182 private:
bool pf_init;
183 private:
bool pf_init_internal;
193 private:
double min_dr, min_da;
195 #ifdef INCLUDE_RTKGUI
197 private:
int enable_gui;
198 private: rtk_app_t *app;
199 private: rtk_canvas_t *canvas;
200 private: rtk_fig_t *map_fig;
201 private: rtk_fig_t *pf_fig;
202 private: rtk_fig_t *robot_fig;
205 #ifdef INCLUDE_OUTFILE
206 private: FILE *outfile;
Definition: amcl_sensor.h:44
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.
Definition: amcl_fiducial.h:62
Definition: pf_vector.h:42
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
double ReadFloat(int section, const char *name, double value)
Read a floating point (double) value.
Definition: amcl_sensor.h:106
virtual void MainQuit()
Cleanup method for driver thread (called when main exits)
Definition: amcl.cc:717
int AddInterface(player_devaddr_t addr)
Add an interface.
double ReadTupleLength(int section, const char *name, int index, double value)
Read a length from a tuple (includes units conversion)
Generic message header.
Definition: player.h:162
int ReadInt(int section, const char *name, int value)
Read an integer value.
void ProcessMessages(void)
Process pending messages.
#define PLAYER_MSGTYPE_DATA
A data message.
Definition: player.h:95
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
virtual int MainSetup(void)
Sets up the resources needed by the driver thread.
Definition: amcl.cc:508
#define PLAYER_MSGTYPE_REQ
A request message.
Definition: player.h:106
double ReadTupleAngle(int section, const char *name, int index, double value)
Read an angle form a tuple (includes units conversion)
int ReadDeviceAddr(player_devaddr_t *addr, int section, const char *name, int code, int index, const char *key)
Read a device id.
virtual int Shutdown()
Finalize the driver.
virtual int Setup()
Initialize the driver.
Class for loading configuration file information.
Definition: configfile.h:197
#define PLAYER_CAPABILITIES_REQ
Capability request message type.
Definition: player.h:397
A device address.
Definition: player.h:146
An autopointer for the message queue.
Definition: message.h:74
virtual void Main(void)
Main method for driver thread.
Definition: amcl.cc:625
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
Definition: amcl.cc:1092
void SetError(int code)
Set/reset error code.
Definition: driver.h:145
Definition: amcl_odom.h:38
#define PLAYER_ERROR1(msg, a)
Error message macros.
Definition: error.h:82
#define PLAYER_ERROR(msg)
Error message macros.
Definition: error.h:81
player_devaddr_t device_addr
Default device address (single-interface drivers)
Definition: driver.h:269
Base class for drivers which oeprate with a thread.
Definition: driver.h:553
uint32_t size
Size in bytes of the payload to follow.
Definition: player.h:174
Definition: pf_vector.h:49
Base class for all drivers.
Definition: driver.h:109
#define PLAYER_MSG0(level, msg)
General messages.
Definition: error.h:105
Definition: amcl_odom.h:49
Definition: amcl_laser.h:51