#include <model_based_planning_context.h>
Public Member Functions | |
bool | benchmark (double timeout, unsigned int count, const std::string &filename="") |
void | clear () override |
virtual void | configure (const ros::NodeHandle &nh, bool use_constraints_approximations) |
Configure ompl_simple_setup_ and optionally the constraints_library_. More... | |
void | convertPath (const og::PathGeometric &pg, robot_trajectory::RobotTrajectory &traj) const |
const moveit::core::RobotState & | getCompleteInitialRobotState () const |
const constraint_samplers::ConstraintSamplerManagerPtr & | getConstraintSamplerManager () |
const ConstraintsLibraryPtr & | getConstraintsLibrary () const |
ConstraintsLibraryPtr | getConstraintsLibraryNonConst () |
const moveit::core::JointModelGroup * | getJointModelGroup () const |
double | getLastPlanTime () const |
double | getLastSimplifyTime () const |
unsigned int | getMaximumGoalSamples () const |
unsigned int | getMaximumGoalSamplingAttempts () const |
unsigned int | getMaximumPlanningThreads () const |
double | getMaximumSolutionSegmentLength () const |
unsigned int | getMaximumStateSamplingAttempts () const |
unsigned int | getMinimumWaypointCount () const |
ot::Benchmark & | getOMPLBenchmark () |
const ot::Benchmark & | getOMPLBenchmark () const |
og::SimpleSetupPtr & | getOMPLSimpleSetup () |
const og::SimpleSetupPtr & | getOMPLSimpleSetup () const |
const ModelBasedStateSpacePtr & | getOMPLStateSpace () const |
const kinematic_constraints::KinematicConstraintSetPtr & | getPathConstraints () const |
const moveit::core::RobotModelConstPtr & | getRobotModel () const |
bool | getSolutionPath (robot_trajectory::RobotTrajectory &traj) const |
const ModelBasedPlanningContextSpecification & | getSpecification () const |
const std::map< std::string, std::string > & | getSpecificationConfig () const |
void | interpolateSolution () |
bool | loadConstraintApproximations (const ros::NodeHandle &nh) |
Look up param server 'constraint_approximations' and use its value as the path to load constraint approximations to. More... | |
ModelBasedPlanningContext (const std::string &name, const ModelBasedPlanningContextSpecification &spec) | |
bool | saveConstraintApproximations (const ros::NodeHandle &nh) |
Look up param server 'constraint_approximations' and use its value as the path to save constraint approximations to. More... | |
void | setCompleteInitialState (const moveit::core::RobotState &complete_initial_robot_state) |
void | setConstraintSamplerManager (const constraint_samplers::ConstraintSamplerManagerPtr &csm) |
void | setConstraintsApproximations (const ConstraintsLibraryPtr &constraints_library) |
bool | setGoalConstraints (const std::vector< moveit_msgs::Constraints > &goal_constraints, const moveit_msgs::Constraints &path_constraints, moveit_msgs::MoveItErrorCodes *error) |
void | setHybridize (bool flag) |
void | setInterpolation (bool flag) |
void | setMaximumGoalSamples (unsigned int max_goal_samples) |
void | setMaximumGoalSamplingAttempts (unsigned int max_goal_sampling_attempts) |
void | setMaximumPlanningThreads (unsigned int max_planning_threads) |
void | setMaximumSolutionSegmentLength (double mssl) |
void | setMaximumStateSamplingAttempts (unsigned int max_state_sampling_attempts) |
void | setMinimumWaypointCount (unsigned int mwc) |
Get the minimum number of waypoints along the solution path. More... | |
bool | setPathConstraints (const moveit_msgs::Constraints &path_constraints, moveit_msgs::MoveItErrorCodes *error) |
void | setPlanningVolume (const moveit_msgs::WorkspaceParameters &wparams) |
void | setProjectionEvaluator (const std::string &peval) |
void | setSpecificationConfig (const std::map< std::string, std::string > &config) |
void | setVerboseStateValidityChecks (bool flag) |
void | simplifySolution (double timeout) |
bool | simplifySolutions () const |
void | simplifySolutions (bool flag) |
const moveit_msgs::MoveItErrorCodes | solve (double timeout, unsigned int count) |
bool | solve (planning_interface::MotionPlanDetailedResponse &res) override |
bool | solve (planning_interface::MotionPlanResponse &res) override |
bool | terminate () override |
~ModelBasedPlanningContext () override | |
Public Member Functions inherited from planning_interface::PlanningContext | |
const std::string & | getGroupName () const |
const MotionPlanRequest & | getMotionPlanRequest () const |
const std::string & | getName () const |
const planning_scene::PlanningSceneConstPtr & | getPlanningScene () const |
PlanningContext (const std::string &name, const std::string &group) | |
void | setMotionPlanRequest (const MotionPlanRequest &request) |
void | setPlanningScene (const planning_scene::PlanningSceneConstPtr &planning_scene) |
virtual | ~PlanningContext () |
Protected Member Functions | |
virtual ob::StateSamplerPtr | allocPathConstrainedSampler (const ompl::base::StateSpace *ss) const |
virtual ob::GoalPtr | constructGoal () |
virtual ob::PlannerTerminationCondition | constructPlannerTerminationCondition (double timeout, const ompl::time::point &start) |
int32_t | errorCode (const ompl::base::PlannerStatus &status) |
Convert OMPL PlannerStatus to moveit_msgs::msg::MoveItErrorCode. More... | |
virtual ob::ProjectionEvaluatorPtr | getProjectionEvaluator (const std::string &peval) const |
void | postSolve () |
void | preSolve () |
void | registerTerminationCondition (const ob::PlannerTerminationCondition &ptc) |
void | startSampling () |
void | stopSampling () |
void | unregisterTerminationCondition () |
virtual void | useConfig () |
Protected Attributes | |
moveit::core::RobotState | complete_initial_robot_state_ |
ConstraintsLibraryPtr | constraints_library_ |
std::vector< kinematic_constraints::KinematicConstraintSetPtr > | goal_constraints_ |
bool | hybridize_ |
bool | interpolate_ |
double | last_plan_time_ |
the time spent computing the last plan More... | |
double | last_simplify_time_ |
the time spent simplifying the last plan More... | |
unsigned int | max_goal_samples_ |
unsigned int | max_goal_sampling_attempts_ |
maximum number of attempts to be made at sampling a goal states More... | |
unsigned int | max_planning_threads_ |
when planning in parallel, this is the maximum number of threads to use at one time More... | |
double | max_solution_segment_length_ |
unsigned int | max_state_sampling_attempts_ |
unsigned int | minimum_waypoint_count_ |
bool | multi_query_planning_enabled_ |
when false, clears planners before running solve() More... | |
ot::Benchmark | ompl_benchmark_ |
the OMPL tool for benchmarking planners More... | |
ot::ParallelPlan | ompl_parallel_plan_ |
tool used to compute multiple plans in parallel; this uses the problem definition maintained by ompl_simple_setup_ More... | |
og::SimpleSetupPtr | ompl_simple_setup_ |
the OMPL planning context; this contains the problem definition and the planner used More... | |
kinematic_constraints::KinematicConstraintSetPtr | path_constraints_ |
moveit_msgs::Constraints | path_constraints_msg_ |
const ob::PlannerTerminationCondition * | ptc_ |
std::mutex | ptc_lock_ |
bool | simplify_solutions_ |
std::vector< int > | space_signature_ |
ModelBasedPlanningContextSpecification | spec_ |
Protected Attributes inherited from planning_interface::PlanningContext | |
std::string | group_ |
std::string | name_ |
planning_scene::PlanningSceneConstPtr | planning_scene_ |
MotionPlanRequest | request_ |
Definition at line 105 of file model_based_planning_context.h.
ompl_interface::ModelBasedPlanningContext::ModelBasedPlanningContext | ( | const std::string & | name, |
const ModelBasedPlanningContextSpecification & | spec | ||
) |
Definition at line 73 of file model_based_planning_context.cpp.
|
inlineoverride |
Definition at line 110 of file model_based_planning_context.h.
|
protectedvirtual |
Definition at line 200 of file model_based_planning_context.cpp.
bool ompl_interface::ModelBasedPlanningContext::benchmark | ( | double | timeout, |
unsigned int | count, | ||
const std::string & | filename = "" |
||
) |
Definition at line 613 of file model_based_planning_context.cpp.
|
overridevirtual |
Implements planning_interface::PlanningContext.
Definition at line 551 of file model_based_planning_context.cpp.
|
virtual |
Configure ompl_simple_setup_ and optionally the constraints_library_.
ompl_simple_setup_ gets a start state, state sampler, and state validity checker.
nh | ROS node handle used to load the constraint approximations. |
use_constraints_approximations | Set to true if we want to load the constraint approximation. |
Definition at line 100 of file model_based_planning_context.cpp.
|
protectedvirtual |
Definition at line 461 of file model_based_planning_context.cpp.
|
protectedvirtual |
Definition at line 488 of file model_based_planning_context.cpp.
void ompl_interface::ModelBasedPlanningContext::convertPath | ( | const og::PathGeometric & | pg, |
robot_trajectory::RobotTrajectory & | traj | ||
) | const |
Definition at line 436 of file model_based_planning_context.cpp.
|
protected |
Convert OMPL PlannerStatus to moveit_msgs::msg::MoveItErrorCode.
Definition at line 813 of file model_based_planning_context.cpp.
|
inline |
Definition at line 145 of file model_based_planning_context.h.
|
inline |
Definition at line 251 of file model_based_planning_context.h.
|
inline |
Definition at line 283 of file model_based_planning_context.h.
|
inline |
Definition at line 278 of file model_based_planning_context.h.
|
inline |
Definition at line 140 of file model_based_planning_context.h.
|
inline |
Definition at line 323 of file model_based_planning_context.h.
|
inline |
Definition at line 329 of file model_based_planning_context.h.
|
inline |
Definition at line 205 of file model_based_planning_context.h.
|
inline |
Definition at line 193 of file model_based_planning_context.h.
|
inline |
Definition at line 217 of file model_based_planning_context.h.
|
inline |
Definition at line 229 of file model_based_planning_context.h.
|
inline |
Definition at line 181 of file model_based_planning_context.h.
|
inline |
Definition at line 240 of file model_based_planning_context.h.
|
inline |
Definition at line 170 of file model_based_planning_context.h.
|
inline |
Definition at line 165 of file model_based_planning_context.h.
|
inline |
Definition at line 160 of file model_based_planning_context.h.
|
inline |
Definition at line 155 of file model_based_planning_context.h.
|
inline |
Definition at line 150 of file model_based_planning_context.h.
|
inline |
Definition at line 175 of file model_based_planning_context.h.
|
protectedvirtual |
Definition at line 147 of file model_based_planning_context.cpp.
|
inline |
Definition at line 135 of file model_based_planning_context.h.
bool ompl_interface::ModelBasedPlanningContext::getSolutionPath | ( | robot_trajectory::RobotTrajectory & | traj | ) | const |
Definition at line 447 of file model_based_planning_context.cpp.
|
inline |
Definition at line 120 of file model_based_planning_context.h.
|
inline |
Definition at line 125 of file model_based_planning_context.h.
void ompl_interface::ModelBasedPlanningContext::interpolateSolution | ( | ) |
Definition at line 408 of file model_based_planning_context.cpp.
bool ompl_interface::ModelBasedPlanningContext::loadConstraintApproximations | ( | const ros::NodeHandle & | nh | ) |
Look up param server 'constraint_approximations' and use its value as the path to load constraint approximations to.
Definition at line 881 of file model_based_planning_context.cpp.
|
protected |
Definition at line 662 of file model_based_planning_context.cpp.
|
protected |
Definition at line 651 of file model_based_planning_context.cpp.
|
protected |
Definition at line 801 of file model_based_planning_context.cpp.
bool ompl_interface::ModelBasedPlanningContext::saveConstraintApproximations | ( | const ros::NodeHandle & | nh | ) |
Look up param server 'constraint_approximations' and use its value as the path to save constraint approximations to.
Definition at line 869 of file model_based_planning_context.cpp.
void ompl_interface::ModelBasedPlanningContext::setCompleteInitialState | ( | const moveit::core::RobotState & | complete_initial_robot_state | ) |
Definition at line 544 of file model_based_planning_context.cpp.
|
inline |
Definition at line 256 of file model_based_planning_context.h.
|
inline |
Definition at line 273 of file model_based_planning_context.h.
bool ompl_interface::ModelBasedPlanningContext::setGoalConstraints | ( | const std::vector< moveit_msgs::Constraints > & | goal_constraints, |
const moveit_msgs::Constraints & | path_constraints, | ||
moveit_msgs::MoveItErrorCodes * | error | ||
) |
Definition at line 584 of file model_based_planning_context.cpp.
|
inline |
Definition at line 303 of file model_based_planning_context.h.
|
inline |
Definition at line 298 of file model_based_planning_context.h.
|
inline |
Definition at line 211 of file model_based_planning_context.h.
|
inline |
Definition at line 199 of file model_based_planning_context.h.
|
inline |
Definition at line 223 of file model_based_planning_context.h.
|
inline |
Definition at line 235 of file model_based_planning_context.h.
|
inline |
Definition at line 187 of file model_based_planning_context.h.
|
inline |
Get the minimum number of waypoints along the solution path.
Definition at line 246 of file model_based_planning_context.h.
bool ompl_interface::ModelBasedPlanningContext::setPathConstraints | ( | const moveit_msgs::Constraints & | path_constraints, |
moveit_msgs::MoveItErrorCodes * | error | ||
) |
Definition at line 573 of file model_based_planning_context.cpp.
void ompl_interface::ModelBasedPlanningContext::setPlanningVolume | ( | const moveit_msgs::WorkspaceParameters & | wparams | ) |
Definition at line 381 of file model_based_planning_context.cpp.
void ompl_interface::ModelBasedPlanningContext::setProjectionEvaluator | ( | const std::string & | peval | ) |
Definition at line 134 of file model_based_planning_context.cpp.
|
inline |
Definition at line 130 of file model_based_planning_context.h.
void ompl_interface::ModelBasedPlanningContext::setVerboseStateValidityChecks | ( | bool | flag | ) |
Definition at line 455 of file model_based_planning_context.cpp.
void ompl_interface::ModelBasedPlanningContext::simplifySolution | ( | double | timeout | ) |
Definition at line 398 of file model_based_planning_context.cpp.
|
inline |
Definition at line 288 of file model_based_planning_context.h.
|
inline |
Definition at line 293 of file model_based_planning_context.h.
const moveit_msgs::MoveItErrorCodes ompl_interface::ModelBasedPlanningContext::solve | ( | double | timeout, |
unsigned int | count | ||
) |
Definition at line 749 of file model_based_planning_context.cpp.
|
overridevirtual |
Implements planning_interface::PlanningContext.
Definition at line 701 of file model_based_planning_context.cpp.
|
overridevirtual |
Implements planning_interface::PlanningContext.
Definition at line 670 of file model_based_planning_context.cpp.
|
protected |
Definition at line 631 of file model_based_planning_context.cpp.
|
protected |
Definition at line 641 of file model_based_planning_context.cpp.
|
overridevirtual |
Implements planning_interface::PlanningContext.
Definition at line 861 of file model_based_planning_context.cpp.
|
protected |
Definition at line 807 of file model_based_planning_context.cpp.
|
protectedvirtual |
Definition at line 249 of file model_based_planning_context.cpp.
|
protected |
Definition at line 411 of file model_based_planning_context.h.
|
protected |
Definition at line 462 of file model_based_planning_context.h.
|
protected |
Definition at line 426 of file model_based_planning_context.h.
|
protected |
Definition at line 470 of file model_based_planning_context.h.
|
protected |
Definition at line 467 of file model_based_planning_context.h.
|
protected |
the time spent computing the last plan
Definition at line 432 of file model_based_planning_context.h.
|
protected |
the time spent simplifying the last plan
Definition at line 435 of file model_based_planning_context.h.
|
protected |
maximum number of valid states to store in the goal region for any planning request (when such sampling is possible)
Definition at line 439 of file model_based_planning_context.h.
|
protected |
maximum number of attempts to be made at sampling a goal states
Definition at line 446 of file model_based_planning_context.h.
|
protected |
when planning in parallel, this is the maximum number of threads to use at one time
Definition at line 449 of file model_based_planning_context.h.
|
protected |
the maximum length that is allowed for segments that make up the motion plan; by default this is 1% from the extent of the space
Definition at line 453 of file model_based_planning_context.h.
|
protected |
maximum number of attempts to be made at sampling a state when attempting to find valid states that satisfy some set of constraints
Definition at line 443 of file model_based_planning_context.h.
|
protected |
the minimum number of points to include on the solution path (interpolation is used to reach this number, if needed)
Definition at line 457 of file model_based_planning_context.h.
|
protected |
when false, clears planners before running solve()
Definition at line 460 of file model_based_planning_context.h.
|
protected |
the OMPL tool for benchmarking planners
Definition at line 417 of file model_based_planning_context.h.
|
protected |
tool used to compute multiple plans in parallel; this uses the problem definition maintained by ompl_simple_setup_
Definition at line 420 of file model_based_planning_context.h.
|
protected |
the OMPL planning context; this contains the problem definition and the planner used
Definition at line 414 of file model_based_planning_context.h.
|
protected |
Definition at line 424 of file model_based_planning_context.h.
|
protected |
Definition at line 425 of file model_based_planning_context.h.
|
protected |
Definition at line 428 of file model_based_planning_context.h.
|
protected |
Definition at line 429 of file model_based_planning_context.h.
|
protected |
Definition at line 464 of file model_based_planning_context.h.
|
protected |
Definition at line 422 of file model_based_planning_context.h.
|
protected |
Definition at line 409 of file model_based_planning_context.h.