-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmotion_planning_libraries.orogen
167 lines (119 loc) · 6.7 KB
/
motion_planning_libraries.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
name "motion_planning_libraries"
using_library "base-logging"
using_library "envire"
using_library "motion_planning_libraries"
import_types_from "base"
import_types_from "envire"
import_types_from "motion_planning_librariesTypes.hpp"
import_types_from "motion_planning_libraries/Config.hpp"
import_types_from "motion_planning_libraries/State.hpp"
import_types_from "motion_planning_libraries/sbpl/SbplMotionPrimitives.hpp"
task_context "Task" do
needs_configuration
property("traversability_map_id", "std/string", "/traversability").
doc("Try to extract this map, otherwise the first trav map will be used.")
property("config", "motion_planning_libraries/Config").
doc("Motion planning configuration file.")
property("planning_time_sec", "double", 10).
doc("Maximal allowed planning time per cycle.")
property("only_provide_optimal_trajectories", "bool", false).
doc("In general an optimal trajectory is not required: It takes much more time and provides only a small improvement.")
property("send_escape_traj_to_traj_port", "bool", false).
doc("If this parameter is set to true the escape traj will be written to the trajectory port instead of escape_trajectory")
property("initial_footprint", "double", 0).
doc("If greater 0 it defines the initial footprint (OMPL Sherpa) of the system. Otherwise the mean value of the min and max footprint of the config is used.")
operation("generateEscapeTrajectory").
returns('bool').
doc("Uses the last trajectory to create and send an escape trajectory (see port escape_trajectory)")
input_port('traversability_map', ro_ptr('std/vector</envire/BinaryEvent>')).
doc("Traversability map. Has to be received once before planning can be executed.")
input_port('start_state', '/motion_planning_libraries/State').
doc("Defines the start state.")
input_port('goal_state', '/motion_planning_libraries/State').
doc("Defines the goal state.")
input_port('start_pose_samples', 'base/samples/RigidBodyState').
doc("Start pose in the world, using x and y and yaw. If the start state port is not connected this port will be used.")
input_port('goal_pose_samples', 'base/samples/RigidBodyState').
doc("Goal pose in the world, using x and y and yaw. If the start state port is not connected this port will be used.")
input_port('goal_pose_rel_samples', 'base/samples/RigidBodyState').
doc("Goal pose in the robot frame, using x and y and yaw. If the start state port is not connected this port will be used.")
output_port('waypoints', '/std/vector<base::Waypoint>').
doc "Waypoint list."
output_port("trajectory", "std::vector</base/Trajectory>").
doc("Spline format.")
output_port("states_mpl", "std::vector</motion_planning_libraries/State>").
doc("List of motion_planning_libraries states")
output_port('start_pose_samples_debug', 'base/samples/RigidBodyState').
doc("Currently used start pose")
output_port('goal_pose_samples_debug', 'base/samples/RigidBodyState').
doc("Currently used goal pose")
output_port('sbpl_mprims_debug', '/motion_planning_libraries/SbplMotionPrimitives').
doc("Currently used goal pose")
output_port('path_cost', 'double').
doc("If available cost of the planned path, otherwise nan")
output_port("escape_trajectory", "std::vector</base/Trajectory>").
doc("The operation generateEscapeTrajectory() writes the escape trajectory to this port")
runtime_states :MISSING_START,
:MISSING_GOAL,
:MISSING_TRAV,
:MISSING_START_GOAL,
:MISSING_START_TRAV,
:MISSING_GOAL_TRAV,
:MISSING_START_GOAL_TRAV,
:PLANNING_FAILED,
:PLANNING_SUCCESSFUL,
:WRONG_STATE_TYPE,
:INITIALIZE_MAP_ERROR,
:SET_START_GOAL_ERROR,
:START_ON_OBSTACLE,
:GOAL_ON_OBSTACLE,
:START_GOAL_ON_OBSTACLE,
:PLANNING,
:GOAL_COULD_ONLY_BE_REACHED_IMPRECISELY,
:UNDEFINED_ERROR
#port_driven 'traversability_map', 'goal_pose_samples'
periodic 1.0
end
task_context "Test" do
needs_configuration
property("traversability_map_type", 'motion_planning_libraries/TRAV_MAP_MODE', 'RANDOM_CIRCLES').
doc("Type of trav map which should be created.")
property("traversability_map_id", "std/string", "/traversability").
doc("ID which will be assigned to the trav map.")
property("traversability_map_width_m", 'unsigned int', 30).
doc("Width of the traversability map in meter.")
property("traversability_map_height_m", 'unsigned int', 30).
doc("Height of the traversability map in meter.")
property("traversability_map_scalex", 'double', 0.1).
doc("Width of a cell in meter.")
property("number_of_random_circles", 'int', 10).
doc("Width of a cell in meter.")
property("traversability_map_scaley", 'double', 0.1).
doc("Height of a cell in meter.")
property("opening_length", 'double', 2.0).
doc("Defines the length (wall runs along the y-axis) of the opening in meter for the environment SMALL_OPENING.")
property("footprint_min", 'double', 0.5).
doc("Smallest footprint")
property("footprint_max", 'double', 2.0).
doc("Smallest footprint")
output_port('traversability_map', ro_ptr('std/vector</envire/BinaryEvent>')).
doc("Traversability map. Has to be received once before planning can be executed.")
output_port('start_pose_sample', 'base/samples/RigidBodyState').
doc("Start pose in the world, using x and y and yaw.")
output_port('goal_pose_sample', 'base/samples/RigidBodyState').
doc("Goal pose in the world, using x and y and yaw.")
output_port('start_state', '/motion_planning_libraries/State').
doc("Start pose in the world, using x and y and yaw.")
output_port('goal_state', '/motion_planning_libraries/State').
doc("Goal pose in the world, using x and y and yaw.")
end
task_context "FollowingTest" do
needs_configuration
input_port("start_pose", "/base/samples/RigidBodyState").
doc("Has to receive the start pose of the system once")
input_port("motion_command", "base/commands/Motion2D").
doc("Used to calculate the next robot pose")
output_port("robot_pose", "/base/samples/RigidBodyState").
doc("Moved robot pose")
periodic 0.01
end