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].");
190 optionalSubSkillID(properties.navigateToNamedLocation.subSkillIDs.navigateToLocation,
191 "p.navigateToNamedLocation.subSkillIDs.navigateToLocation");
192 optionalSubSkillID(properties.navigateToChargingStation.subSkillIDs.navigateToNamedLocation,
193 "p.navigateToChargingStation.subSkillIDs.navigateToNamedLocation");
213 iceNavigatorFactory.emplace(navigatorPrx);
216 iceNavigatorFactory.value(),
221 .defaultGeneralConfig = properties.generalConfig};
237 .locationReader = &graphReaderPlugin->get(),
239 .objectClassReader = &objectClassReaderPlugin->get(),
247 properties.navigateToChargingStation);
260 .robotName = this->properties.robotName,
263 .robotReader = virtualRobotReaderPlugin->get(),
266 helperProperties, helperSrv, properties, srv);
275 virtualRobotReaderPlugin->get(),
276 .costmapReader = costmapReaderPlugin->get(),
277 .roomsReader = roomsReaderPlugin->get(),
350 const auto safetyGuardParams = [
this]()
352 std::lock_guard g{safetyGuardParamsMutex};
353 return properties.safetyGuardParams;
370 grid.
add(
Label(
"Enable Humans"), {.row = row, .column = 0})
371 .add(tab.enableHumans, {.row = row++, .column = 1});
372 grid.
add(
Label(
"Enable Laserscanner"), {.row = row, .column = 0})
373 .add(tab.enableLaserScanners, {.row = row++, .column = 1});
376 tab.enableHumans.setValue(safetyGuardParams.enableHumans);
377 tab.enableLaserScanners.setValue(safetyGuardParams.enableLaserScanners);
381 const auto setupProximityFieldGui =
384 const std::string& label)
388 grid.
add(
Label(
"Reduce speed"), {.row = row, .column = 0})
389 .add(field.reduceSpeed, {.row = row++, .column = 1});
390 grid.
add(
Label(
"Min distance"), {.row = row, .column = 0})
391 .add(field.minDistance, {.row = row++, .column = 1});
393 grid.
add(
Label(
"Max distance"), {.row = row, .column = 0})
394 .add(field.maxDistance, {.row = row++, .column = 1});
395 grid.
add(
Label(
"k"), {.row = row, .column = 0})
396 .add(field.k, {.row = row++, .column = 1});
397 grid.
add(
Label(
"lambda"), {.row = row, .column = 0})
398 .add(field.lambda, {.row = row++, .column = 1});
404 field.reduceSpeed.setValue(values.reduceVelocity);
405 field.minDistance.setValue(values.safetyDistance);
406 setSpinBox(field.minDistance, 0, 5000, 1, 1);
407 field.maxDistance.setValue(values.influenceDistance);
408 setSpinBox(field.maxDistance, 0, 10000, 1, 1);
409 field.k.setValue(values.k);
410 setSpinBox(field.k, 1, 20, 2, 0.1);
411 field.lambda.setValue(values.lambda);
412 setSpinBox(field.lambda, 1, 20, 2, 0.1);
415 setupProximityFieldGui(tab.humanProximityField,
416 safetyGuardParams.humanProximityField,
417 "Human proximity field");
419 setupProximityFieldGui(tab.laserScannerProximityField,
420 safetyGuardParams.laserScannerProximityField,
421 "LaserScanner proximity field");
429 std::lock_guard g{safetyGuardParamsMutex};
431 auto& safetyGuardParams = properties.safetyGuardParams;
433 safetyGuardParams.enableHumans = tab.enableHumans.getValue();
434 safetyGuardParams.enableLaserScanners = tab.enableLaserScanners.getValue();
446 readProximityField(tab.humanProximityField, safetyGuardParams.humanProximityField);
447 readProximityField(tab.laserScannerProximityField,
448 safetyGuardParams.laserScannerProximityField);