mobile_robot_wall_cts.h
Go to the documentation of this file.
1 // Copyright (C) 2006 Klaas Gadeyne <first dot last at gmail dot com>
2 // Tinne De Laet <first dot last at mech dot kuleuven dot be>
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation; either version 2.1 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 
19 #ifndef __MOBILE_ROBOT_CTS_
20 #define __MOBILE_ROBOT_CTS_
21 
22 #include <cmath>
23 
24 // To use measurements specify 1
25 // To do deadreckoning (no measurements) specify 0
26 #define USE_MEASUREMENTS 0
27 
28 #define DELTA_T 1 // Delta t (for discretisation)
29 #define NUM_TIME_STEPS 101 // Number of steps that simulation is running
30 
31 // Coordinates of wall to which distance is measured
32 #define RICO_WALL 0.0
33 #define OFFSET_WALL (0)//100
34 
35 // Sizes
36 #define STATE_SIZE 3 //state: x,y,theta
37 #define INPUT_SIZE 2 //input: v*deltat, omega*deltat
38 #define MEAS_SIZE 1 //USmeasurment: distance_to_wall
39 
40 //Initial position and orientation of the mobile robot
41 #define X_0 0
42 #define Y_0 0
43 #define THETA_0 M_PI/4
44 
45 // Velocity send to the robot, in this case constant for the whole simulation
46 #define LIN_SPEED 0.1 //translational velocity: v
47 #define ROT_SPEED 0 //rotational velocity: omega
48 
49 #define NUM_SAMPLES 1000 // Default Number of Samples
50 #define RESAMPLE_PERIOD 0 // Default Resample Period
51 #define RESAMPLE_THRESHOLD (NUM_SAMPLES/4.0) // Threshold for Dynamic Resampling
52 
53 // Prior:
54 // Initial estimate of position and orientation
55 #define PRIOR_MU_X -0.1
56 #define PRIOR_MU_Y 0.1
57 #define PRIOR_MU_THETA M_PI/4 //M_PI/4
58 // Initial covariances of position and orientation
59 #define PRIOR_COV_X pow(0.2,2)
60 #define PRIOR_COV_Y pow(0.2,2)
61 #define PRIOR_COV_THETA pow(M_PI/8,2)
62 
63 // FOR MIXTURE
64 // Initial estimate of position and orientation
65 #define PRIOR_MU_X1 0.1
66 #define PRIOR_MU_Y1 -0.1
67 #define PRIOR_MU_THETA1 M_PI/4 //M_PI/4
68 // Initial covariances of position and orientation
69 #define PRIOR_COV_X1 pow(0.2,2)
70 #define PRIOR_COV_Y1 pow(0.2,2)
71 #define PRIOR_COV_THETA1 pow(M_PI/8,2)
72 // Initial estimate of position and orientation
73 #define PRIOR_MU_X2 -0.1
74 #define PRIOR_MU_Y2 0.1
75 #define PRIOR_MU_THETA2 M_PI/4 //M_PI/4
76 // Initial covariances of position and orientation
77 #define PRIOR_COV_X2 pow(0.2,2)
78 #define PRIOR_COV_Y2 pow(0.2,2)
79 #define PRIOR_COV_THETA2 pow(M_PI/8,2)
80 // Initial estimate of position and orientation
81 #define PRIOR_MU_X3 0.1
82 #define PRIOR_MU_Y3 0.1
83 #define PRIOR_MU_THETA3 M_PI/4 //M_PI/4
84 // Initial covariances of position and orientation
85 #define PRIOR_COV_X3 pow(0.2,2)
86 #define PRIOR_COV_Y3 pow(0.2,2)
87 #define PRIOR_COV_THETA3 pow(M_PI/8,2)
88 // Initial estimate of position and orientation
89 #define PRIOR_MU_X4 -0.1
90 #define PRIOR_MU_Y4 0.1
91 #define PRIOR_MU_THETA4 M_PI/4 //M_PI/4
92 // Initial covariances of position and orientation
93 #define PRIOR_COV_X4 pow(0.2,2)
94 #define PRIOR_COV_Y4 pow(0.2,2)
95 #define PRIOR_COV_THETA4 pow(M_PI/8,2)
96 
97 // System Noise
98 #define MU_SYSTEM_NOISE_X 0.0
99 #define MU_SYSTEM_NOISE_Y 0.0
100 #define MU_SYSTEM_NOISE_THETA 0.0
101 #define SIGMA_SYSTEM_NOISE_X pow(0.01,2)
102 #define SIGMA_SYSTEM_NOISE_Y pow(0.01,2)
103 #define SIGMA_SYSTEM_NOISE_THETA pow(2*M_PI/180,2)
104 
105 
106 // System Noise for mobile robot simulator
107 #define MU_SYSTEM_NOISE_X_ROB 0.0
108 #define MU_SYSTEM_NOISE_Y_ROB 0.0
109 #define MU_SYSTEM_NOISE_THETA_ROB 0.0
110 #define SIGMA_SYSTEM_NOISE_X_ROB pow(0.001,2)
111 #define SIGMA_SYSTEM_NOISE_Y_ROB pow(0.001,2)
112 #define SIGMA_SYSTEM_NOISE_THETA_ROB pow(0.1*M_PI/180,2)
113 
114 // System Noise for simulation
115 #define SIM_FACTOR 1000 //The system covariance in simulation is SIM_FACTOR
116  //smaller than the system covariance of the systemmodel
117 
118 // Measurement noise
119 #define SIGMA_MEAS_NOISE pow(0.05,2)
120 #define MU_MEAS_NOISE 0.0
121 
122 // Measurement noise for mobile robot simulator
123 #define SIGMA_MEAS_NOISE_ROB pow(0.05,2)
124 #define MU_MEAS_NOISE_ROB 0.0
125 
126 #define NUM_ITERATIONS 3 //number of iterations used for iteraded filters
127 
128 
129 //Write output of mixture filter to file
130 #define OUTPUT_MIXTURE true
131 
132 #endif //__MOBILE_ROBOT_CTS


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Jun 10 2019 12:47:59