Fawkes API
Fawkes Development Version
amcl_odom.h
1
/***************************************************************************
2
* amcl_odom.h: Odometry sensor model for AMCL
3
*
4
* Created: Thu May 24 18:51:17 2012
5
* Copyright 2000 Brian Gerkey
6
* 2000 Kasper Stoy
7
* 2012 Tim Niemueller [www.niemueller.de]
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
/* From:
24
* Player - One Hell of a Robot Server (LGPL)
25
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
26
* gerkey@usc.edu kaspers@robotics.usc.edu
27
*/
28
///////////////////////////////////////////////////////////////////////////
29
// Desc: Odometry sensor model for AMCL
30
// Author: Andrew Howard
31
// Date: 17 Aug 2003
32
///////////////////////////////////////////////////////////////////////////
33
34
#ifndef AMCL_ODOM_H
35
#define AMCL_ODOM_H
36
37
#include "amcl_sensor.h"
38
#include "../pf/pf_pdf.h"
39
40
/// @cond EXTERNAL
41
42
namespace
amcl
43
{
44
45
typedef
enum
46
{
47
ODOM_MODEL_DIFF,
48
ODOM_MODEL_OMNI
49
} odom_model_t;
50
51
// Odometric sensor data
52
class
AMCLOdomData :
public
AMCLSensorData
53
{
54
// Odometric pose
55
public
: pf_vector_t pose;
56
57
// Change in odometric pose
58
public
: pf_vector_t delta;
59
};
60
61
62
// Odometric sensor model
63
class
AMCLOdom :
public
AMCLSensor
64
{
65
// Default constructor
66
public
: AMCLOdom();
67
68
public
:
void
SetModelDiff(
double
alpha1,
69
double
alpha2,
70
double
alpha3,
71
double
alpha4);
72
73
public
:
void
SetModelOmni(
double
alpha1,
74
double
alpha2,
75
double
alpha3,
76
double
alpha4,
77
double
alpha5);
78
79
// Update the filter based on the action model. Returns true if the filter
80
// has been updated.
81
public
:
virtual
bool
UpdateAction(pf_t *pf, AMCLSensorData *data);
82
83
// Current data timestamp
84
private
:
double
time;
85
86
// Model type
87
private
: odom_model_t model_type;
88
89
// Drift parameters
90
private
:
double
alpha1, alpha2, alpha3, alpha4, alpha5;
91
};
92
93
94
}
95
96
/// @endcond
97
98
#endif
amcl
src
plugins
amcl
sensors
amcl_odom.h
Generated by
1.8.13