amcl_sensor.h
Go to the documentation of this file.
1 /*
2  * Player - One Hell of a Robot Server
3  * Copyright (C) 2000 Brian Gerkey et al.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */
20 //
21 // Desc: Adaptive Monte-Carlo localization
22 // Author: Andrew Howard
23 // Date: 6 Feb 2003
24 // CVS: $Id: amcl_sensor.h 6443 2008-05-15 19:46:11Z gerkey $
25 //
27 
28 #ifndef AMCL_SENSOR_H
29 #define AMCL_SENSOR_H
30 
31 #include "../pf/pf.h"
32 
33 namespace amcl
34 {
35 
36 // Forward declarations
37 class AMCLSensorData;
38 
39 
40 // Base class for all AMCL sensors
42 {
43  // Default constructor
44  public: AMCLSensor();
45 
46  // Default destructor
47  public: virtual ~AMCLSensor();
48 
49  // Update the filter based on the action model. Returns true if the filter
50  // has been updated.
51  public: virtual bool UpdateAction(pf_t *pf, AMCLSensorData *data);
52 
53  // Initialize the filter based on the sensor model. Returns true if the
54  // filter has been initialized.
55  public: virtual bool InitSensor(pf_t *pf, AMCLSensorData *data);
56 
57  // Update the filter based on the sensor model. Returns true if the
58  // filter has been updated.
59  public: virtual bool UpdateSensor(pf_t *pf, AMCLSensorData *data);
60 
61  // Flag is true if this is the action sensor
62  public: bool is_action;
63 
64  // Action pose (action sensors only)
65  public: pf_vector_t pose;
66 
67  // AMCL Base
68  //protected: AdaptiveMCL & AMCL;
69 
70 #ifdef INCLUDE_RTKGUI
71  // Setup the GUI
72  public: virtual void SetupGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
73 
74  // Finalize the GUI
75  public: virtual void ShutdownGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
76 
77  // Draw sensor data
78  public: virtual void UpdateGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig, AMCLSensorData *data);
79 #endif
80 };
81 
82 
83 
84 // Base class for all AMCL sensor measurements
86 {
87  // Pointer to sensor that generated the data
88  public: AMCLSensor *sensor;
89  virtual ~AMCLSensorData() {}
90 
91  // Data timestamp
92  public: double time;
93 };
94 
95 }
96 
97 #endif
virtual ~AMCLSensor()
Definition: amcl_sensor.cpp:42
Definition: pf.h:112
virtual bool UpdateAction(pf_t *pf, AMCLSensorData *data)
Definition: amcl_sensor.cpp:48
virtual bool InitSensor(pf_t *pf, AMCLSensorData *data)
Definition: amcl_sensor.cpp:56
pf_vector_t pose
Definition: amcl_sensor.h:65
AMCLSensor * sensor
Definition: amcl_sensor.h:88
virtual bool UpdateSensor(pf_t *pf, AMCLSensorData *data)
Definition: amcl_sensor.cpp:64
virtual ~AMCLSensorData()
Definition: amcl_sensor.h:89


amcl
Author(s): Brian P. Gerkey, contradict@gmail.com
autogenerated on Thu Jan 21 2021 04:05:36