-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwall_servoing.orogen
250 lines (193 loc) · 8.96 KB
/
wall_servoing.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
name "wall_servoing"
import_types_from "base"
import_types_from "SonarDetectorTaskTypes.hpp"
import_types_from "auv_control"
import_types_from "avalon_control"
#using_library "mars_utils", :typekit => false
#using_library "mars_interfaces", :typekit => false
#using_library 'avalon-plugin'
#using_library 'marsusim'
#using_library 'mars_sim'
#using_task_library "avalon_control"
using_task_library "sonar_feature_estimator"
#using_task_library 'simulation'
#using_task_library 'auv_control'
using_library "sonar_detectors"
task_context "WallDetector" do
property("wall_direction", "double", 0.0)
property("opening_angle", "double", 0.7)
property("fading_out_factor","double", 0.028)
property("use_motion_model", "bool", 1)
property("wall_estimation_timeout", "double", 1)
property("offset", "double", 0)
input_port('sonarbeam_feature', '/base/samples/LaserScan').
needs_reliable_connection
input_port "orientation_sample", 'base::samples::RigidBodyState'
input_port "position_sample", 'base::samples::RigidBodyState'
output_port("point_cloud", "base::samples::Pointcloud")
output_port("wall", "sonar_detectors::Wall")
runtime_states :WALL_FOUND, :WALL_SEARCHING
port_driven "sonarbeam_feature"
end
task_context "WallServoing" do
property("servoing_direction", "double", 0.0)
property("servoing_depth", "double", 0.0)
property("servoing_distance", "double", 3.0)
property("servoing_speed", "double")
property("servoing_factor", "double")
property("correction_speed", "double")
property("correction_factor", "double")
property("search_direction", "double", 0.0)
property("direction_clockwise", "bool", true)
input_port "orientation_sample", 'base::samples::RigidBodyState'
input_port("servoing_wall", "sonar_detectors::Wall")
input_port("obstacle_wall", "sonar_detectors::Wall")
output_port("motion_command", "base::AUVMotionCommand")
output_port("world_command", "base::LinearAngular6DCommand")
output_port("aligned_velocity_command", "base::LinearAngular6DCommand")
runtime_states "GET_INITIAL_WALL_SEARCH_DIRECTION", "LEAVING_GET_INITIAL_WALL_SEARCH_DIRECTION", "INITIAL_WALL_SEARCH", "CORNER", "LEAVING_CORNER", "WALL_SERVOING"
port_driven "servoing_wall", "obstacle_wall"
end
task_context "SonarServoing" do
# controller settings
property("wall_distance", 'double', 2.0).
doc("reference distance to wall")
property("fixed_depth", 'double', -1.0).
doc("reference depth")
property("servoing_speed", "double", 0.0).
doc("set distance for the y axis, witch will result in a certain speed")
property("exploration_speed", "double", 0.2).
doc("the exploration will simply drive forward in the origin serviong direction")
end
task_context "SingleSonarServoing" do
subclasses "SonarServoing"
# controller settings
property("servoing_wall_direction", "double", 0.0).
doc("in this direction the wall be if the wall servoing is performed, default is 0 than the wall is in front")
property("initial_wall_direction", "double", 0.0).
doc("the initial heading of avalon to the wall, default is 0 than the wall is in front")
property("minimal_wall_distance", "double", 0.75).
doc("the auv will move away from the wall if the wall is to near")
# wall estimation settings
property("left_opening_angle","double", 0.0).
doc("opening angle to the left of the supposed wall direction, always positive")
property("right_opening_angle","double", 0.0).
doc("opening angle to the right of the supposed wall direction, always positive")
property("fading_out_factor","double", 0.028).
doc("fading out factor for the features in center wall estimator")
property("wait_until_start","double", 3.0).
doc("wait time in seconds until the wall servoing will start, this helps to get better data from the estimator")
property("use_motion_model","bool", false).
doc("use the motion model, to estimate the wall distance between sonar-scans").
doc("By using this, the sonar-data is only used, when a scan is complete")
property("check_distance_threshold","double", 1.0).
doc("The distance difference between two samples, at which a error is detected")
property("use_front_distance", "bool", true).
doc("Using the front-wall-distance to reduce servoing-speed in corner, when true")
property("left_front_angle", "double", 0.0).
doc("opening angle to the left of the supposed front wall direction, always positive")
property("right_front_angle", "double", 0.0).
doc("opening angle to the right of the supposed front wall direction,alway positive")
input_port('sonarbeam_feature', '/base/samples/LaserScan').
needs_reliable_connection.
doc("newest sonar feature")
input_port "orientation_sample", 'base::samples::RigidBodyState'
input_port('position_sample', 'base/samples/RigidBodyState').
doc("position samples, used to correct the wall-distance between laser scans")
output_port('position_command', '/base/AUVPositionCommand').
doc("relativ target position and heading")
output_port('aligned_position_command', 'base::LinearAngular6DCommand').
doc("relativ target x- and y- position for new control draft")
output_port('world_command', 'base::LinearAngular6DCommand').
doc("absolute depth, roll, pitch, and yaw for new control draft")
# debug
property("enable_debug_output", 'bool', false).
doc("enables the debug output port")
output_port('wall_servoing_debug', 'sonar_detectors/WallServoingDebugData').
doc("estimated wall data, the pointcloud, the wall, the distance, the time")
output_port("wall", "sonar_detectors::Wall").
doc("the detected wall")
runtime_states :WALL_SERVOING, :SEARCHING_WALL, :CHECKING_WALL, :DETECTED_CORNER, :LOST_WALL, :ORIGIN_ALIGNMENT, :ALIGNMENT_COMPLETE
error_states :MISCONFIGURATION
port_driven "sonarbeam_feature"
end
task_context "DualSonarServoing" do
subclasses "SonarServoing"
# wall estimation settings
property("opening_angle","double", 0.09).
doc("opening angle for each of the three observed angular ranges")
input_port('sonarbeam_feature_front', '/base/samples/LaserScan').
needs_reliable_connection.
doc("newest sonar feature")
input_port('sonarbeam_feature_rear', '/base/samples/LaserScan').
needs_reliable_connection.
doc("newest sonar feature")
input_port "orientation_sample", 'base::samples::RigidBodyState'
output_port('position_command', '/base/AUVPositionCommand').
doc("relativ target position and heading")
output_port('aligned_command', 'base::LinearAngular6DCommand').
doc("relativ target position and heading for new control draft")
# debug
property("enable_debug_output", 'bool', false).
doc("enables the debug output port")
output_port('wall_servoing_debug', 'sonar_detectors/DualWallServoingDebugData').
doc("estimated wall data, the pointcloud, the wall, the distance, the time")
runtime_states :WALL_SERVOING, :SEARCHING_WALL, :DETECTED_CORNER
error_states :MISCONFIGURATION
port_driven "sonarbeam_feature_front", "sonarbeam_feature_rear"
end
deployment "wall_servoing_test" do
do_not_install
task("wall_servoing", "SingleSonarServoing")
task("wall_servoing_new", "WallServoing")
task("wall_detector", "WallDetector")
task("servoing_wall_detector", "WallDetector")
task("obstacle_wall_detector", "WallDetector")
task("dual_wall_servoing", "DualSonarServoing")
# task('avalon_simulation', 'simulation::Mars').
# periodic(0.1)
#
# task('imu', "simulation::MarsIMU").
# periodic(0.1)
#
# task("sonar","simulation::Sonar").
# periodic 0.066666
#
# task("ground_distance","simulation::MarsAltimeter").
# periodic 0.5
#
# task("avalon_actuators","simulation::AuvMotion").
# periodic 0.5
#
# task("bottom_camera","simulation::MarsCamera").
# periodic 0.1
# task("front_camera","simulation::MarsCamera").
# periodic 0.1
#
# task("motion_control", "avalon_control::MotionControlTask")
#
# task("position_control", "avalon_control::PositionControlTask")
#
# task("rel_fake_writer", "avalon_control::RelFakeWriter")
#
# task("waypoint_navigator", "auv_control::WaypointNavigator").
# periodic(0.01)
#
# task("world_to_aligned", "auv_control::WorldToAligned").
# periodic(0.01)
#
# task("aligned_position_controller", "auv_control::PIDController").
# periodic(0.01)
#
# task("aligned_velocity_controller", "auv_control::PIDController").
# periodic(0.01)
#
# task("aligned_to_body", "auv_control::AlignedToBody").
# periodic(0.01)
#
# task("acceleration_controller", "auv_control::AccelerationController").
# periodic(0.01)
#
# task("optimal_heading_controller", "auv_control::OptimalHeadingController").
# periodic(0.01)
end