selfdriving
|
Namespaces | |
ptg | |
Typedefs | |
using | astar_heuristic_t = std::function< cost_t(const SE2_KinState &, const SE2orR2_KinState &)> |
using | distance_t = double |
using | normalized_distance_t = double |
using | ptg_step_t = uint32_t |
using | cost_t = double |
using | trajectory_index_t = int |
using | ptg_index_t = size_t |
using | normalized_speed_t = double |
using | duration_seconds_t = double |
template<typename T > | |
using | const_ref_t = std::optional< std::reference_wrapper< const T > > |
using | MotionPrimitivesTreeSE2 = MotionPrimitivesTree< SE2_KinState, MoveEdgeSE2_TPS > |
using | planner_progress_callback_t = std::function< void(const ProgressCallbackData &)> |
using | ptg_t = mrpt::nav::CParameterizedTrajectoryGenerator |
using | robot_radius_t = double |
using | RobotShape = std::variant< mrpt::math::TPolygon2D, robot_radius_t, std::monostate > |
using | trajectory_t = std::map< duration_seconds_t, trajectory_state_t > |
using | waypoint_idx_t = std::size_t |
Enumerations | |
enum | NavStatus : uint8_t { NavStatus::IDLE = 0, NavStatus::NAVIGATING, NavStatus::SUSPENDED, NavStatus::NAV_ERROR } |
enum | NavError : uint8_t { NavError::NONE = 0, NavError::EMERGENCY_STOP, NavError::CANNOT_REACH_TARGET, NavError::OTHER } |
enum | STOP_TYPE : uint8_t { STOP_TYPE::REGULAR = 0, STOP_TYPE::EMERGENCY } |
Functions | |
bool | bestTrajectory (MoveEdgeSE2_TPS &npa, const TrajectoriesAndRobotShape &trs, std::optional< mrpt::system::COutputLogger *> logger=std::nullopt) |
void | edge_interpolated_path (MoveEdgeSE2_TPS &edge, const TrajectoriesAndRobotShape &trs, const std::optional< mrpt::math::TPose2D > &reconstrRelPoseOpt=std::nullopt, const std::optional< size_t > &ptg_stepOpt=std::nullopt, const std::optional< size_t > &numSegments=std::nullopt) |
void | refine_trajectory (const MotionPrimitivesTreeSE2::path_t &inPath, MotionPrimitivesTreeSE2::edge_sequence_t &edgesToRefine, const TrajectoriesAndRobotShape &ptgInfo) |
void | refine_trajectory (const std::vector< MotionPrimitivesTreeSE2::node_t > &inPath, std::vector< MotionPrimitivesTreeSE2::edge_t > &edgesToRefine, const TrajectoriesAndRobotShape &ptgInfo) |
auto | render_tree (const MotionPrimitivesTreeSE2 &tree, const PlannerInput &pi, const RenderOptions &ro) -> std::shared_ptr< mrpt::opengl::CSetOfObjects > |
auto | render_vehicle (const RobotShape &rs, mrpt::opengl::CSetOfLines &outPolygon, const RenderVehicleParams &rvp={}) -> RenderVehicleExtraResults |
distance_t | tp_obstacles_single_path (const trajectory_index_t tp_space_k_direction, const mrpt::maps::CPointsMap &localObstacles, const ptg_t &ptg) |
trajectory_t | plan_to_trajectory (const MotionPrimitivesTreeSE2::edge_sequence_t &planEdges, const TrajectoriesAndRobotShape &ptgInfo, const duration_seconds_t samplePeriod=50e-3) |
bool | save_to_txt (const trajectory_t &traj, const std::string &fileName) |
void | transform_pc_square_clipping (const mrpt::maps::CPointsMap &inMap, const mrpt::poses::CPose2D &asSeenFrom, const double MAX_DIST_XY, mrpt::maps::CPointsMap &outMap, bool appendToOutMap=true) |
void | viz_nav_plan (const PlannerOutput &plan, const VisualizationOptions &opts={}, const std::vector< CostEvaluator::Ptr > costEvaluators={}) |
void | viz_nav_plan_animation (const PlannerOutput &plan, const mpp::trajectory_t &traj, const RenderOptions &opts={}, const std::vector< CostEvaluator::Ptr > costEvaluators={}) |
bool | operator< (const TPS_point &a, const TPS_point &b) |
bool | obstaclePointCollides (const mrpt::math::TPoint2D &obstacleWrtRobot, const TrajectoriesAndRobotShape &trs) |
using mpp::astar_heuristic_t = typedef std::function<cost_t( const SE2_KinState& , const SE2orR2_KinState& )> |
using mpp::const_ref_t = typedef std::optional<std::reference_wrapper<const T> > |
Wrapper to a const reference to T
using mpp::cost_t = typedef double |
Cost of a given trajectory or trajectory segment
using mpp::distance_t = typedef double |
Distances measured by PoseDistanceMetric, or "pseudodistances" of PTGs, that is, distances along SE(2), including a weighted distance for rotations
using mpp::duration_seconds_t = typedef double |
Time duration in seconds
using mpp::MotionPrimitivesTreeSE2 = typedef MotionPrimitivesTree<SE2_KinState, MoveEdgeSE2_TPS> |
tree data structure for planning in SE2 within TP-Space manifolds
using mpp::normalized_distance_t = typedef double |
TPS normalized distances in range [0,1]
using mpp::normalized_speed_t = typedef double |
Normalized (or relative) speed in range [0,1]
using mpp::planner_progress_callback_t = typedef std::function<void(const ProgressCallbackData&)> |
using mpp::ptg_index_t = typedef size_t |
using mpp::ptg_step_t = typedef uint32_t |
TPS discrete time steps
using mpp::ptg_t = typedef mrpt::nav::CParameterizedTrajectoryGenerator |
using mpp::robot_radius_t = typedef double |
using mpp::RobotShape = typedef std::variant<mrpt::math::TPolygon2D, robot_radius_t, std::monostate> |
using mpp::trajectory_index_t = typedef int |
Index of a trajectory in a PTG
using mpp::trajectory_t = typedef std::map<duration_seconds_t, trajectory_state_t> |
using mpp::waypoint_idx_t = typedef std::size_t |
|
strong |
|
strong |
|
strong |
bool mpp::bestTrajectory | ( | MoveEdgeSE2_TPS & | npa, |
const TrajectoriesAndRobotShape & | trs, | ||
std::optional< mrpt::system::COutputLogger *> | logger = std::nullopt |
||
) |
Finds the best trajectory between two kinematic states, given the set of feasible trajectories.
void mpp::edge_interpolated_path | ( | MoveEdgeSE2_TPS & | edge, |
const TrajectoriesAndRobotShape & | trs, | ||
const std::optional< mrpt::math::TPose2D > & | reconstrRelPoseOpt = std::nullopt , |
||
const std::optional< size_t > & | ptg_stepOpt = std::nullopt , |
||
const std::optional< size_t > & | numSegments = std::nullopt |
||
) |
bool mpp::obstaclePointCollides | ( | const mrpt::math::TPoint2D & | obstacleWrtRobot, |
const TrajectoriesAndRobotShape & | trs | ||
) |
trajectory_t mpp::plan_to_trajectory | ( | const MotionPrimitivesTreeSE2::edge_sequence_t & | planEdges, |
const TrajectoriesAndRobotShape & | ptgInfo, | ||
const duration_seconds_t | samplePeriod = 50e-3 |
||
) |
void mpp::refine_trajectory | ( | const MotionPrimitivesTreeSE2::path_t & | inPath, |
MotionPrimitivesTreeSE2::edge_sequence_t & | edgesToRefine, | ||
const TrajectoriesAndRobotShape & | ptgInfo | ||
) |
Takes a sequence of N states (the inPath) and the N-1 edges in between them, and recalculate the PTG parameters of all edges using the exact poses in the path nodes.
void mpp::refine_trajectory | ( | const std::vector< MotionPrimitivesTreeSE2::node_t > & | inPath, |
std::vector< MotionPrimitivesTreeSE2::edge_t > & | edgesToRefine, | ||
const TrajectoriesAndRobotShape & | ptgInfo | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
auto mpp::render_tree | ( | const MotionPrimitivesTreeSE2 & | tree, |
const PlannerInput & | pi, | ||
const RenderOptions & | ro | ||
) | -> std::shared_ptr< mrpt::opengl::CSetOfObjects > |
Gets a CSetOfObjects::Ptr visual representation of a motion tree
auto mpp::render_vehicle | ( | const RobotShape & | rs, |
mrpt::opengl::CSetOfLines & | outPolygon, | ||
const RenderVehicleParams & | rvp = {} |
||
) | -> RenderVehicleExtraResults |
Generates a polygon for the vehicle shape
bool mpp::save_to_txt | ( | const trajectory_t & | traj, |
const std::string & | fileName | ||
) |
distance_t mpp::tp_obstacles_single_path | ( | const trajectory_index_t | tp_space_k_direction, |
const mrpt::maps::CPointsMap & | localObstacles, | ||
const ptg_t & | ptg | ||
) |
Returns TPS-distance (pseudometers, not normalized) to obstacles. ptg dynamic state must be updated by the caller.
void mpp::transform_pc_square_clipping | ( | const mrpt::maps::CPointsMap & | inMap, |
const mrpt::poses::CPose2D & | asSeenFrom, | ||
const double | MAX_DIST_XY, | ||
mrpt::maps::CPointsMap & | outMap, | ||
bool | appendToOutMap = true |
||
) |
Returns local obstacles as seen from a given pose, clipped to a maximum distance.
void mpp::viz_nav_plan | ( | const PlannerOutput & | plan, |
const VisualizationOptions & | opts = {} , |
||
const std::vector< CostEvaluator::Ptr > | costEvaluators = {} |
||
) |
void mpp::viz_nav_plan_animation | ( | const PlannerOutput & | plan, |
const mpp::trajectory_t & | traj, | ||
const RenderOptions & | opts = {} , |
||
const std::vector< CostEvaluator::Ptr > | costEvaluators = {} |
||
) |