37 std::string CAbstractPTGBasedReactive::TNavigationParamsPTG::getAsText()
const 40 CWaypointsNavigator::TNavigationParamsWaypoints::getAsText();
41 s +=
"restrict_PTG_indices: ";
47 bool CAbstractPTGBasedReactive::TNavigationParamsPTG::isEqual(
53 return o !=
nullptr &&
54 CWaypointsNavigator::TNavigationParamsWaypoints::isEqual(rhs) &&
61 CAbstractPTGBasedReactive::CAbstractPTGBasedReactive(
66 m_prev_logfile(nullptr),
67 m_enableKeepLogRecords(false),
68 m_enableConsoleOutput(enableConsoleOutput),
71 m_PTGsMustBeReInitialized(true),
79 m_closing_navigator(false),
82 m_navlogfiles_dir(sLogDir)
118 std::lock_guard<std::recursive_mutex> csl(
m_nav_cs);
134 std::lock_guard<std::recursive_mutex> csl(
m_nav_cs);
145 "[CAbstractPTGBasedReactive::enableLogFile] Stopping " 159 unsigned int nFile = 0;
160 bool free_name =
false;
166 "Could not create directory for navigation logs: `%s`",
174 aux,
"%s/log_%03u.reactivenavlog",
181 std::unique_ptr<CFileGZOutputStream> fil(
183 bool ok = fil->
open(aux, 1 );
195 "[CAbstractPTGBasedReactive::enableLogFile] Logging to " 200 catch (std::exception& e)
203 "[CAbstractPTGBasedReactive::enableLogFile] Exception: %s",
222 std::lock_guard<std::recursive_mutex> csl(
m_nav_cs);
229 for (
size_t i = 0; i < nPTGs; i++)
235 "Non-registered holonomic method className=`%s`",
269 for (
size_t i = 0; i < nPTGs; i++)
280 newLogRec.
infoPerPTG[i].ptg = std::dynamic_pointer_cast<
299 const bool target_changed_since_last_iteration =
302 if (target_changed_since_last_iteration)
308 std::vector<CAbstractNavigator::TargetInfo> targets;
310 auto p =
dynamic_cast< 313 if (
p && !
p->multiple_targets.empty())
315 targets =
p->multiple_targets;
322 const size_t nTargets = targets.size();
336 "Error while loading and sorting the obstacles. Robot will be " 340 CPose2D rel_cur_pose_wrt_last_vel_cmd_NOP,
341 rel_pose_PTG_origin_wrt_sense_NOP;
344 std::vector<mrpt::math::TPose2D>() ,
348 rel_cur_pose_wrt_last_vel_cmd_NOP.
asTPose(),
349 rel_pose_PTG_origin_wrt_sense_NOP.
asTPose(),
352 tim_start_iteration);
365 relPoseSense(0, 0, 0), relPoseVelCmd(0, 0, 0);
398 newLogRec.
values[
"timoff_obstacles"] = timoff_obstacles;
399 newLogRec.
values[
"timoff_obstacles_avr"] =
406 newLogRec.
values[
"timoff_curPoseVelAge"] = timoff_curPoseVelAge;
407 newLogRec.
values[
"timoff_curPoseVelAge_avr"] =
411 const double timoff_pose2sense =
412 timoff_obstacles - timoff_curPoseVelAge;
414 double timoff_pose2VelCmd;
417 timoff_curPoseVelAge;
418 newLogRec.
values[
"timoff_pose2sense"] = timoff_pose2sense;
419 newLogRec.
values[
"timoff_pose2VelCmd"] = timoff_pose2VelCmd;
421 if (std::abs(timoff_pose2sense) > 1.25)
423 "timoff_pose2sense=%e is too large! Path extrapolation may " 426 if (std::abs(timoff_pose2VelCmd) > 1.25)
428 "timoff_pose2VelCmd=%e is too large! Path extrapolation " 429 "may be not accurate.",
438 rel_pose_PTG_origin_wrt_sense = relPoseVelCmd - relPoseSense;
449 for (
auto&
t : targets)
457 "Different frame_id's but no frame_tf object " 458 "attached (or it expired)!: target_frame_id=`%s` != " 459 "pose_frame_id=`%s`",
460 t.target_frame_id.c_str(),
464 frame_tf->lookupTransform(
466 robot_frame2map_frame);
469 "frame_tf: target_frame_id=`%s` as seen from " 470 "pose_frame_id=`%s` = %s",
471 t.target_frame_id.c_str(),
473 robot_frame2map_frame.
asString().c_str());
475 t.target_coords = robot_frame2map_frame +
t.target_coords;
483 std::vector<TPose2D> relTargets;
486 targets.begin(), targets.end(),
487 std::back_inserter(relTargets),
489 return e.target_coords - curPoseExtrapol;
494 const double relTargetDist = relTargets.begin()->norm();
507 for (
size_t i = 0; i < nPTGs; i++)
514 vector<TCandidateMovementPTG> candidate_movs(
518 for (
size_t indexPTG = 0; indexPTG < nPTGs; indexPTG++)
533 ptg, indexPTG, relTargets, rel_pose_PTG_origin_wrt_sense, ipf,
534 cm, newLogRec,
false ,
541 bool is_all_ptg_collision =
true;
542 for (
size_t indexPTG = 0; indexPTG < nPTGs; indexPTG++)
544 bool is_collision =
true;
546 for (
const auto o : obs)
550 is_collision =
false;
556 is_all_ptg_collision =
false;
560 if (is_all_ptg_collision)
570 bool NOP_not_too_old =
true;
571 bool NOP_not_too_close_and_have_to_slowdown =
true;
572 double NOP_max_time = -1.0, NOP_At = -1.0;
573 double slowdowndist = .0;
585 const bool can_do_nop_motion =
587 !target_changed_since_last_iteration && last_sent_ptg &&
596 (NOP_not_too_close_and_have_to_slowdown =
600 ->getTargetApproachSlowDownDistance())
605 if (!NOP_not_too_old)
608 "PTG-continuation not allowed: previous command timed-out " 609 "(At=%.03f > Max_At=%.03f)",
610 NOP_At, NOP_max_time);
612 if (!NOP_not_too_close_and_have_to_slowdown)
615 "PTG-continuation not allowed: target too close and must start " 616 "slow-down (trgDist=%.03f < SlowDownDist=%.03f)",
617 relTargetDist, slowdowndist);
621 rel_pose_PTG_origin_wrt_sense_NOP(0, 0, 0);
623 if (can_do_nop_motion)
638 bool valid_odom, valid_pose;
641 tim_send_cmd_vel_corrected, robot_odom_at_send_cmd, valid_odom);
643 tim_send_cmd_vel_corrected, robot_pose_at_send_cmd, valid_pose);
645 if (valid_odom && valid_pose)
647 ASSERT_(last_sent_ptg !=
nullptr);
649 std::vector<TPose2D> relTargets_NOPs;
651 targets.begin(), targets.end(),
652 std::back_inserter(relTargets_NOPs),
653 [robot_pose_at_send_cmd](
655 return e.target_coords - robot_pose_at_send_cmd;
659 rel_pose_PTG_origin_wrt_sense_NOP =
660 robot_odom_at_send_cmd -
662 rel_cur_pose_wrt_last_vel_cmd_NOP =
672 [
"rel_cur_pose_wrt_last_vel_cmd_NOP(interp)"] =
673 rel_cur_pose_wrt_last_vel_cmd_NOP.asString();
675 [
"robot_odom_at_send_cmd(interp)"] =
676 robot_odom_at_send_cmd.asString();
686 candidate_movs[nPTGs], newLogRec,
690 rel_cur_pose_wrt_last_vel_cmd_NOP);
696 candidate_movs[nPTGs].speed =
706 int best_ptg_idx =
m_multiobjopt->decide(candidate_movs, mo_info);
712 for (
unsigned int i = 0; i < newLogRec.
infoPerPTG.size(); i++)
722 "MultiObjMotOptmzr_msg%03i", idx++)] = le;
728 if (best_ptg_idx >= 0)
730 selectedHolonomicMovement = &candidate_movs[best_ptg_idx];
735 const bool best_is_NOP_cmdvel = (best_ptg_idx == int(nPTGs));
741 if (best_is_NOP_cmdvel)
748 "\nERROR calling changeSpeedsNOP()!! Stopping robot and " 749 "finishing navigation\n");
753 newLogRec, relTargets, best_ptg_idx,
755 best_is_NOP_cmdvel, rel_cur_pose_wrt_last_vel_cmd_NOP,
756 rel_pose_PTG_origin_wrt_sense_NOP,
759 tim_start_iteration);
768 for (
size_t i = 0; i < nPTGs; i++)
775 double cmd_vel_speed_ratio = 1.0;
776 if (selectedHolonomicMovement)
779 m_timelogger,
"navigationStep.selectedHolonomicMovement");
780 cmd_vel_speed_ratio =
786 new_vel_cmd->isStopCmd())
789 "Best velocity command is STOP (no way found), calling " 805 newLogRec.
timestamps[
"tim_send_cmd_vel"] = tim_send_cmd_vel;
809 "\nERROR calling changeSpeeds()!! Stopping robot " 810 "and finishing navigation\n");
815 newLogRec, relTargets, best_ptg_idx,
816 new_vel_cmd, nPTGs, best_is_NOP_cmdvel,
817 rel_cur_pose_wrt_last_vel_cmd_NOP,
818 rel_pose_PTG_origin_wrt_sense_NOP,
821 tim_start_iteration);
830 selectedHolonomicMovement
835 selectedHolonomicMovement->
props[
"holo_stage_eval"];
843 (selectedHolonomicMovement->
props[
"is_slowdown"] != 0.0);
851 tim_start_iteration, tim_send_cmd_vel);
853 newLogRec.
values[
"timoff_sendVelCmd"] = timoff_sendVelCmd;
854 newLogRec.
values[
"timoff_sendVelCmd_avr"] =
867 const double tim_changeSpeed =
876 "Timing warning: Suspicious executionPeriod=%.03f ms is far " 877 "above the average of %.03f ms",
888 "T=%.01lfms Exec:%.01lfms|%.01lfms " 890 new_vel_cmd ? new_vel_cmd->asString().c_str() :
"NOP",
891 selectedHolonomicMovement ? selectedHolonomicMovement->
speed 900 newLogRec, relTargets, best_ptg_idx, new_vel_cmd, nPTGs,
901 best_is_NOP_cmdvel, rel_cur_pose_wrt_last_vel_cmd_NOP,
902 rel_pose_PTG_origin_wrt_sense_NOP, executionTimeValue,
903 tim_changeSpeed, tim_start_iteration);
906 catch (std::exception& e)
909 std::string(
"[CAbstractPTGBasedReactive::performNavigationStep] " 910 "Stopping robot and finishing navigation due to " 917 "[CAbstractPTGBasedReactive::performNavigationStep] Stopping robot " 918 "and finishing navigation due to untyped exception.");
924 CLogFileRecord& newLogRec,
const std::vector<TPose2D>& relTargets,
926 const int nPTGs,
const bool best_is_NOP_cmdvel,
929 const double executionTimeValue,
const double tim_changeSpeed,
945 newLogRec.
cmd_vel = new_vel_cmd;
946 newLogRec.
values[
"estimatedExecutionPeriod"] =
948 newLogRec.
values[
"executionTime"] = executionTimeValue;
950 newLogRec.
values[
"time_changeSpeeds()"] = tim_changeSpeed;
951 newLogRec.
values[
"time_changeSpeeds()_avr"] =
953 newLogRec.
values[
"CWaypointsNavigator::navigationStep()"] =
955 newLogRec.
values[
"CAbstractNavigator::navigationStep()"] =
957 newLogRec.
timestamps[
"tim_start_iteration"] = tim_start_iteration;
959 newLogRec.
nPTGs = nPTGs;
963 rel_cur_pose_wrt_last_vel_cmd_NOP;
965 rel_pose_PTG_origin_wrt_sense_NOP;
982 std::lock_guard<std::recursive_mutex> lock_log(
992 const std::vector<mrpt::math::TPose2D>& WS_Targets,
993 const std::vector<CAbstractPTGBasedReactive::PTGTarget>& TP_Targets,
995 const bool this_is_PTG_continuation,
997 const unsigned int ptg_idx4weights,
1016 size_t selected_trg_idx = 0;
1018 double best_trg_angdist = std::numeric_limits<double>::max();
1019 for (
size_t i = 0; i < TP_Targets.size(); i++)
1022 TP_Targets[i].target_alpha, cm.
direction));
1023 if (angdist < best_trg_angdist)
1025 best_trg_angdist = angdist;
1026 selected_trg_idx = i;
1030 ASSERT_(selected_trg_idx < WS_Targets.size());
1031 const auto WS_Target = WS_Targets[selected_trg_idx];
1032 const auto TP_Target = TP_Targets[selected_trg_idx];
1034 const double target_d_norm = TP_Target.target_dist;
1038 const double target_WS_d = WS_Target.norm();
1041 const double d =
std::min(in_TPObstacles[move_k], 0.99 * target_d_norm);
1059 const double TARGET_SLOW_APPROACHING_DISTANCE =
1067 Vf + target_WS_d * (1.0 - Vf) / TARGET_SLOW_APPROACHING_DISTANCE);
1071 "Relative speed reduced %.03f->%.03f based on Euclidean " 1072 "nearness to target.",
1079 cm.
props[
"ptg_idx"] = ptg_idx4weights;
1080 cm.
props[
"ref_dist"] = ref_dist;
1081 cm.
props[
"target_dir"] = TP_Target.target_alpha;
1082 cm.
props[
"target_k"] = TP_Target.target_k;
1083 cm.
props[
"target_d_norm"] = target_d_norm;
1084 cm.
props[
"move_k"] = move_k;
1085 double& move_cur_d = cm.
props[
"move_cur_d"] =
1088 cm.
props[
"is_PTG_cont"] = this_is_PTG_continuation ? 1 : 0;
1089 cm.
props[
"num_paths"] = in_TPObstacles.size();
1090 cm.
props[
"WS_target_x"] = WS_Target.x;
1091 cm.
props[
"WS_target_y"] = WS_Target.y;
1092 cm.
props[
"robpose_x"] = pose.
x;
1093 cm.
props[
"robpose_y"] = pose.
y;
1094 cm.
props[
"robpose_phi"] = pose.
phi;
1095 cm.
props[
"ptg_priority"] =
1098 const bool is_slowdown =
1099 this_is_PTG_continuation
1102 cm.
props[
"is_slowdown"] = is_slowdown ? 1 : 0;
1103 cm.
props[
"holo_stage_eval"] =
1104 this_is_PTG_continuation
1106 : (hlfr && !hlfr->dirs_eval.empty() &&
1107 hlfr->dirs_eval.rbegin()->size() == in_TPObstacles.size())
1108 ? hlfr->dirs_eval.rbegin()->at(move_k)
1112 double& colfree = cm.
props[
"collision_free_distance"];
1115 colfree = in_TPObstacles[move_k];
1123 if (this_is_PTG_continuation)
1126 double cur_norm_d = .0;
1127 bool is_exact, is_time_based =
false;
1134 if (std::abs(rel_cur_pose_wrt_last_vel_cmd_NOP.
x) > maxD ||
1135 std::abs(rel_cur_pose_wrt_last_vel_cmd_NOP.
y) > maxD)
1138 rel_cur_pose_wrt_last_vel_cmd_NOP.
x,
1139 rel_cur_pose_wrt_last_vel_cmd_NOP.
y, cur_k, cur_norm_d);
1144 is_time_based =
true;
1146 const double NOP_At =
1158 log.
TP_Robot.
x = cos(cur_a) * cur_norm_d;
1159 log.
TP_Robot.
y = sin(cur_a) * cur_norm_d;
1171 "PTG-continuation not allowed, cur. pose out of PTG domain.";
1174 bool WS_point_is_unique =
true;
1189 WS_point_is_unique =
1190 WS_point_is_unique &&
1194 "isBijectiveAt(): k=%i step=%i -> %s", (
int)cur_k,
1195 (
int)cur_ptg_step, WS_point_is_unique ?
"yes" :
"no");
1197 if (!WS_point_is_unique)
1201 cur_ptg_step = predicted_step;
1206 log.
TP_Robot.
x = cos(cur_a) * cur_norm_d;
1207 log.
TP_Robot.
y = sin(cur_a) * cur_norm_d;
1215 predicted_rel_pose);
1216 const auto predicted_pose_global =
1225 "mismatchDistance=%.03f cm", 1e2 * predicted2real_dist);
1227 if (predicted2real_dist >
1229 .max_distance_predicted_actual_path &&
1231 (target_d_norm - cur_norm_d) * ref_dist > 2.0 ))
1236 "PTG-continuation not allowed, mismatchDistance above " 1245 "PTG-continuation not allowed, couldn't get PTG step for " 1259 colfree = WS_point_is_unique
1260 ?
std::min(in_TPObstacles[move_k], in_TPObstacles[cur_k])
1261 : in_TPObstacles[move_k];
1267 colfree -= cur_norm_d;
1271 move_cur_d = cur_norm_d;
1276 cm.
props[
"dist_eucl_final"] =
1282 using map_d2d_t = std::map<double, double>;
1283 map_d2d_t pathDists;
1285 const int num_steps = ceil(D * 2.0);
1286 for (
int i = 0; i < num_steps; i++)
1288 pathDists[i / double(num_steps)] =
1293 WS_Target.x, WS_Target.y, move_k, pathDists,
1296 const auto it = std::min_element(
1297 pathDists.begin(), pathDists.end(),
1298 [colfree](map_d2d_t::value_type& l, map_d2d_t::value_type&
r)
1299 ->
bool {
return (l.second <
r.second) && l.first < colfree; });
1300 cm.
props[
"dist_eucl_min"] = (it != pathDists.end())
1307 double& hysteresis = cm.
props[
"hysteresis"];
1312 hysteresis = this_is_PTG_continuation ? 1.0 : 0.;
1320 if (
typeid(*ptr1) ==
typeid(*ptr2))
1324 desired_cmd->getVelCmdLength());
1326 double simil_score = 0.5;
1327 for (
size_t i = 0; i < desired_cmd->getVelCmdLength(); i++)
1331 desired_cmd->getVelCmdElement(i) -
1336 hysteresis = simil_score;
1343 double& clearance = cm.
props[
"clearance"];
1345 move_k, target_d_norm * 1.01,
false );
1347 move_k, target_d_norm * 0.5,
false );
1349 move_k, target_d_norm * 0.9,
true );
1351 move_k, target_d_norm * 0.5,
true );
1356 double& eta = cm.
props[
"eta"];
1361 const double path_len_meters = d * ref_dist;
1373 double discount_time = .0;
1374 if (this_is_PTG_continuation)
1384 eta -= discount_time;
1397 double cmdvel_speed_scale = 1.0;
1400 if (in_movement.
speed == 0)
1405 new_vel_cmd->setToStop();
1414 new_vel_cmd->cmdVel_scale(in_movement.
speed);
1415 cmdvel_speed_scale *= in_movement.
speed;
1425 cmdvel_speed_scale *= new_vel_cmd->cmdVel_limits(
1432 catch (std::exception& e)
1435 "[CAbstractPTGBasedReactive::generate_vel_cmd] Exception: " 1438 return cmdvel_speed_scale;
1454 for (
size_t i = 0; i < N; i++)
1458 const std::vector<double>& tp_obs =
1466 bool is_into_domain =
1468 if (!is_into_domain)
continue;
1470 ASSERT_(wp_k <
int(tp_obs.size()));
1472 const double collision_free_dist = tp_obs[wp_k];
1473 if (collision_free_dist > 1.01 * wp_norm_d)
1501 ptg_alpha_index = -1;
1504 colfreedist_move_k = .0;
1505 was_slowdown =
false;
1507 original_holo_eval = .0;
1518 const std::vector<mrpt::math::TPose2D>& relTargets,
1521 const bool this_is_PTG_continuation,
1529 const size_t idx_in_log_infoPerPTGs =
1537 bool use_this_ptg =
true;
1543 use_this_ptg =
false;
1548 use_this_ptg =
true;
1553 double timeForTPObsTransformation = .0, timeForHolonomicMethod = .0;
1556 bool any_TPTarget_is_valid =
false;
1559 for (
size_t i = 0; i < relTargets.size(); i++)
1561 const auto& trg = relTargets[i];
1566 if (!ptg_target.
valid_TP)
continue;
1568 any_TPTarget_is_valid =
true;
1575 ipf.
targets.emplace_back(ptg_target);
1579 if (!any_TPTarget_is_valid)
1582 "mov_candidate_%u", static_cast<unsigned int>(indexPTG))] =
1583 "PTG discarded since target(s) is(are) out of domain.";
1613 for (
size_t i = 0; i < Ki; i++) ipf.
TP_Obstacles[i] *= _refD;
1615 timeForTPObsTransformation =
tictac.
Tac();
1618 "navigationStep.STEP3_WSpaceToTPSpace",
1619 timeForTPObsTransformation);
1624 if (!this_is_PTG_continuation)
1656 const int kDirection =
1658 double obsFreeNormalizedDistance = ipf.
TP_Obstacles[kDirection];
1667 obsFreeNormalizedDistance =
std::min(
1668 obsFreeNormalizedDistance,
1669 std::max(0.90, obsFreeNormalizedDistance - d));
1672 double velScale = 1.0;
1676 if (obsFreeNormalizedDistance <
1679 if (obsFreeNormalizedDistance <=
1684 (obsFreeNormalizedDistance -
1691 cm.
speed *= velScale;
1696 "navigationStep.STEP4_HolonomicMethod",
1697 timeForHolonomicMethod);
1711 m_timelogger,
"navigationStep.calc_move_candidate_scores");
1715 newLogRec.
infoPerPTG[idx_in_log_infoPerPTGs], newLogRec,
1716 this_is_PTG_continuation, rel_cur_pose_wrt_last_vel_cmd_NOP,
1717 indexPTG, tim_start_iteration, HLFR);
1720 cm.
props[
"original_col_free_dist"] =
1731 const bool fill_log_record =
1733 if (fill_log_record)
1736 newLogRec.
infoPerPTG[idx_in_log_infoPerPTGs];
1737 if (!this_is_PTG_continuation)
1741 "NOP cmdvel (prev PTG idx=%u)",
1765 robot_absolute_speed_limits.loadConfigFile(
c,
s);
1776 min_normalized_free_space_for_ptg_continuation,
double);
1787 robot_absolute_speed_limits.saveToConfigFile(
c,
s);
1790 string lstHoloStr =
"# List of known classes:\n";
1794 for (
const auto& cl : lst)
1800 string(
"C++ class name of the holonomic navigation method to run in " 1801 "the transformed TP-Space.\n") +
1805 string lstDecidersStr =
"# List of known classes:\n";
1809 for (
const auto& cl : lst)
1814 motion_decider_method,
1815 string(
"C++ class name of the motion decider method.\n") +
1820 "Maximum distance up to obstacles will be considered (D_{max} in " 1824 "Time constant (in seconds) for the low-pass filter applied to " 1825 "kinematic velocity commands (default=0: no filtering)");
1827 secure_distance_start,
1828 "In normalized distance [0,1], start/end of a ramp function that " 1829 "scales the holonomic navigator output velocity.");
1831 secure_distance_end,
1832 "In normalized distance [0,1], start/end of a ramp function that " 1833 "scales the holonomic navigator output velocity.");
1836 "Whether to use robot pose inter/extrapolation to improve accuracy " 1839 max_distance_predicted_actual_path,
1840 "Max distance [meters] to discard current PTG and issue a new vel cmd " 1843 min_normalized_free_space_for_ptg_continuation,
1844 "Min normalized dist [0,1] after current pose in a PTG continuation to " 1847 enable_obstacle_filtering,
1848 "Enabled obstacle filtering (params in its own section)");
1851 "Enable exact computation of clearance (default=false)");
1853 max_dist_for_timebased_path_prediction,
1854 "Max dist [meters] to use time-based path prediction for NOP " 1860 : holonomic_method(),
1861 ptg_cache_files_directory(
"."),
1863 speedfilter_tau(0.0),
1864 secure_distance_start(0.05),
1865 secure_distance_end(0.20),
1866 use_delays_model(false),
1867 max_distance_predicted_actual_path(0.15),
1868 min_normalized_free_space_for_ptg_continuation(0.2),
1869 robot_absolute_speed_limits(),
1870 enable_obstacle_filtering(true),
1871 evaluate_clearance(false),
1872 max_dist_for_timebased_path_prediction(2.0)
1887 c,
"CAbstractPTGBasedReactive");
1895 filter->options.loadFromConfigFile(
c,
"CPointCloudFilterByDistance");
1907 "Non-registered CMultiObjectiveMotionOptimizerBase className=`%s`",
1927 c,
"CAbstractPTGBasedReactive");
1932 filter.options.saveToConfigFile(
c,
"CPointCloudFilterByDistance");
1946 for (
const auto& cl : lst)
1970 for (
const auto& cl : lst)
1989 o->setTargetApproachSlowDownDistance(dist);
double index2alpha(uint16_t k) const
Alpha value for the discrete corresponding value.
virtual bool supportSpeedAtTarget() const
Returns true if this PTG takes into account the desired velocity at target.
double original_holo_eval
std::recursive_mutex m_nav_cs
mutex for all navigation methods
double Tac() noexcept
Stops the stopwatch.
CHolonomicLogFileRecord::Ptr HLFR
Other useful info about holonomic method execution.
mrpt::math::TPose2D rel_cur_pose_wrt_last_vel_cmd_NOP
TRobotPoseVel m_curPoseVel
Current robot pose (updated in CAbstractNavigator::navigationStep() )
virtual bool getPathStepForDist(uint16_t k, double dist, uint32_t &out_step) const =0
Access path k ([0,N-1]=>[-pi,pi] in alpha): largest step count for which the traversed distance is < ...
virtual bool supportVelCmdNOP() const
Returns true if it is possible to stop sending velocity commands to the robot and, still, the robot controller will be able to keep following the last sent trajectory ("NOP" velocity commands).
double targetRelSpeed
Desired relative speed [0,1] at target.
bool createDirectory(const std::string &dirName)
Creates a directory.
#define MRPT_LOG_DEBUG(_STRING)
Use: MRPT_LOG_DEBUG("message");
mrpt::system::CTimeLogger m_timlog_delays
Time logger to collect delay-related stats.
std::vector< std::string > log_entries
Optionally, debug logging info will be stored here by the implementor classes.
int32_t nSelectedPTG
The selected PTG.
#define MRPT_LOG_ERROR_FMT(_FMT_STRING,...)
std::vector< mrpt::math::TPose2D > WS_targets_relative
Relative poses (wrt to robotPoseLocalization) for.
virtual void saveToConfigFile(mrpt::config::CConfigFileBase &c, const std::string &s) const override
This method saves the options to a ".ini"-like file or memory-stored string list. ...
mrpt::system::TParameters< double > props
List of properties.
std::unique_ptr< mrpt::io::CStream > m_logFile
virtual double getPathStepDuration() const =0
Returns the duration (in seconds) of each "step".
mrpt::math::TTwist2D cur_vel_local
The actual robot velocities in local (robot) coordinates, as read from sensors, in "m/sec" and "rad/s...
void setTargetApproachSlowDownDistance(const double dist)
Changes this parameter in all inner holonomic navigator instances [m].
virtual void onStartNewNavigation() override
Called whenever a new navigation has been started.
#define THROW_EXCEPTION(msg)
A safe way to call enter() and leave() of a mrpt::system::CTimeLogger upon construction and destructi...
T hypot_fast(const T x, const T y)
Faster version of std::hypot(), to use when overflow is not an issue and we prefer fast code...
double getRefDistance() const
std::vector< double > final_evaluation
The final evaluation score for each candidate.
std::map< std::string, mrpt::system::TTimeStamp > timestamps
Known values:
std::recursive_mutex m_critZoneLastLog
Critical zones.
std::vector< const TRuntimeClassId * > getAllRegisteredClassesChildrenOf(const TRuntimeClassId *parent_id)
Like getAllRegisteredClasses(), but filters the list to only include children clases of a given base ...
mrpt::nav::ClearanceDiagram clearance
Clearance for each path.
void copy_container_typecasting(const src_container &src, dst_container &trg)
Copy all the elements in a container (vector, deque, list) into a different one performing the approp...
virtual bool isBijectiveAt(uint16_t k, uint32_t step) const
Returns true if a given TP-Space point maps to a unique point in Workspace, and viceversa.
mrpt::math::TPose2D rel_pose_PTG_origin_wrt_sense_NOP
CParameterizedTrajectoryGenerator * PTG
The associated PTG.
#define MRPT_LOAD_CONFIG_VAR_CS(variableName, variableType)
Shortcut for MRPT_LOAD_CONFIG_VAR() for config file object named c and section string named s ...
mrpt::math::TPose2D robotPoseOdometry
void getLastLogRecord(CLogFileRecord &o)
Provides a copy of the last log record with information about execution.
TRobotPoseVel poseVel
Robot pose & velocities and timestamp of when it was queried.
std::shared_ptr< CPointCloudFilterBase > Ptr
void initialize() override
Must be called for loading collision grids, or the first navigation command may last a long time to b...
This file implements several operations that operate element-wise on individual or pairs of container...
Base for all high-level navigation commands.
void initTPObstacles(std::vector< double > &TP_Obstacles) const
Resizes and populates the initial appropriate contents in a vector of tp-obstacles (collision-free ra...
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
A base class for holonomic reactive navigation methods.
T angDistance(T from, T to)
Computes the shortest angular increment (or distance) between two planar orientations, such that it is constrained to [-pi,pi] and is correct for any combination of angles (e.g.
mrpt::math::TPose2D relPoseSense
void enableLogFile(bool enable)
Enables/disables saving log files.
virtual double maxTimeInVelCmdNOP(int path_k) const
Only for PTGs supporting supportVelCmdNOP(): this is the maximum time (in seconds) for which the path...
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
std::vector< mrpt::math::TPoint2D > TP_Targets
Target(s) location in TP-Space.
std::vector< CAbstractHolonomicReactiveMethod::Ptr > m_holonomicMethod
The holonomic navigation algorithm (one object per PTG, so internal states are maintained) ...
bool m_enableConsoleOutput
Enables / disables the console debug output.
std::string holonomic_method
C++ class name of the holonomic navigation method to run in the transformed TP-Space.
void updateClearancePost(ClearanceDiagram &cd, const std::vector< double > &TP_obstacles) const
void updateNavDynamicState(const TNavDynamicState &newState, const bool force_update=false)
To be invoked by the navigator before each navigation step, to let the PTG to react to changing dynam...
uint32_t nPTGs
The number of PTGS:
Clearance information for one particular PTG and one set of obstacles.
uint16_t getPathCount() const
Get the number of different, discrete paths in this family.
std::vector< double > TP_Obstacles
One distance per discretized alpha value, describing the "polar plot" of TP obstacles.
void keep_min(T &var, const K test_val)
If the second argument is below the first one, set the first argument to this lower value...
int target_k
The discrete version of target_alpha.
mrpt::math::LowPassFilter_IIR1 meanExecutionPeriod
Runtime estimation of execution period of the method.
mrpt::system::TTimeStamp m_WS_Obstacles_timestamp
double getLastTime(const std::string &name) const
Return the last execution time of the given "section", or 0 if it hasn't ever been called "enter" wit...
This class extends CAbstractNavigator with the capability of following a list of waypoints.
A class for storing, saving and loading a reactive navigation log record for the CReactiveNavigationS...
void setHolonomicMethod(const std::string &method, const mrpt::config::CConfigFileBase &cfgBase)
Selects which one from the set of available holonomic methods will be used into transformed TP-Space...
#define MRPT_LOG_WARN_FMT(_FMT_STRING,...)
GLsizei GLsizei GLuint * obj
double target_alpha
TP-Target.
virtual double getPathDist(uint16_t k, uint32_t step) const =0
Access path k ([0,N-1]=>[-pi,pi] in alpha): traversed distance at discrete step step.
std::string pose_frame_id
map frame ID for pose
virtual void getPathPose(uint16_t k, uint32_t step, mrpt::math::TPose2D &p) const =0
Access path k ([0,N-1]=>[-pi,pi] in alpha): pose of the vehicle at discrete step step.
mrpt::kinematics::CVehicleVelCmd::Ptr m_last_vel_cmd
Last velocity commands.
bool STEP2_SenseObstacles()
mrpt::math::TPose2D asTPose() const
virtual bool changeSpeeds(const mrpt::kinematics::CVehicleVelCmd &vel_cmd)
Default: forward call to m_robot.changeSpeed().
The struct for configuring navigation requests to CWaypointsNavigator and derived classes...
virtual bool changeSpeedsNOP()
Default: forward call to m_robot.changeSpeedsNOP().
mrpt::math::TPoint2D TP_Target
The Target, in TP-Space (x,y)
Virtual base for velocity commands of different kinematic models of planar mobile robot...
void STEP8_GenerateLogRecord(CLogFileRecord &newLogRec, const std::vector< mrpt::math::TPose2D > &relTargets, int nSelectedPTG, const mrpt::kinematics::CVehicleVelCmd::Ptr &new_vel_cmd, int nPTGs, const bool best_is_NOP_cmdvel, const math::TPose2D &rel_cur_pose_wrt_last_vel_cmd_NOP, const math::TPose2D &rel_pose_PTG_origin_wrt_sense_NOP, const double executionTimeValue, const double tim_changeSpeed, const mrpt::system::TTimeStamp &tim_start_iteration)
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream, std::istream, std::ostream, std::stringstream
double getClearance(uint16_t k, double TPS_query_distance, bool integrate_over_path) const
Gets the clearance for path k and distance TPS_query_distance in one of two modes: ...
The struct for configuring navigation requests.
#define ASSERT_(f)
Defines an assertion mechanism.
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
virtual mrpt::kinematics::CVehicleVelCmd::Ptr directionToMotionCommand(uint16_t k) const =0
Converts a discretized "alpha" value into a feasible motion command or action.
mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState ptg_last_navDynState
This is the base class for any user-defined PTG.
This class allows loading and storing values and vectors of different types from a configuration text...
This base provides a set of functions for maths stuff.
double speed_scale
[0,1] scale of the raw cmd_vel as generated by the PTG
double desiredDirection
The results from the holonomic method.
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
virtual size_t getPTG_count() const =0
Returns the number of different PTGs that have been setup.
virtual void loadConfigFile(const mrpt::config::CConfigFileBase &c) override
Loads all params from a file.
static CMultiObjectiveMotionOptimizerBase::Ptr Factory(const std::string &className) noexcept
Class factory from C++ class name.
double targetDesiredRelSpeed
(Default=.05) Desired relative speed (wrt maximum speed), in range [0,1], of the vehicle at target...
mrpt::math::TPose2D robotPoseLocalization
The robot pose (from odometry and from the localization/SLAM system).
mrpt::kinematics::CVehicleVelCmd::Ptr cmd_vel
The final motion command sent to robot, in "m/sec" and "rad/sec".
#define MRPT_LOG_DEBUG_FMT(_FMT_STRING,...)
Use: MRPT_LOG_DEBUG_FMT("i=%u", i);
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
double speed
TP-Space movement speed, normalized to [0,1].
virtual void saveConfigFile(mrpt::config::CConfigFileBase &c) const =0
saves all available parameters, in a forma loadable by initialize()
virtual void performNavigationStep() override
The main method for the navigator.
mrpt::math::TPoint2D TP_Robot
Robot location in TP-Space: normally (0,0), except during "NOP cmd vel" steps.
virtual double generate_vel_cmd(const TCandidateMovementPTG &in_movement, mrpt::kinematics::CVehicleVelCmd::Ptr &new_vel_cmd)
Return the [0,1] velocity scale of raw PTG cmd_vel.
double vx
Velocity components: X,Y (m/s)
This CStream derived class allow using a memory buffer as a CStream.
virtual double evalPathRelativePriority(uint16_t k, double target_distance) const
Query the PTG for the relative priority factor (0,1) of this PTG, in comparison to others...
mrpt::math::LowPassFilter_IIR1 timoff_sendVelCmd_avr
double desiredDirection
The desired motion direction, in the range [-PI, PI].
double timeForTPObsTransformation
Time, in seconds.
std::string motion_decider_method
C++ class name of the motion chooser.
mrpt::nav::CMultiObjectiveMotionOptimizerBase::Ptr m_multiobjopt
mrpt::math::TTwist2D curVelLocal
Current vehicle velocity (local frame of reference)
double max_dist_for_timebased_path_prediction
Max dist [meters] to use time-based path prediction for NOP evaluation.
std::unique_ptr< TNavigationParams > m_navigationParams
Current navigation parameters.
virtual void onStartNewNavigation() override
Called whenever a new navigation has been started.
uint64_t Seek(int64_t Offset, CStream::TSeekOrigin Origin=sFromBeginning) override
Introduces a pure virtual method for moving to a specified position in the streamed resource...
int16_t ptg_index_NOP
Negative means no NOP mode evaluation, so the rest of "NOP variables" should be ignored.
mrpt::aligned_std_vector< TInfoPerPTG > infoPerPTG
The info for each applied PTG: must contain "nPTGs * nSecDistances" elements.
mrpt::system::TTimeStamp timestamp
void initClearanceDiagram(ClearanceDiagram &cd) const
Must be called to resize a CD to its correct size, before calling updateClearance() ...
mrpt::math::TPose2D relTarget
Current relative target location.
Individual target info in CAbstractNavigator::TNavigationParamsBase and derived classes.
virtual void sendApparentCollisionEvent()
Callback: Apparent collision event (i.e.
std::unique_ptr< TNavigationParams > m_copy_prev_navParams
A copy of last-iteration navparams, used to detect changes.
mrpt::system::TTimeStamp m_infoPerPTG_timestamp
virtual mrpt::kinematics::CVehicleVelCmd::Ptr getSupportedKinematicVelocityCommand() const =0
Returns an empty kinematic velocity command object of the type supported by this PTG.
CHolonomicLogFileRecord::Ptr logRecord
The navigation method will create a log record and store it here via a smart pointer.
void enableApproachTargetSlowDown(bool enable)
double direction
TP-Space movement direction.
double leave(const char *func_name)
End of a named section.
double starting_robot_dir
Default to 0, they can be used to reflect a robot starting at a position not at (0,0).
const double ESTIM_LOWPASSFILTER_ALPHA
std::map< std::string, double > values
Known values:
GLsizei const GLchar ** string
virtual mrpt::kinematics::CVehicleVelCmd::Ptr getEmergencyStopCmd()=0
Gets the emergency stop command for the current robot.
CParameterizedTrajectoryGenerator::TNavDynamicState ptg_dynState
bool m_closing_navigator
Signal that the destructor has been called, so no more calls are accepted from other threads...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
virtual void STEP3_WSpaceToTPSpace(const size_t ptg_idx, std::vector< double > &out_TPObstacles, mrpt::nav::ClearanceDiagram &out_clearance, const mrpt::math::TPose2D &rel_pose_PTG_origin_wrt_sense, const bool eval_clearance)=0
Builds TP-Obstacles from Workspace obstacles for the given PTG.
mrpt::math::LowPassFilter_IIR1 timoff_obstacles_avr
double secure_distance_start
In normalized distances, the start and end of a ramp function that scales the velocity output from th...
bool enable_obstacle_filtering
virtual bool implementSenseObstacles(mrpt::system::TTimeStamp &obs_timestamp)=0
Return false on any fatal error.
std::string sprintf_vector(const char *fmt, const std::vector< T > &V)
Generates a string for a vector in the format [A,B,C,...] to std::cout, and the fmt string for each v...
std::vector< std::function< void(void)> > m_pending_events
Events generated during navigationStep(), enqueued to be called at the end of the method execution to...
mrpt::system::CTicTac tictac
std::string PTG_desc
A short description for the applied PTG.
double speedfilter_tau
Time constant (in seconds) for the low-pass filter applied to kinematic velocity commands (default=0:...
uint16_t getAlphaValuesCount() const
Get the number of different, discrete paths in this family.
double filter(double x)
Processes one input sample, updates the filter state and return the filtered value.
double desiredSpeed
The desired motion speed in that direction, from 0 up to NavInput::maxRobotSpeed. ...
mrpt::kinematics::CVehicleVelCmd::TVelCmdParams robot_absolute_speed_limits
Params related to speed limits.
ClearanceDiagram clearance
Clearance for each path.
virtual void loggingGetWSObstaclesAndShape(CLogFileRecord &out_log)=0
Generates a pointcloud of obstacles, and the robot shape, to be saved in the logging record for the c...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
pose_t & interpolate(const mrpt::Clock::time_point &t, pose_t &out_interp, bool &out_valid_interp) const
Returns the pose at a given time, or interpolates using splines if there is not an exact match...
mrpt::system::CTicTac timerForExecutionPeriod
double getScorePriority() const
When used in path planning, a multiplying factor (default=1.0) for the scores for this PTG...
Virtual base class for multi-objective motion choosers, as used for reactive navigation engines...
virtual void saveConfigFile(mrpt::config::CConfigFileBase &c) const override
Saves all current options to a config file.
mrpt::math::CVectorFloat TP_Obstacles
Distances until obstacles, in "pseudometers", first index for -PI direction, last one for PI directio...
mrpt::io::CStream * m_prev_logfile
The current log file stream, or nullptr if not being used.
GLdouble GLdouble GLdouble r
mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState navDynState
int ptg_index
0-based index of used PTG
double colfreedist_move_k
TP-Obstacles in the move direction at the instant of picking this movement.
std::vector< PTGTarget > targets
std::vector< TInfoPerPTG > m_infoPerPTG
Temporary buffers for working with each PTG during a navigationStep()
virtual void loadConfigFile(const mrpt::config::CConfigFileBase &c) override
Loads all params from a file.
virtual ~CAbstractPTGBasedReactive()
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
void doEmergencyStop(const std::string &msg)
Stops the robot and set navigation state to error.
TAbstractPTGNavigatorParams params_abstract_ptg_navigator
void deleteHolonomicObjects()
Delete m_holonomicMethod.
CLogFileRecord lastLogRecord
The last log.
void build_movement_candidate(CParameterizedTrajectoryGenerator *ptg, const size_t indexPTG, const std::vector< mrpt::math::TPose2D > &relTargets, const mrpt::math::TPose2D &rel_pose_PTG_origin_wrt_sense, TInfoPerPTG &ipf, TCandidateMovementPTG &holonomicMovement, CLogFileRecord &newLogRec, const bool this_is_PTG_continuation, mrpt::nav::CAbstractHolonomicReactiveMethod &holoMethod, const mrpt::system::TTimeStamp tim_start_iteration, const TNavigationParams &navp=TNavigationParams(), const mrpt::math::TPose2D &relPoseVelCmd_NOP=mrpt::math::TPose2D(0, 0, 0))
mrpt::math::TTwist2D velLocal
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
virtual void evalClearanceSingleObstacle(const double ox, const double oy, const uint16_t k, ClearanceDiagram::dist2clearance_t &inout_realdist2clearance, bool treat_as_obstacle=true) const
Evals the robot clearance for each robot pose along path k, for the real distances in the key of the ...
Implementation of pointcloud filtering based on requisities for minimum neigbouring points in both...
CRobot2NavInterface & m_robot
The navigator-robot interface.
mrpt::math::TTwist2D cur_vel
The actual robot velocities in global (map) coordinates, as read from sensors, in "m/sec" and "rad/se...
bool m_init_done
Whether loadConfigFile() has been called or not.
mrpt::math::LowPassFilter_IIR1 meanTotalExecutionTime
virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase &c, const std::string &s) override
This method load the options from a ".ini"-like file or memory-stored string list.
static CAbstractHolonomicReactiveMethod::Ptr Factory(const std::string &className) noexcept
#define MRPT_LOAD_CONFIG_VAR_REQUIRED_CS(variableName, variableType)
Shortcut for MRPT_LOAD_CONFIG_VAR_NO_DEFAULT() for REQUIRED variables config file object named c and ...
virtual bool impl_waypoint_is_reachable(const mrpt::math::TPoint2D &wp_local_wrt_robot) const override
Implements the way to waypoint is free function in children classes: true must be returned if...
std::string m_navlogfiles_dir
Default: "./reactivenav.logs".
virtual CParameterizedTrajectoryGenerator * getPTG(size_t i)=0
Gets the i'th PTG.
mrpt::system::CTicTac executionTime
mrpt::math::LowPassFilter_IIR1 meanExecutionTime
TAbstractPTGNavigatorParams()
#define MRPT_SAVE_CONFIG_VAR_COMMENT(variableName, __comment)
bool valid_TP
For each PTG, whether target falls into the PTG domain.
The struct for configuring navigation requests to CAbstractPTGBasedReactive and derived classes...
TargetInfo target
Navigation target.
std::weak_ptr< mrpt::poses::FrameTransformer< 2 > > m_frame_tf
Optional, user-provided frame transformer.
double m_last_curPoseVelUpdate_robot_time
mrpt::system::TTimeStamp timestampAdd(const mrpt::system::TTimeStamp tim, const double num_seconds)
Shifts a timestamp the given amount of seconds (>0: forwards in time, <0: backwards) ...
virtual void navigate(const NavInput &ni, NavOutput &no)=0
Invokes the holonomic navigation algorithm itself.
mrpt::math::TTwist2D velGlobal
bool open(const std::string &fileName, int compress_level=1)
Open a file for write, choosing the compression level.
void asString(std::string &s) const
Returns a human-readable textual representation of the object (eg: "[x y yaw]", yaw in degrees) ...
bool directoryExists(const std::string &fileName)
Test if a given directory exists (it fails if the given path refers to an existing file)...
double timeDifference(const mrpt::system::TTimeStamp t_first, const mrpt::system::TTimeStamp t_later)
Returns the time difference from t1 to t2 (positive if t2 is posterior to t1), in seconds...
TSentVelCmd m_lastSentVelCmd
Saves data to a file and transparently compress the data using the given compression level...
void Tic() noexcept
Starts the stopwatch.
mrpt::poses::CPose2DInterpolator m_latestOdomPoses
GLuint GLenum GLenum transform
The pure virtual interface between a real or simulated robot and any CAbstractNavigator-derived class...
virtual void STEP1_InitPTGs()=0
double starting_robot_dist
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
int ptg_alpha_index
Path index for selected PTG.
#define MRPT_LOG_ERROR_STREAM(__CONTENTS)
unsigned __int32 uint32_t
double secure_distance_end
mrpt::system::TTimeStamp tim_send_cmd_vel
Timestamp of when the cmd was sent.
bool m_PTGsMustBeReInitialized
Dynamic state that may affect the PTG path parameterization.
Output for CAbstractHolonomicReactiveMethod::navigate()
mrpt::math::TPose2D relPoseVelCmd
void calc_move_candidate_scores(TCandidateMovementPTG &holonomicMovement, const std::vector< double > &in_TPObstacles, const mrpt::nav::ClearanceDiagram &in_clearance, const std::vector< mrpt::math::TPose2D > &WS_Targets, const std::vector< PTGTarget > &TP_Targets, CLogFileRecord::TInfoPerPTG &log, CLogFileRecord &newLogRec, const bool this_is_PTG_continuation, const mrpt::math::TPose2D &relPoseVelCmd_NOP, const unsigned int ptg_idx4weights, const mrpt::system::TTimeStamp tim_start_iteration, const mrpt::nav::CHolonomicLogFileRecord::Ptr &hlfr)
Scores holonomicMovement.
mrpt::poses::CPose2DInterpolator m_latestPoses
Latest robot poses (updated in CAbstractNavigator::navigationStep() )
double phi
Orientation (rads)
std::shared_ptr< CObject > Ptr
mrpt::system::CTimeLogger m_timelogger
A complete time logger.
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
double getLastOutput() const
The structure used to store all relevant information about each transformation into TP-Space...
mrpt::math::LowPassFilter_IIR1 tim_changeSpeed_avr
mrpt::math::TPose2D rawOdometry
raw odometry (frame does not match to "pose", but is expected to be smoother in the short term)...
virtual void saveConfigFile(mrpt::config::CConfigFileBase &c) const =0
void registerUserMeasure(const char *event_name, const double value)
int sprintf(char *buf, size_t bufSize, const char *format,...) noexcept MRPT_printf_format_check(3
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compiler...
virtual bool inverseMap_WS2TP(double x, double y, int &out_k, double &out_normalized_d, double tolerance_dist=0.10) const =0
Computes the closest (alpha,d) TP coordinates of the trajectory point closest to the Workspace (WS) C...
bool evaluate_clearance
Default: false.
std::vector< size_t > restrict_PTG_indices
(Default=empty) Optionally, a list of PTG indices can be sent such that the navigator will restrict i...
void enter(const char *func_name)
Start of a named section.
bool m_enableKeepLogRecords
See enableKeepLogRecords.
virtual bool stop(bool isEmergencyStop)
Default: forward call to m_robot.stop().
uint16_t alpha2index(double alpha) const
Discrete index value for the corresponding alpha value.
mrpt::math::LowPassFilter_IIR1 timoff_curPoseAndSpeed_avr
double timeForHolonomicMethod
double getTargetApproachSlowDownDistance() const
Returns this parameter for the first inner holonomic navigator instances [m] (should be the same in a...
mrpt::system::CTicTac totalExecutionTime
mrpt::maps::CPointCloudFilterBase::Ptr m_WS_filter
Default: none.
void preDestructor()
To be called during children destructors to assure thread-safe destruction, and free of shared object...
Stores a candidate movement in TP-Space-based navigation.
virtual std::string getDescription() const =0
Gets a short textual description of the PTG and its parameters.
std::map< std::string, std::string > additional_debug_msgs
Additional debug traces.
virtual void saveConfigFile(mrpt::config::CConfigFileBase &c) const override
Saves all current options to a config file.
int round(const T value)
Returns the closer integer (int) to x.