AdaptiveMCL Class Reference
Inheritance diagram for AdaptiveMCL:Detailed Description
Definition at line 69 of file amcl.h.
Public Member Functions | |
AdaptiveMCL (ConfigFile *cf, int section) | |
virtual | ~AdaptiveMCL (void) |
virtual int | Setup (void) |
Initialize the driver. | |
virtual int | Shutdown (void) |
Finalize the driver. | |
void | Push (AMCLSensorData *data) |
virtual int | ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data) |
Message handler. | |
virtual void | UpdateSensorData (void) |
Private Member Functions | |
AMCLSensorData * | Peek (void) |
AMCLSensorData * | Pop (void) |
virtual void | Main (void) |
Main method for driver thread. | |
virtual void | MainQuit () |
Cleanup method for driver thread (called when main exits). | |
void | InitFilter (void) |
bool | UpdateFilter () |
void | PutDataLocalize (double time) |
void | PutDataPosition (pf_vector_t delta, double time) |
void | ProcessGeom (QueuePointer &resp_queue, player_msghdr_t *hdr) |
Private Attributes | |
player_devaddr_t | position_addr |
player_devaddr_t | localize_addr |
int | sensor_count |
AMCLSensor * | sensors [16] |
int | init_sensor |
int | action_sensor |
pf_t * | pf |
int | pf_min_samples |
int | pf_max_samples |
double | pf_err |
double | pf_z |
int | q_size |
int | q_start |
int | q_len |
AMCLSensorData ** | q_data |
int | hyp_count |
int | hyp_alloc |
amcl_hyp_t * | hyps |
pf_vector_t | best_hyp |
pthread_mutex_t | best_hyp_lock |
bool | pf_init |
pf_vector_t | pf_init_pose_mean |
pf_matrix_t | pf_init_pose_cov |
pf_vector_t | pf_odom_pose |
double | min_dr |
double | min_da |
Member Function Documentation
int AdaptiveMCL::Setup | ( | void | ) | [virtual] |
Initialize the driver.
This function is called with the first client subscribes; it MUST be implemented by the driver.
- Returns:
- Returns 0 on success.
Implements Driver.
Definition at line 505 of file amcl.cc.
References pf, pf_err, pf_z, PLAYER_ERROR1, PLAYER_MSG0, _pf_t::pop_err, _pf_t::pop_z, and sensor_count.
int AdaptiveMCL::Shutdown | ( | void | ) | [virtual] |
Finalize the driver.
This function is called with the last client unsubscribes; it MUST be implemented by the driver.
- Returns:
- Returns 0 on success.
Implements Driver.
Definition at line 534 of file amcl.cc.
References pf, PLAYER_MSG0, sensor_count, and Driver::StopThread().
Here is the call graph for this function:
int AdaptiveMCL::ProcessMessage | ( | QueuePointer & | resp_queue, | |
player_msghdr * | hdr, | |||
void * | data | |||
) | [virtual] |
Message handler.
This function is called once for each message in the incoming queue. Reimplement it to provide message handling. Return 0 if you handled the message and -1 otherwise
- Parameters:
-
resp_queue The queue to which any response should go. hdr The message header data The message body
Reimplemented from Driver.
Definition at line 1101 of file amcl.cc.
References player_localize_particle::alpha, player_localize_set_pose::cov, _pf_t::current_set, Driver::device_addr, pf_matrix_t::m, Message::MatchMessage(), player_localize_get_particles::mean, player_localize_set_pose::mean, player_pose2d::pa, player_localize_get_particles::particles, player_localize_get_particles::particles_count, pf, pf_init, pf_init_pose_cov, pf_init_pose_mean, PLAYER_LOCALIZE_REQ_GET_PARTICLES, PLAYER_LOCALIZE_REQ_SET_POSE, PLAYER_MSGTYPE_REQ, PLAYER_MSGTYPE_RESP_ACK, PLAYER_POSITION2D_REQ_GET_GEOM, pf_sample_t::pose, player_localize_particle::pose, ProcessGeom(), Driver::Publish(), player_pose2d::px, player_pose2d::py, _pf_sample_set_t::sample_count, _pf_sample_set_t::samples, sensor_count, _pf_t::sets, pf_vector_t::v, player_localize_get_particles::variance, and pf_sample_t::weight.
Here is the call graph for this function:
void AdaptiveMCL::Main | ( | void | ) | [private, virtual] |
Main method for driver thread.
drivers have their own thread of execution, created using StartThread(); this is the entry point for the driver thread, and must be overloaded by all threaded drivers.
Reimplemented from Driver.
Definition at line 660 of file amcl.cc.
References hyp_count, InitFilter(), pf, pf_init, Driver::ProcessMessages(), and q_len.
Here is the call graph for this function:
void AdaptiveMCL::MainQuit | ( | ) | [private, virtual] |
The documentation for this class was generated from the following files: