3 #include <ompl/geometric/planners/est/BiEST.h>
4 #include <ompl/geometric/planners/est/EST.h>
5 #include <ompl/geometric/planners/est/ProjEST.h>
6 #include <ompl/geometric/planners/fmt/BFMT.h>
7 #include <ompl/geometric/planners/fmt/FMT.h>
8 #include <ompl/geometric/planners/kpiece/BKPIECE1.h>
9 #include <ompl/geometric/planners/kpiece/KPIECE1.h>
10 #include <ompl/geometric/planners/kpiece/LBKPIECE1.h>
11 #include <ompl/geometric/planners/pdst/PDST.h>
12 #include <ompl/geometric/planners/prm/LazyPRM.h>
13 #include <ompl/geometric/planners/prm/LazyPRMstar.h>
14 #include <ompl/geometric/planners/prm/PRM.h>
15 #include <ompl/geometric/planners/prm/PRMstar.h>
16 #include <ompl/geometric/planners/prm/SPARS.h>
17 #include <ompl/geometric/planners/prm/SPARStwo.h>
18 #include <ompl/geometric/planners/rrt/LazyRRT.h>
19 #include <ompl/geometric/planners/rrt/RRT.h>
20 #include <ompl/geometric/planners/rrt/RRTConnect.h>
21 #include <ompl/geometric/planners/rrt/RRTstar.h>
50 makePlanner<ompl::geometric::RRTConnect>(
true));
98 builder->ss->setPlanner(it->second());
110 auto gls = std::dynamic_pointer_cast<ompl::base::GoalLazySamples>(
goal_);
112 gls->startSampling();
116 ompl::base::PlannerStatus solved =
builder->ss->solve(request.allowed_planning_time);
119 auto time = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
128 if (solved == ompl::base::PlannerStatus::EXACT_SOLUTION)
129 response.
error_code_.val = moveit_msgs::MoveItErrorCodes::SUCCESS;
131 response.
error_code_.val = moveit_msgs::MoveItErrorCodes::FAILURE;
134 auto path =
builder->getSolutionPath();
137 std::make_shared<robot_trajectory::RobotTrajectory>(
robot_->getModel(), request.group_name);
139 for (
const auto &s : path.getStates())
145 auto ms =
robot_->allocState();
An abstract interface to a motion planning algorithm.
RobotPtr robot_
The robot to plan for.
A shared pointer wrapper for robowflex::Robot.
A const shared pointer wrapper for robowflex::Scene.
bool computeTimeParameterization(double max_velocity=1., double max_acceleration=1.)
Computes the time parameterization of a path according to a desired max velocity or acceleration.
std::vector< std::string > getPlannerConfigs() const override
Return all planner configurations offered by this planner. Any of the configurations returned can be ...
void setupPlanners()
Setup planner allocators.
RobotPtr dart_robot_
DART version of the robot.
DARTPlanner(const robowflex::RobotPtr &robot, const std::string &name="DARTPlanner")
Constructor. Takes in a robot description and an optional namespace name. If name is specified,...
PlanBuilderPtr builder
DART Motion Plan Builder.
StructurePtr dart_scene_
DART version of current planning request scene.
void preRun(const robowflex::SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) override
This function is called before benchmarking. Here, it is used to setup the DART scene before the solv...
planning_interface::MotionPlanResponse plan(const robowflex::SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) override
Plan a motion given a request and a scene.
WorldPtr world_
DART world containing robot and scene.
ompl::base::GoalPtr goal_
Current motion planning goal.
SceneConstPtr scene_
Current planning request scene.
std::map< std::string, PlannerAllocator > planner_allocators_
Named planner allocators.
A sampleable goal region for OMPL for a set of TSRs. Samples goals in a separate thread using a clone...
Wrapper for a dart::simulation::World, which contains a set of skeletons (i.e., Robots and Structures...
T emplace_back(T... args)
moveit_msgs::MotionPlanRequest MotionPlanRequest
Functions for loading and animating robots in Blender.
DART-based robot modeling and planning.
Main namespace. Contains all library classes and functions.
Functions for loading and animating scenes in Blender.
moveit_msgs::MoveItErrorCodes error_code_
robot_trajectory::RobotTrajectoryPtr trajectory_