113 def->component(navigatorPrx,
"navigator");
115 def->required(properties.robotName,
"RobotName",
"Default robot name.");
117 auto optionalSubSkillID =
121 def->optional(skillID.
providerId->providerName, nameBase +
".providerName");
122 def->optional(skillID.
skillName, nameBase +
".skillName");
125 def->required(properties.safetyGuardParams.robotRadius,
126 "p.navigateToLocation.safetyGuardParams.robotRadius",
127 "The robot radius used for distance calculation to the platform.");
128 def->optional(properties.safetyGuardParams.enableHumans,
129 "p.navigateToLocation.safetyGuardParams.enableHumans",
130 "Whether to consider humans for the safety guard.");
131 def->optional(properties.safetyGuardParams.enableLaserScanners,
132 "p.navigateToLocation.safetyGuardParams.enableLaserscanners",
133 "Whether to consider laser scanners for the safety guard.");
134 defineProximityFieldParams(def,
135 "p.navigateToLocation.safetyGuardParams.humanProximityField",
136 properties.safetyGuardParams.humanProximityField);
137 defineProximityFieldParams(
139 "p.navigateToLocation.safetyGuardParams.laserScannerProximityField",
140 properties.safetyGuardParams.laserScannerProximityField);
141 def->optional(properties.safetyGuardParams.ignoreAttachedObjects,
142 "p.navigateToLocation.safetyGuardParams.ignoreAttachedObjects",
143 "Whether to ignore laser scanner features lying inside attached objects.");
144 def->optional(properties.safetyGuardParams.enableLaserScannerFiltering,
145 "p.navigateToLocation.safetyGuardParams.enableLaserScannerFiltering",
146 "Whether to filter out small laser scanner features close to the robot.");
147 def->optional(properties.safetyGuardParams.laserScannerFilteringThreshold,
148 "p.navigateToLocation.safetyGuardParams.laserScannerFilteringThreshold",
149 "Features with less or equal number of points are filtered out.");
150 def->optional(properties.safetyGuardParams.laserScannerMaxFilteringDistance,
151 "p.navigateToLocation.safetyGuardParams.laserScannerMaxFilteringDistance",
152 "Only features where all points are within this distance of the robot are "
153 "filtered out [mm].");
156 def->required(properties.generalConfig.maxVel.linear,
157 "p.default.generalConfig.maxVelocity.linear",
158 "The default maximum linear velocity.");
159 def->required(properties.generalConfig.maxVel.angular,
160 "p.default.generalConfig.maxVelocity.angular",
161 "The default maximum angular velocity.");
164 properties.generalConfig.enableRampingStart,
165 "p.default.generalConfig.enableRampingStart",
166 "The default value for whether ramping is enabled at the start of the trajectory.");
168 properties.generalConfig.enableRampingEnd,
169 "p.default.generalConfig.enableRampingEnd",
170 "The default value for whether ramping is enabled at the end of the trajectory.");
172 properties.generalConfig.enableRampingCorners,
173 "p.default.generalConfig.enableRampingCorners",
174 "The default value for whether ramping is enabled in corners of the trajectory.");
175 def->optional(properties.generalConfig.rampLength,
176 "p.default.generalConfig.rampLength",
177 "The default value for the distance over which ramping is applied [mm].");
178 def->optional(properties.generalConfig.cornerVelocity,
179 "p.default.generalConfig.cornerVelocity",
180 "The default value for the velocity in a corner [mm/s].");
181 def->optional(properties.generalConfig.boundaryVelocity,
182 "p.default.generalConfig.boundaryVelocity",
183 "The default value for the velocity at the ends [mm/s].");
185 properties.generalConfig.cornerLimit,
186 "p.default.generalConfig.cornerLimit",
187 "The default value for the angle above which a bend is considered a corner [deg].");
191 properties.generalConfig.inCollisionDistanceThresholdForRecovery = 150.0F;
192 def->optional(properties.generalConfig.inCollisionDistanceThresholdForRecovery,
193 "p.default.generalConfig.inCollisionDistanceThresholdForRecovery",
194 "The default maximum distance [mm] to search for a collision-free recovery "
195 "position when the robot starts in collision. Skills can override this per "
196 "call via the parameter of the same name.");
205 def->optional(properties.generalConfig.parametrization,
206 "p.default.generalConfig.trajectoryParametrization",
207 "How the velocities along the planned path are assigned by default.")
213 optionalSubSkillID(properties.navigateToNamedLocation.subSkillIDs.navigateToLocation,
214 "p.navigateToNamedLocation.subSkillIDs.navigateToLocation");
215 optionalSubSkillID(properties.navigateToChargingStation.subSkillIDs.navigateToNamedLocation,
216 "p.navigateToChargingStation.subSkillIDs.navigateToNamedLocation");
236 iceNavigatorFactory.emplace(navigatorPrx);
239 iceNavigatorFactory.value(),
244 .defaultGeneralConfig = properties.generalConfig};
260 .locationReader = &graphReaderPlugin->get(),
262 .objectClassReader = &objectClassReaderPlugin->get(),
270 properties.navigateToChargingStation);
283 .robotName = this->properties.robotName,
286 .robotReader = virtualRobotReaderPlugin->get(),
289 helperProperties, helperSrv, properties, srv);
298 virtualRobotReaderPlugin->get(),
299 .costmapReader = costmapReaderPlugin->get(),
300 .roomsReader = roomsReaderPlugin->get(),
373 const auto safetyGuardParams = [
this]()
375 std::lock_guard g{safetyGuardParamsMutex};
376 return properties.safetyGuardParams;
393 grid.
add(
Label(
"Enable Humans"), {.row = row, .column = 0})
394 .add(tab.enableHumans, {.row = row++, .column = 1});
395 grid.
add(
Label(
"Enable Laserscanner"), {.row = row, .column = 0})
396 .add(tab.enableLaserScanners, {.row = row++, .column = 1});
399 tab.enableHumans.setValue(safetyGuardParams.enableHumans);
400 tab.enableLaserScanners.setValue(safetyGuardParams.enableLaserScanners);
404 const auto setupProximityFieldGui =
407 const std::string& label)
411 grid.
add(
Label(
"Reduce speed"), {.row = row, .column = 0})
412 .add(field.reduceSpeed, {.row = row++, .column = 1});
413 grid.
add(
Label(
"Min distance"), {.row = row, .column = 0})
414 .add(field.minDistance, {.row = row++, .column = 1});
416 grid.
add(
Label(
"Max distance"), {.row = row, .column = 0})
417 .add(field.maxDistance, {.row = row++, .column = 1});
418 grid.
add(
Label(
"k"), {.row = row, .column = 0})
419 .add(field.k, {.row = row++, .column = 1});
420 grid.
add(
Label(
"lambda"), {.row = row, .column = 0})
421 .add(field.lambda, {.row = row++, .column = 1});
427 field.reduceSpeed.setValue(values.reduceVelocity);
428 field.minDistance.setValue(values.safetyDistance);
429 setSpinBox(field.minDistance, 0, 5000, 1, 1);
430 field.maxDistance.setValue(values.influenceDistance);
431 setSpinBox(field.maxDistance, 0, 10000, 1, 1);
432 field.k.setValue(values.k);
433 setSpinBox(field.k, 1, 20, 2, 0.1);
434 field.lambda.setValue(values.lambda);
435 setSpinBox(field.lambda, 1, 20, 2, 0.1);
438 setupProximityFieldGui(tab.humanProximityField,
439 safetyGuardParams.humanProximityField,
440 "Human proximity field");
442 setupProximityFieldGui(tab.laserScannerProximityField,
443 safetyGuardParams.laserScannerProximityField,
444 "LaserScanner proximity field");
452 std::lock_guard g{safetyGuardParamsMutex};
454 auto& safetyGuardParams = properties.safetyGuardParams;
456 safetyGuardParams.enableHumans = tab.enableHumans.getValue();
457 safetyGuardParams.enableLaserScanners = tab.enableLaserScanners.getValue();
469 readProximityField(tab.humanProximityField, safetyGuardParams.humanProximityField);
470 readProximityField(tab.laserScannerProximityField,
471 safetyGuardParams.laserScannerProximityField);