3#include <chomp/Chomp.h>
4#include <ompl/control/ODESolver.h>
13using namespace params;
37 return "DEAD_RECKONING";
54 Property<double>
x{0,
"x",
this};
58 Property<double>
y{0,
"y",
this};
62 Property<double>
theta{0,
"theta",
this};
80 Property<std::string>
type{
"grid",
"type",
this};
108 Property<std::string>
generator{
"corridor",
"generator",
this};
114 Property<unsigned int>
width{50,
"width",
this};
120 Property<unsigned int>
height{50,
"height",
this};
124 Property<unsigned int>
seed{1,
"seed",
this};
134 Property<double>
radius{5,
"radius",
this};
160 Property<std::string>
source{
"image_mazes/intel-lab.png",
"source",
196 Property<std::string>
source{
"polygon_mazes/parking1.svg",
"source",
202 Property<double>
scaling{1.,
"scaling",
this};
215 "collision_model",
this};
222 "robot_shape_source",
this};
234 true,
"auto_choose_distance_computation_method",
this};
279 "cusp_angle_threshold",
this};
287 Property<int>
runs{10,
"runs",
this};
288 Property<std::string>
log_file{
"",
"log_file",
this};
305 Property<std::vector<ForwardPropagation::ForwardPropagationType>>
308 "forward_propagations",
315 {1., 3., 5., 10., 15., 20., 25., 30.},
"anytime_intervals",
this};
323 Property<bool>
active{
false,
"active",
this};
325 Property<std::string>
scenario{
"Berlin_0_256.map.scen",
"scenario",
this};
330 Property<int>
start{-10,
"start",
this};
335 Property<int>
end{-1,
"end",
this};
349 Property<bool>
grips{
false,
"grips",
this};
350 Property<bool>
chomp{
false,
"chomp",
this};
362 Property<bool>
rrt{
true,
"rrt",
this};
365 Property<bool>
cforest{
true,
"cforest",
this};
374 Property<bool>
prm{
true,
"prm",
this};
376 Property<bool>
est{
true,
"est",
this};
377 Property<bool>
sbl{
false,
"sbl",
this};
378 Property<bool>
fmt{
false,
"fmt",
this};
379 Property<bool>
bfmt{
true,
"bfmt",
this};
380 Property<bool>
sst{
true,
"sst",
this};
381 Property<bool>
kpiece{
true,
"kpiece",
this};
382 Property<bool>
stride{
false,
"stride",
this};
383 Property<bool>
spars{
true,
"spars",
this};
384 Property<bool>
spars2{
true,
"spars2",
this};
385 Property<bool>
pdst{
true,
"pdst",
this};
387 Property<bool>
fpest{
true,
"fpest",
this};
388 Property<bool>
fpsst{
true,
"fpsst",
this};
389 Property<bool>
fprrt{
true,
"fprrt",
this};
390 Property<bool>
fppdst{
true,
"fppdst",
this};
403 OmplSettings(
const char *name, Group *parent =
nullptr);
409 ompl::base::OptimizationObjectivePtr
objective{
nullptr};
420 Property<unsigned int>
seed{1,
"seed",
this};
427 Property<std::string>
sampler{
"iid",
"sampler",
this};
436 "min_pathlength",
"optimization_objective",
this};
453 {},
"geometric_planner_settings",
this};
470 {},
"control_planner_settings",
this};
501 Property<double>
kappa{0.2,
"kappa",
this};
502 Property<double>
sigma{0.2,
"sigma",
this};
512 Property<double>
alpha{3,
"alpha",
this};
513 Property<double>
phi{-1,
"phi",
this};
514 Property<double>
rho{1,
"rho",
this};
516 Property<double>
v{1,
"v",
this};
517 Property<double>
v_max{1,
"v_max",
this};
527 Property<double>
dt{0.1,
"dt",
this};
540 Property<ForwardPropagation::ForwardPropagationType>
543 "forward_propagation_type",
this};
561 Property<double>
dt{0.1,
"dt",
this};
572 false,
"search_until_first_solution",
this};
582 0.6,
"time_to_turn_45_degs_in_place",
this};
585 "./sbpl_mprim/unicycle_0.25.mprim",
"motion_primitive_filename",
this};
626 Property<double>
eta{0.9,
"eta",
this};
636 5,
"gradient_descent_rounds",
this};
653 0,
"shortcut_max_empty_steps",
this};
662 Property<unsigned int>
nodes{100u,
"nodes",
this};
663 Property<double>
alpha{0.05,
"alpha",
this};
668 Property<double>
gamma{0.8,
"gamma",
this};
675 chomp::MINIMIZE_VELOCITY,
"objective_type",
this};
687 } thetaStar{
"theta_star",
this};
691 void load(
const nlohmann::json &j) {
Stopwatch implementation to measure elapsed time.
Definition: Stopwatch.hpp:8
@ FORWARD_PROPAGATION_TYPE_KINEMATIC_CAR
Definition: ForwardPropagation.h:9
Settings required to set up planner(s) and planning problem.
Definition: PlannerSettings.h:45
@ STEER_TYPE_CC_REEDS_SHEPP
Definition: Steering.h:14
@ STEER_TYPE_REEDS_SHEPP
Definition: Steering.h:7
Definition: PlannerSettings.h:30
std::string to_string(Method m)
Definition: PlannerSettings.h:32
Method
Definition: PlannerSettings.h:31
@ BRUTE_FORCE
Definition: PlannerSettings.h:31
@ DEAD_RECKONING
Definition: PlannerSettings.h:31
Definition: PlannerSettings.h:26
Model
Definition: PlannerSettings.h:27
@ ROBOT_POINT
Definition: PlannerSettings.h:27
@ ROBOT_POLYGON
Definition: PlannerSettings.h:27
Definition: PlannerSettings.h:15
Planner
Definition: PlannerSettings.h:16
@ SBPL_ARASTAR
Definition: PlannerSettings.h:17
@ SBPL_MHA
Definition: PlannerSettings.h:21
@ SBPL_LAZY_ARA
Definition: PlannerSettings.h:22
@ SBPL_RSTAR
Definition: PlannerSettings.h:19
@ SBPL_ANASTAR
Definition: PlannerSettings.h:20
@ SBPL_ADSTAR
Definition: PlannerSettings.h:18
Definition: PlannerSettings.h:317
Property< bool > create_border
Create a border of width 1 to prevent solutions leading outside the map boundaries.
Definition: PlannerSettings.h:341
Property< int > end
End index of problem in this scenario.
Definition: PlannerSettings.h:335
Property< int > start
Start index of problem in this scenario.
Definition: PlannerSettings.h:330
Property< bool > active
Whether to run a Moving AI scenario.
Definition: PlannerSettings.h:323
Property< std::string > scenario
Definition: PlannerSettings.h:325
Select certain planning algorithms to be evaluated.
Definition: PlannerSettings.h:359
Property< bool > sbpl_adstar
Definition: PlannerSettings.h:370
Property< bool > sst
Definition: PlannerSettings.h:380
Property< bool > stride
Definition: PlannerSettings.h:382
Property< bool > sbpl_mha
Definition: PlannerSettings.h:373
Property< bool > sbpl_anastar
Definition: PlannerSettings.h:371
Property< bool > sorrt_star
Definition: PlannerSettings.h:367
Property< bool > fmt
Definition: PlannerSettings.h:378
Property< bool > rrt_star
Definition: PlannerSettings.h:363
Property< bool > bit_star
Definition: PlannerSettings.h:364
Property< bool > informed_rrt_star
Definition: PlannerSettings.h:368
Property< bool > sbpl_arastar
Definition: PlannerSettings.h:369
Property< bool > fpest
Definition: PlannerSettings.h:387
Property< bool > est
Definition: PlannerSettings.h:376
Property< bool > theta_star
Definition: PlannerSettings.h:361
Property< bool > rrt_sharp
Definition: PlannerSettings.h:366
Property< bool > cforest
Definition: PlannerSettings.h:365
Property< bool > fppdst
Definition: PlannerSettings.h:390
Property< bool > fprrt
Definition: PlannerSettings.h:389
Property< bool > kpiece
Definition: PlannerSettings.h:381
Property< bool > rrt
Definition: PlannerSettings.h:362
Property< bool > fpsst
Definition: PlannerSettings.h:388
Property< bool > prm
Definition: PlannerSettings.h:374
Property< bool > pdst
Definition: PlannerSettings.h:385
Property< bool > spars
Definition: PlannerSettings.h:383
Property< bool > sbpl_lazy_ara
Definition: PlannerSettings.h:372
Property< bool > prm_star
Definition: PlannerSettings.h:375
Property< bool > bfmt
Definition: PlannerSettings.h:379
Property< bool > sbl
Definition: PlannerSettings.h:377
Property< bool > fpkpiece
Definition: PlannerSettings.h:386
Property< bool > spars2
Definition: PlannerSettings.h:384
Select certain smoothing algorithms to be evaluated.
Definition: PlannerSettings.h:347
Property< bool > ompl_bspline
Definition: PlannerSettings.h:352
Property< bool > grips
Definition: PlannerSettings.h:349
Property< bool > ompl_shortcut
Definition: PlannerSettings.h:351
Property< bool > chomp
Definition: PlannerSettings.h:350
Property< bool > ompl_simplify_max
Definition: PlannerSettings.h:353
Settings related to benchmarking.
Definition: PlannerSettings.h:284
Property< std::string > log_file
Definition: PlannerSettings.h:288
Property< std::vector< double > > anytime_intervals
Time intervals used for the anytime planner benchmark.
Definition: PlannerSettings.h:314
PlannerSettings::GlobalSettings::BenchmarkSettings::MovingAiSettings moving_ai
PlannerSettings::GlobalSettings::BenchmarkSettings::PlanningSettings planning
Property< bool > control_planners_on
Definition: PlannerSettings.h:304
PlannerSettings::GlobalSettings::BenchmarkSettings::SmoothingSettings smoothing
Property< std::vector< Steering::SteeringType > > steer_functions
If a list of steer functions is given, they will each be tested on every run.
Definition: PlannerSettings.h:294
Property< std::vector< ForwardPropagation::ForwardPropagationType > > forward_propagations
Definition: PlannerSettings.h:306
Property< int > runs
Definition: PlannerSettings.h:287
Settings pertaining to the collision checker.
Definition: PlannerSettings.h:209
Property< Polygon > robot_shape
Definition: PlannerSettings.h:217
Property< std::string > robot_shape_source
SVG file name of robot shape.
Definition: PlannerSettings.h:221
Property< robot::Model > collision_model
Which model is used for collision checking.
Definition: PlannerSettings.h:214
void initializeCollisionModel()
Definition: PlannerSettings.cpp:310
Settings for corridor generator.
Definition: PlannerSettings.h:129
Property< double > radius
Radius of the generated corridors.
Definition: PlannerSettings.h:134
Property< int > branches
Number of branches that the corridor has.
Definition: PlannerSettings.h:138
Settings for image generator.
Definition: PlannerSettings.h:155
Property< int > desired_width
Desired width of the grid environment as number of cells after converting image to grid.
Definition: PlannerSettings.h:179
Property< double > occupancy_threshold
Threshold to set a pixel to occupied based of greyscale value in image.
Definition: PlannerSettings.h:171
Property< std::string > source
Path of image file to convert to grid map.
Definition: PlannerSettings.h:160
Property< int > desired_height
Desired height of the grid environment as number of cells after converting image to grid.
Definition: PlannerSettings.h:187
Settings for random generator.
Definition: PlannerSettings.h:144
Property< double > obstacle_ratio
Ratio of cells that will be occupied.
Definition: PlannerSettings.h:149
Settings for grid type.
Definition: PlannerSettings.h:102
Property< unsigned int > height
Height of the grid environment as number of cells.
Definition: PlannerSettings.h:120
Property< std::string > generator
Generator for grid environments ("corridor", "random", "moving_ai", "image").
Definition: PlannerSettings.h:108
PlannerSettings::GlobalSettings::EnvironmentSettings::GridSettings::CorridorSettings corridor
Property< unsigned int > width
Width of the grid environment as number of cells.
Definition: PlannerSettings.h:114
Property< unsigned int > seed
Seed used to generate grid environments.
Definition: PlannerSettings.h:124
PlannerSettings::GlobalSettings::EnvironmentSettings::GridSettings::ImageSettings image
PlannerSettings::GlobalSettings::EnvironmentSettings::GridSettings::RandomSettings random
Definition: PlannerSettings.h:191
Property< std::string > source
Generator for grid environments ("corridor", "random", "moving_ai").
Definition: PlannerSettings.h:196
Property< double > scaling
Scale polygons from InkScape.
Definition: PlannerSettings.h:202
Definition: PlannerSettings.h:75
Property< std::string > type
Environment type to load/generate ("grid"/"polygon").
Definition: PlannerSettings.h:80
StateSettings start
Start state for the planning problem.
Definition: PlannerSettings.h:85
PlannerSettings::GlobalSettings::EnvironmentSettings::CollisionSettings collision
StateSettings goal
Goal state for the planning problem.
Definition: PlannerSettings.h:89
PlannerSettings::GlobalSettings::EnvironmentSettings::GridSettings grid
void createEnvironment()
Set environment to the specified environment based on type.
Definition: PlannerSettings.cpp:277
PlannerSettings::GlobalSettings::EnvironmentSettings::PolygonSettings polygon
Definition: PlannerSettings.h:531
Property< ForwardPropagation::ForwardPropagationType > forward_propagation_type
Definition: PlannerSettings.h:541
Property< double > car_turning_radius
Definition: PlannerSettings.h:545
Property< double > sampling_resolution
Distance between states sampled using the forward propagation for collision detection,...
Definition: PlannerSettings.h:551
Property< double > car_length
Length of the wheel axis.
Definition: PlannerSettings.h:556
Property< double > dt
Integration time step.
Definition: PlannerSettings.h:561
void initializeForwardPropagation() const
Initializes OMPL state space for forward propagation, space information and optimization objective fo...
Definition: PlannerSettings.cpp:71
Settings related to OMPL.
Definition: PlannerSettings.h:397
void retrieveGeometricPlannerParams()
Retrieve available parameters and defaults for geometric planners.
Definition: PlannerSettings.cpp:332
void retrieveControlPlannerParams()
Retrieve available parameters and defaults for control planners.
Definition: PlannerSettings.cpp:371
Property< double > state_equality_tolerance
Definition: PlannerSettings.h:416
ompl::base::OptimizationObjectivePtr objective
Definition: PlannerSettings.h:409
Stopwatch steering_timer
Definition: PlannerSettings.h:414
Property< std::string > optimization_objective
The optimization objective used by OMPL.
Definition: PlannerSettings.h:435
Property< double > cost_threshold
Definition: PlannerSettings.h:418
ompl::control::SpaceInformationPtr control_space_info
Definition: PlannerSettings.h:408
ompl::control::ControlSpacePtr control_space
Definition: PlannerSettings.h:406
Property< nlohmann::json > control_planner_settings
Planner settings for control planners.
Definition: PlannerSettings.h:469
ompl::base::SpaceInformationPtr space_info
Definition: PlannerSettings.h:407
Property< unsigned int > seed
Definition: PlannerSettings.h:420
ompl::base::StateSpacePtr state_space
Definition: PlannerSettings.h:405
Property< nlohmann::json > geometric_planner_settings
Planner settings for geometric planners.
Definition: PlannerSettings.h:452
void initializeSampler() const
Sets the OMPL sampler based on the state space (steering function) and selected sampler.
Definition: PlannerSettings.cpp:139
Property< std::string > sampler
The sampler used by OMPL.
Definition: PlannerSettings.h:427
OmplSettings(const char *name, Group *parent=nullptr)
Custom constructor to expose planner settings and their default values.
Definition: PlannerSettings.cpp:325
Definition: PlannerSettings.h:565
Property< std::string > motion_primitive_filename
Definition: PlannerSettings.h:584
Property< double > time_to_turn_45_degs_in_place
Definition: PlannerSettings.h:581
Property< double > initial_solution_eps
TODO verify description How much deviation from optimal solution is acceptable (>1)?...
Definition: PlannerSettings.h:578
Property< double > goal_tolerance_y
Definition: PlannerSettings.h:608
Property< double > scaling
Scale environment to accommodate extents of SBPL's motion primitives.
Definition: PlannerSettings.h:602
Property< double > goal_tolerance_x
These tolerances are most likely ignored by SPBL at the moment.
Definition: PlannerSettings.h:607
Property< double > resolution
XXX Important: resolution must match resolution in motion primitive definition file.
Definition: PlannerSettings.h:596
Property< double > goal_tolerance_theta
Definition: PlannerSettings.h:609
Property< unsigned int > num_theta_dirs
XXX Important: number of theta directions must match resolution in motion primitive definition file.
Definition: PlannerSettings.h:590
Property< double > forward_velocity
Definition: PlannerSettings.h:579
Property< bool > search_until_first_solution
Search until it finds a solution (even if allotted time is over)?
Definition: PlannerSettings.h:571
Definition: PlannerSettings.h:659
Property< unsigned int > nodes
Definition: PlannerSettings.h:662
Property< double > alpha
Definition: PlannerSettings.h:663
Property< float > epsilon
Obstacle importance.
Definition: PlannerSettings.h:667
Property< unsigned int > max_iterations
Here, the number for global and local iterations is the same.
Definition: PlannerSettings.h:673
Property< chomp::ChompObjectiveType > objective_type
Definition: PlannerSettings.h:674
Property< double > error_tolerance
Definition: PlannerSettings.h:669
Property< double > gamma
Definition: PlannerSettings.h:668
Definition: PlannerSettings.h:616
Property< unsigned int > max_pruning_rounds
Maximum number of pruning rounds after which the algorithm should terminate.
Definition: PlannerSettings.h:641
Property< double > min_node_distance
Definition: PlannerSettings.h:622
Property< unsigned int > gradient_descent_rounds
Number of gradient descent rounds.
Definition: PlannerSettings.h:635
Property< double > eta
Definition: PlannerSettings.h:626
Property< double > eta_discount
Definition: PlannerSettings.h:630
Definition: PlannerSettings.h:645
Property< unsigned int > shortcut_max_empty_steps
Definition: PlannerSettings.h:652
Property< unsigned int > bspline_max_steps
Definition: PlannerSettings.h:648
Property< double > shortcut_snap_to_vertex
Definition: PlannerSettings.h:655
Property< double > bspline_epsilon
Definition: PlannerSettings.h:649
Property< unsigned int > shortcut_max_steps
Definition: PlannerSettings.h:651
Property< double > shortcut_range_ratio
Definition: PlannerSettings.h:654
Definition: PlannerSettings.h:613
PlannerSettings::GlobalSettings::SmoothingSettings::OmplSettings ompl
PlannerSettings::GlobalSettings::SmoothingSettings::ChompSettings chomp
PlannerSettings::GlobalSettings::SmoothingSettings::GripsSettings grips
Definition: PlannerSettings.h:498
Property< double > resolution
Definition: PlannerSettings.h:503
Property< double > kappa
Definition: PlannerSettings.h:501
Property< double > sigma
Definition: PlannerSettings.h:502
Settings related to the POSQ steer function.
Definition: PlannerSettings.h:509
Property< double > v
Definition: PlannerSettings.h:516
Property< double > rho
Definition: PlannerSettings.h:514
Property< double > dt
Integration time step.
Definition: PlannerSettings.h:527
Property< double > v_max
Definition: PlannerSettings.h:517
Property< double > axis_length
Length of the wheel axis.
Definition: PlannerSettings.h:522
Property< double > phi
Definition: PlannerSettings.h:513
Property< double > alpha
Definition: PlannerSettings.h:512
Property< double > rho_end_condition
Definition: PlannerSettings.h:515
Definition: PlannerSettings.h:479
PlannerSettings::GlobalSettings::SteerSettings::PosqSettings posq
void initializeSteering() const
Initializes OMPL state space, space information and optimization objective for the given steer functi...
Definition: PlannerSettings.cpp:189
Property< double > sampling_resolution
Distance between states sampled using the steer function for collision detection, rendering and evalu...
Definition: PlannerSettings.h:496
Property< Steering::SteeringType > steering_type
Definition: PlannerSettings.h:488
PlannerSettings::GlobalSettings::SteerSettings::HC_CC_Settings hc_cc
Property< double > car_turning_radius
Definition: PlannerSettings.h:490
Definition: PlannerSettings.h:680
Property< int > number_edges
This setting is relevant for Theta* and Smooth Theta*.
Definition: PlannerSettings.h:686
Global settings.
Definition: PlannerSettings.h:68
Property< double > exact_goal_radius
Radius threshold to evaluate whether the exact goal has been found.
Definition: PlannerSettings.h:262
std::shared_ptr< Environment > environment
Environment used for planning.
Definition: PlannerSettings.h:73
void load(const nlohmann::json &j)
Definition: PlannerSettings.h:691
Property< distance_computation::Method > distance_computation_method
Definition: PlannerSettings.h:235
PlannerSettings::GlobalSettings::OmplSettings ompl
PlannerSettings::GlobalSettings::SmoothingSettings smoothing
Property< bool > evaluate_clearing
Whether to compute stats on clearing distances of the found solutions.
Definition: PlannerSettings.h:257
Property< unsigned int > fast_odf_threshold
For maps with more cells than this threshold, a fast approximating algorithm is used to compute the o...
Definition: PlannerSettings.h:245
PlannerSettings::GlobalSettings::SteerSettings steer
GlobalSettings()
Definition: PlannerSettings.h:689
Property< bool > log_env_distances
Whether to log the distances precomputed by the grid mazes.
Definition: PlannerSettings.h:231
PlannerSettings::GlobalSettings::BenchmarkSettings benchmark
Property< bool > estimate_theta
Whether to estimate the orientation of the start and goal states for planners that need them (e....
Definition: PlannerSettings.h:252
Property< double > max_planning_time
Definition: PlannerSettings.h:238
PlannerSettings::GlobalSettings::EnvironmentSettings env
Property< double > cusp_angle_threshold
Threshold in radians of the difference between consecutive yaw angles to be considered a cusp.
Definition: PlannerSettings.h:278
Property< double > max_path_length
Maximal length a og::PathGeometric can have to be interpolated.
Definition: PlannerSettings.h:272
Property< bool > auto_choose_distance_computation_method
Definition: PlannerSettings.h:233
Property< unsigned int > interpolation_limit
Any og::PathGeometric with more nodes will not get interpolated.
Definition: PlannerSettings.h:267
PlannerSettings::GlobalSettings::ForwardPropagationSettings forwardpropagation
State representation.
Definition: PlannerSettings.h:49
Property< double > theta
Heading angle of the state.
Definition: PlannerSettings.h:62
Property< double > y
Y-coordinate of the state.
Definition: PlannerSettings.h:58
Property< double > x
X-coordinate of the state.
Definition: PlannerSettings.h:54
Definition: Primitives.h:145
Definition: PlannerSettings.h:698
static PlannerSettings::GlobalSettings settings
Definition: PlannerSettings.h:699