-
Notifications
You must be signed in to change notification settings - Fork 6
/
pose_estimation.orogen
334 lines (259 loc) · 11.7 KB
/
pose_estimation.orogen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
name "pose_estimation"
# version "0.1"
using_library "pose_estimation"
import_types_from "base"
import_types_from "pose_estimationTypes.hpp"
import_types_from "pose_estimation/orientation_estimator/OrientationUKFConfig.hpp"
task_context "OrientationEstimator" do
needs_configuration
#******************************
#***** Filter Properties ******
#******************************
# Maximum time delta of a prediction step
property( "max_time_delta", "double", 2.0 )
# The initial orientation in euler angles
property( "initial_orientation", "/base/Vector3d" )
# The initial covariance diagonal
property( "initial_orientation_cov_diag", "/base/Vector3d" )
# Filter configuration
property( "filter_config", "/pose_estimation/OrientationUKFConfig" )
# The target frame in the generated poses. The source frame is the body frame (as declared in the transformer configuration)
property( 'target_frame', '/std/string', 'world' )
#******************************
#******* Input Ports **********
#******************************
# Velocity samples
input_port( "velocity_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection
# IMU acceleration and angular velocity samples
input_port('imu_sensor_samples', '/base/samples/IMUSensors').
needs_reliable_connection
#******************************
#******* Output Ports *********
#******************************
# Timestamped samples of the current estimated orientation and velocity of the robot.
output_port( "orientation_samples", "/base/samples/RigidBodyState" )
# Secondary filter states
output_port( "secondary_states", "/pose_estimation/OrientationUKFSecondaryStates")
#******************************
#** Aggregator Parameters *****
#******************************
transformer do
transformation("imu", "body")
transformation("velocity_provider", "body")
align_port("velocity_samples", 0.1)
align_port("imu_sensor_samples", 0.01)
max_latency(0.05)
end
#******************************
#********* Operations *********
#******************************
# Add an offset to the current heading and reinitialize the filter.
#
# This is commonly used to align the heading estimate to the true north.
operation('addHeadingOffset').
returns('bool').
argument('heading_offset', 'double', 'heading_offset').
argument('variance', 'double', 'Initial variance of the new heading state in (rad/s)^2')
#******************************
#******** Task States *********
#******************************
runtime_states :MISSING_TRANSFORMATION, :TRANSFORMATION_ALIGNMENT_FAILURES
exception_states :CRITICAL_ALIGNMENT_FAILURE
periodic 0.01
end
task_context "RBSFilter" do
abstract
needs_configuration
#******************************
#***** Filter Properties ******
#******************************
# Deprecated, only the UKF is available
property( "filter_type", "/pose_estimation/deprecated/FilterType", :UKF )
property( "max_time_delta", "double", 2.0 )
property( "initial_state", "/base/samples/RigidBodyState" ).
doc("the initial state, NaN values will be ignored.")
property( "process_noise", "/pose_estimation/ProcessNoise" ).
doc("Filter process noise, NaN values will be ignored and set to a healthy but likely overconfident value.")
property( 'target_frame', '/std/string', 'world' ).
doc "The target frame in the generated poses. The source frame is the body frame (as declared in the transformer configuration)"
#******************************
#******* Output Ports *********
#******************************
output_port( "pose_samples", "/base/samples/RigidBodyState" ).
doc "timestamped samples of the current estimated pose of the robot."
#******************************
#********* Operations *********
#******************************
operation('resetState').
returns('bool').
doc 'resets the current state to the initial state.'
#******************************
#******** Task States *********
#******************************
runtime_states :MISSING_TRANSFORMATION, :TRANSFORMATION_ALIGNMENT_FAILURES
exception_states :CRITICAL_ALIGNMENT_FAILURE
periodic 0.01
end
task_context "UWPoseEstimator" do
subclasses "RBSFilter"
needs_configuration
#******************************
#******* Input Ports **********
#******************************
input_port( "acceleration_samples", "/base/samples/RigidBodyAcceleration" ).
needs_reliable_connection.
doc "acceleration samples with uncertainty from an IMU, in case this port is connected the measurement uncertainty is used instead of the process noise."
input_port( "orientation_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "orientation samples from an IMU and or a FOG, containing the orientation and the angular velocity."
input_port( "depth_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "depth samples from a pressure sensor, containing the absolute z-position in world coordinates."
input_port( "dvl_velocity_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "velocity samples from a DVL, containing the velocity."
input_port( "model_velocity_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "model based velocity samples, containing the xy velocity."
input_port( "lbl_position_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "position samples from a LBL or USBL, containing the absolute position in world coordinates."
input_port( "xy_position_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "position samples from a localization module, containing the xy position in world coordinates."
input_port( "gps_position_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "position samples from a gps-sensor, containing position in gps-coordinates"
input_port( "xyz_position_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "position samples from a localization module, containing the xyz position in world coordinates."
#******************************
#** Aggregator Parameters *****
#******************************
transformer do
transformation("imu", "body")
transformation("pressure_sensor", "body")
transformation("dvl", "body")
transformation("lbl", "body")
transformation("gps", "body")
align_port("acceleration_samples", 0.01)
align_port("orientation_samples", 0.01)
align_port("depth_samples", 0.01)
align_port("dvl_velocity_samples", 0.01)
align_port("model_velocity_samples", 0.01)
align_port("lbl_position_samples", 0.01)
align_port("xy_position_samples", 0.01)
align_port("gps_position_samples", 0.01)
align_port("xyz_position_samples", 0.01)
max_latency(0.1)
end
find_property('transformer_max_latency').dynamic
periodic 0.01
end
task_context "HighDelayPoseEstimator" do
subclasses "RBSFilter"
needs_configuration
#******************************
#******* Input Ports **********
#******************************
input_port( "pose_samples_fast", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "Pose samples with will be processed fast to create a actual pose"
input_port( "pose_samples_slow", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "Pose samples which will be precessed when a new delayed meassurement arives"
input_port( "xy_position_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "Position samples with can have a high delay"
#******************************
#** Aggregator Parameters *****
#******************************
transformer do
transformation("xy_map", "target_map")
align_port("pose_samples_slow", 0.01)
align_port("xy_position_samples", 5.0)
max_latency(30.0)
end
periodic 0.01
end
task_context "VehiclePoseEstimator" do
subclasses "RBSFilter"
needs_configuration
#******************************
#******* Input Ports **********
#******************************
input_port( "orientation_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "orientation samples from an IMU and or a FOG, containing the orientation and the angular velocity."
input_port( "velocity_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "velocity samples from the odometry, containing the velocity."
input_port( "position_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection.
doc "position samples from a slam component, containing the absolute position in world coordinates."
#******************************
#** Aggregator Parameters *****
#******************************
transformer do
transformation("imu", "body")
align_port("orientation_samples", 0.01)
align_port("velocity_samples", 0.01)
align_port("position_samples", 0.01)
max_latency(0.1)
end
periodic 0.01
end
# This component allows to find a initial heading based on the ability of the IMU
# to measure the rotation of the earth.
# It utilizes multiple orientation filters with different initial headings and
# writes out their average heading after they converge to a close result.
task_context "OrientationInitialization" do
needs_configuration
#******************************
#***** Filter Properties ******
#******************************
# Maximum time delta of a prediction step
property( "max_time_delta", "double", 2.0 )
# The initial orientation in euler angles
property( "initial_orientation", "/base/Vector3d" )
# The initial covariance diagonal
property( "initial_orientation_cov_diag", "/base/Vector3d" )
# Filter configuration
property( "filter_config", "/pose_estimation/OrientationUKFConfig" )
# The target frame in the generated poses. The source frame is the body frame (as declared in the transformer configuration)
property( 'target_frame', '/std/string', 'world' )
# Convergence threshold as yaw angle difference
property( "convergence_threshold", "double", 0.0174 )
#******************************
#******* Input Ports **********
#******************************
# Velocity samples
input_port( "velocity_samples", "/base/samples/RigidBodyState" ).
needs_reliable_connection
# IMU acceleration and angular velocity samples
input_port('imu_sensor_samples', '/base/samples/IMUSensors').
needs_reliable_connection
#******************************
#******* Output Ports *********
#******************************
# Timestamped samples of the current estimated orientation of the robot.
output_port( "orientation_samples", "/base/samples/RigidBodyState" )
#******************************
#** Aggregator Parameters *****
#******************************
transformer do
transformation("imu", "body")
transformation("velocity_provider", "body")
align_port("velocity_samples", 0.1)
align_port("imu_sensor_samples", 0.01)
max_latency(0.05)
end
#******************************
#******** Task States *********
#******************************
runtime_states :MISSING_TRANSFORMATION, :TRANSFORMATION_ALIGNMENT_FAILURES,
:INITIALIZATION_COMPLETE, :INITIALIZATION
exception_states :CRITICAL_ALIGNMENT_FAILURE
periodic 0.01
end