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


gmcl
Author(s): Mhd Ali Alshikh Khalil, adler1994@gmail.com
autogenerated on Wed Mar 2 2022 00:20:14