@@ -33,9 +33,10 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
33
33
namespace tesseract_planning
34
34
{
35
35
/* * @brief Create a example raster program with dual transitions */
36
- inline CompositeInstruction rasterDTExampleProgram ()
36
+ inline CompositeInstruction rasterDTExampleProgram (const std::string& freespace_profile = DEFAULT_PROFILE_KEY,
37
+ const std::string& process_profile = " PROCESS" )
37
38
{
38
- CompositeInstruction program (" raster_dt_program " , CompositeInstructionOrder::ORDERED, ManipulatorInfo (" manipulator" ));
39
+ CompositeInstruction program (DEFAULT_PROFILE_KEY , CompositeInstructionOrder::ORDERED, ManipulatorInfo (" manipulator" ));
39
40
40
41
// Start Joint Position for the program
41
42
std::vector<std::string> joint_names = { " joint_1" , " joint_2" , " joint_3" , " joint_4" , " joint_5" , " joint_6" };
@@ -47,9 +48,9 @@ inline CompositeInstruction rasterDTExampleProgram()
47
48
Eigen::Quaterniond (0 , 0 , -1.0 , 0 ));
48
49
49
50
// Define from start composite instruction
50
- PlanInstruction plan_f0 (wp1, PlanInstructionType::FREESPACE, " freespace_profile" );
51
+ PlanInstruction plan_f0 (wp1, PlanInstructionType::FREESPACE, freespace_profile);
51
52
plan_f0.setDescription (" from_start_plan" );
52
- CompositeInstruction from_start;
53
+ CompositeInstruction from_start (freespace_profile) ;
53
54
from_start.setDescription (" from_start" );
54
55
from_start.push_back (plan_f0);
55
56
program.push_back (from_start);
@@ -73,25 +74,25 @@ inline CompositeInstruction rasterDTExampleProgram()
73
74
Waypoint wp7 = CartesianWaypoint (Eigen::Isometry3d::Identity () * Eigen::Translation3d (x, 0.3 , 0.8 ) *
74
75
Eigen::Quaterniond (0 , 0 , -1.0 , 0 ));
75
76
76
- CompositeInstruction raster_segment;
77
+ CompositeInstruction raster_segment (freespace_profile) ;
77
78
raster_segment.setDescription (" Raster #" + std::to_string (i + 1 ));
78
79
if (i == 0 || i == 2 )
79
80
{
80
- raster_segment.push_back (PlanInstruction (wp2, PlanInstructionType::LINEAR, " RASTER " ));
81
- raster_segment.push_back (PlanInstruction (wp3, PlanInstructionType::LINEAR, " RASTER " ));
82
- raster_segment.push_back (PlanInstruction (wp4, PlanInstructionType::LINEAR, " RASTER " ));
83
- raster_segment.push_back (PlanInstruction (wp5, PlanInstructionType::LINEAR, " RASTER " ));
84
- raster_segment.push_back (PlanInstruction (wp6, PlanInstructionType::LINEAR, " RASTER " ));
85
- raster_segment.push_back (PlanInstruction (wp7, PlanInstructionType::LINEAR, " RASTER " ));
81
+ raster_segment.push_back (PlanInstruction (wp2, PlanInstructionType::LINEAR, process_profile ));
82
+ raster_segment.push_back (PlanInstruction (wp3, PlanInstructionType::LINEAR, process_profile ));
83
+ raster_segment.push_back (PlanInstruction (wp4, PlanInstructionType::LINEAR, process_profile ));
84
+ raster_segment.push_back (PlanInstruction (wp5, PlanInstructionType::LINEAR, process_profile ));
85
+ raster_segment.push_back (PlanInstruction (wp6, PlanInstructionType::LINEAR, process_profile ));
86
+ raster_segment.push_back (PlanInstruction (wp7, PlanInstructionType::LINEAR, process_profile ));
86
87
}
87
88
else
88
89
{
89
- raster_segment.push_back (PlanInstruction (wp6, PlanInstructionType::LINEAR, " RASTER " ));
90
- raster_segment.push_back (PlanInstruction (wp5, PlanInstructionType::LINEAR, " RASTER " ));
91
- raster_segment.push_back (PlanInstruction (wp4, PlanInstructionType::LINEAR, " RASTER " ));
92
- raster_segment.push_back (PlanInstruction (wp3, PlanInstructionType::LINEAR, " RASTER " ));
93
- raster_segment.push_back (PlanInstruction (wp2, PlanInstructionType::LINEAR, " RASTER " ));
94
- raster_segment.push_back (PlanInstruction (wp1, PlanInstructionType::LINEAR, " RASTER " ));
90
+ raster_segment.push_back (PlanInstruction (wp6, PlanInstructionType::LINEAR, process_profile ));
91
+ raster_segment.push_back (PlanInstruction (wp5, PlanInstructionType::LINEAR, process_profile ));
92
+ raster_segment.push_back (PlanInstruction (wp4, PlanInstructionType::LINEAR, process_profile ));
93
+ raster_segment.push_back (PlanInstruction (wp3, PlanInstructionType::LINEAR, process_profile ));
94
+ raster_segment.push_back (PlanInstruction (wp2, PlanInstructionType::LINEAR, process_profile ));
95
+ raster_segment.push_back (PlanInstruction (wp1, PlanInstructionType::LINEAR, process_profile ));
95
96
}
96
97
program.push_back (raster_segment);
97
98
@@ -106,17 +107,17 @@ inline CompositeInstruction rasterDTExampleProgram()
106
107
CartesianWaypoint (Eigen::Isometry3d::Identity () * Eigen::Translation3d (0.8 + (i * 0.1 ), -0.3 , 0.8 ) *
107
108
Eigen::Quaterniond (0 , 0 , -1.0 , 0 ));
108
109
109
- PlanInstruction plan_f1 (wp7, PlanInstructionType::FREESPACE, " freespace_profile" );
110
+ PlanInstruction plan_f1 (wp7, PlanInstructionType::FREESPACE, freespace_profile);
110
111
plan_f1.setDescription (" transition_from_end_plan" );
111
112
112
- PlanInstruction plan_f1_dt (wp7_dt, PlanInstructionType::FREESPACE, " freespace_profile" );
113
+ PlanInstruction plan_f1_dt (wp7_dt, PlanInstructionType::FREESPACE, freespace_profile);
113
114
plan_f1_dt.setDescription (" transition_to_start_plan" );
114
115
115
- CompositeInstruction transition_from_end;
116
+ CompositeInstruction transition_from_end (freespace_profile) ;
116
117
transition_from_end.setDescription (" transition_from_end" );
117
118
transition_from_end.push_back (plan_f1);
118
119
119
- CompositeInstruction transition_to_start;
120
+ CompositeInstruction transition_to_start (freespace_profile) ;
120
121
transition_to_start.setDescription (" transition_to_start" );
121
122
transition_to_start.push_back (plan_f1_dt);
122
123
@@ -135,17 +136,17 @@ inline CompositeInstruction rasterDTExampleProgram()
135
136
CartesianWaypoint (Eigen::Isometry3d::Identity () * Eigen::Translation3d (0.8 + (i * 0.1 ), 0.3 , 0.8 ) *
136
137
Eigen::Quaterniond (0 , 0 , -1.0 , 0 ));
137
138
138
- PlanInstruction plan_f1 (wp1, PlanInstructionType::FREESPACE, " freespace_profile" );
139
+ PlanInstruction plan_f1 (wp1, PlanInstructionType::FREESPACE, freespace_profile);
139
140
plan_f1.setDescription (" transition_from_end_plan" );
140
141
141
- PlanInstruction plan_f1_dt (wp1_dt, PlanInstructionType::FREESPACE, " freespace_profile" );
142
+ PlanInstruction plan_f1_dt (wp1_dt, PlanInstructionType::FREESPACE, freespace_profile);
142
143
plan_f1_dt.setDescription (" transition_to_start_plan" );
143
144
144
- CompositeInstruction transition_from_end;
145
+ CompositeInstruction transition_from_end (freespace_profile) ;
145
146
transition_from_end.setDescription (" transition_from_end" );
146
147
transition_from_end.push_back (plan_f1);
147
148
148
- CompositeInstruction transition_to_start;
149
+ CompositeInstruction transition_to_start (freespace_profile) ;
149
150
transition_to_start.setDescription (" transition_to_start" );
150
151
transition_to_start.push_back (plan_f1_dt);
151
152
@@ -156,7 +157,7 @@ inline CompositeInstruction rasterDTExampleProgram()
156
157
}
157
158
}
158
159
159
- PlanInstruction plan_f2 (swp1, PlanInstructionType::FREESPACE, " freespace_profile" );
160
+ PlanInstruction plan_f2 (swp1, PlanInstructionType::FREESPACE, freespace_profile);
160
161
plan_f2.setDescription (" to_end_plan" );
161
162
CompositeInstruction to_end;
162
163
to_end.setDescription (" to_end" );
0 commit comments