28 template <
typename node_pose_t,
typename world_limits_t>
36 template <
typename tree_t>
66 acceptedDistToTarget(0.1),
68 maxComputationTime(0.0),
69 minComputationTime(0.0)
154 draw_shape_decimation(1),
156 x_nearest_pose(NULL),
157 local_obs_from_nearest_pose(NULL),
160 highlight_last_added_edge(false),
161 ground_xy_grid_frequency(10.0),
162 color_vehicle(0xFF, 0x00, 0x00, 0xFF),
163 color_obstacles(0x00, 0x00, 0xFF, 0x40),
164 color_local_obstacles(0x00, 0x00, 0xFF),
165 color_start(0x00, 0x00, 0x00, 0x00),
166 color_goal(0x00, 0x00, 0x00, 0x00),
167 color_ground_xy_grid(0xFF, 0xFF, 0xFF),
168 color_normal_edge(0x22, 0x22, 0x22, 0x40),
169 color_last_edge(0xff, 0xff, 0x00),
170 color_optimal_edge(0x00, 0x00, 0x00),
171 width_last_edge(3.f),
172 width_normal_edge(1.f),
173 width_optimal_edge(4.f),
174 point_size_obstacles(5),
175 point_size_local_obstacles(5),
176 vehicle_shape_z(0.01),
177 vehicle_line_width(2.0),
178 draw_obstacles(true),
179 log_msg_position(0, 0, 0),
187 template <
typename node_pose_t,
typename world_limits_t,
typename tree_t>
192 const TRenderPlannedPathOptions &options
205 void internal_initialize_PTG();
207 static void transformPointcloudWithSquareClipping(
211 const double MAX_DIST_XY
214 void spaceTransformer(
218 std::vector<double> &out_TPObstacles
221 void spaceTransformerOneDirectionOnly(
222 const int tp_space_k_direction,
226 double &out_TPObstacle_k
mrpt::utils::TColor color_goal
END indication color.
double minComputationTime
In seconds. 0 means the first valid path will be returned. Otherwise, the algorithm will try to refin...
virtual ~TRenderPlannedPathOptions()
double vehicle_shape_z
(Default=0.01) Height (Z coordinate) for the vehicle shapes. Helps making it in the "first plane" ...
double minDistanceBetweenNewNodes
Minimum distance [meters] to nearest node to accept creating a new one (default=0.10). (Any of minDistanceBetweenNewNodes and minAngBetweenNewNodes must be satisfied)
std::set< mrpt::utils::TNodeID > acceptable_goal_node_ids
The set of target nodes within an acceptable distance to target (including best_goal_node_id and othe...
double maxLength
(Very sensitive parameter!) Max length of each edge path (in meters, default=1.0) ...
double minAngBetweenNewNodes
Minimum angle [rad] to nearest node to accept creating a new one (default=15 deg) (Any of minDistance...
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
const mrpt::maps::CPointsMap * local_obs_from_nearest_pose
const mrpt::poses::CPose2D * x_rand_pose
mrpt::utils::CTimeLogger & getProfiler()
mrpt::math::TPoint3D log_msg_position
mrpt::utils::TColor color_ground_xy_grid
mrpt::utils::TNodeID highlight_path_to_node_id
Highlight the path from root towards this node (usually, the target)
size_t save_3d_log_freq
Frequency (in iters) of saving tree state to debug log files viewable in SceneViewer3D (default=0...
double xyzcorners_scale
A scale factor to all XYZ corners (default=0, means auto determien from vehicle shape) ...
double acceptedAngToTarget
Maximum angle from a pose to target to accept it as a valid solution (rad). (Both acceptedDistToTarge...
This class allows loading and storing values and vectors of different types from a configuration text...
bool highlight_last_added_edge
(Default=false)
double robot_shape_circular_radius
The radius of a circular-shape-model of the robot shape.
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors...
This is the base class for any user-defined PTG.
mrpt::nav::TListPTGPtr m_PTGs
uint64_t TNodeID
The type for node IDs in graphs of different types.
bool success
Whether the target was reached or not.
Virtual base class for TP-Space-based path planners.
Options for renderMoveTree()
double vehicle_line_width
Robot line width for visualization - default 2.0.
const mrpt::nav::TListPTGPtr & getPTGs() const
mrpt::utils::TColor color_optimal_edge
double acceptedDistToTarget
Maximum distance from a pose to target to accept it as a valid solution (meters). (Both acceptedDistT...
RRTEndCriteria end_criteria
GLsizei const GLchar ** string
mrpt::utils::TNodeID best_goal_node_id
The ID of the best target node in the tree.
double ground_xy_grid_frequency
(Default=10 meters) Set to 0 to disable
double path_cost
Total cost of the best found path (cost ~~ Euclidean distance)
const mrpt::poses::CPose2D * x_nearest_pose
bool draw_obstacles
(Default=true)
double maxComputationTime
In seconds. 0 means no limit until a solution is found.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
RRTAlgorithmParams params
Parameters specific to this path solver algorithm.
double goal_distance
Distance from best found path to goal.
double computation_time
Time spent (in secs)
int point_size_local_obstacles
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
mrpt::maps::CSimplePointsMap m_local_obs
const mrpt::poses::CPose2D * new_state
bool ptg_verbose
Display PTG construction info (default=true)
mrpt::utils::TColor color_vehicle
Robot color.
This class allows the user to create, load, save, and render 3D scenes using OpenGL primitives...
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.
size_t draw_shape_decimation
(Default=1) Draw one out of N vehicle shapes along the highlighted path
mrpt::utils::TColor color_last_edge
TRenderPlannedPathOptions()
mrpt::math::TPolygon2D robot_shape
The robot shape used when computing collisions; it's loaded from the config file/text as a single 2xN...
double goalBias
Probabily of picking the goal as random target (in [0,1], default=0.05)
mrpt::utils::TColor color_start
START indication color.
mrpt::utils::TColor color_obstacles
obstacles color
std::vector< mrpt::nav::CParameterizedTrajectoryGeneratorPtr > TListPTGPtr
A list of PTGs (smart pointers)
std::string ptg_cache_files_directory
(Default: ".")
mrpt::utils::TColor color_normal_edge
2D polygon, inheriting from std::vector<TPoint2D>.
mrpt::utils::TColor color_local_obstacles
local obstacles color
mrpt::utils::CTimeLogger m_timelogger
tree_t move_tree
The generated motion tree that explores free space starting at "start".