|
Robowflex
v0.1
Making MoveIt Easy
|
A helper class to setup common OMPL structures for planning. More...
#include <planning.h>
Inheritance diagram for robowflex::darts::PlanBuilder:Public Member Functions | |
Setup and Initialization. | |
| PlanBuilder (WorldPtr world) | |
| Constructor. More... | |
| void | initialize () |
| Initialize OMPL structures. Only call this once all constraints, groups, and other parameters have been set for the builder. More... | |
| void | setup () |
| Calls setup routines on OMPL structures. Call after all setup is done and builder is initialized. More... | |
MoveIt Planning Messages | |
| void | getWorkspaceBoundsFromMessage (const moveit_msgs::MotionPlanRequest &msg) |
| Get workspace bounds from a planning request. More... | |
| void | getGroupFromMessage (const std::string &robot_name, const moveit_msgs::MotionPlanRequest &msg) |
| Set group for planning from message. More... | |
| void | getStartFromMessage (const std::string &robot_name, const moveit_msgs::MotionPlanRequest &msg) |
| Get the start state from the request message. More... | |
| void | getPathConstraintsFromMessage (const std::string &robot_name, const moveit_msgs::MotionPlanRequest &msg) |
| Get the set of path constraints from the request message. More... | |
| ompl::base::GoalPtr | getGoalFromMessage (const std::string &robot_name, const moveit_msgs::MotionPlanRequest &msg) |
| Get the goal constraints from the planning request message. More... | |
| TSRPtr | fromPositionConstraint (const std::string &robot_name, const moveit_msgs::PositionConstraint &msg) const |
| Get a TSR from an position constraint. More... | |
| TSRPtr | fromOrientationConstraint (const std::string &robot_name, const moveit_msgs::OrientationConstraint &msg) const |
| Get a TSR from an orientation constraint. More... | |
| JointRegionGoalPtr | fromJointConstraints (const std::vector< moveit_msgs::JointConstraint > &msgs) const |
| Get a joint region goal from a message. More... | |
| ompl::base::GoalPtr | fromMessage (const std::string &robot_name, const moveit_msgs::MotionPlanRequest &msg) |
| Use all of the planning request message to setup motion planning. More... | |
Other Settings | |
| void | addGroup (const std::string &robot, const std::string &name, std::size_t cyclic=0) |
| Add a robot's planning group to the controlled DoF in the state space. More... | |
| void | addConstraint (const TSRPtr &tsr) |
| Adds a TSR as a path constraint to the problem. More... | |
Start Configuration | |
| void | setStartConfigurationFromWorld () |
| Set the start configuration from the current state of the world. More... | |
| void | setStartConfiguration (const Eigen::Ref< const Eigen::VectorXd > &q) |
| Set the start configuration from a configuration. More... | |
| void | setStartConfiguration (const std::vector< double > &q) |
| Set the start configuration from a configuration. More... | |
| void | sampleStartConfiguration () |
| Sample a valid start configuration. More... | |
Goals | |
| std::shared_ptr< ompl::base::GoalStates > | getGoalConfigurationFromWorld () |
| Set the goal configuration from the current state of the world. More... | |
| std::shared_ptr< ompl::base::GoalStates > | getGoalConfiguration (const Eigen::Ref< const Eigen::VectorXd > &q) |
| Set the goal configuration from a configuration. More... | |
| std::shared_ptr< ompl::base::GoalStates > | getGoalConfiguration (const std::vector< double > &q) |
| Set the goal configuration from a configuration. More... | |
| TSRGoalPtr | getGoalTSR (const TSRPtr &tsr) |
| Set a TSR as the goal for the planning problem (will create a TSRGoal) More... | |
| TSRGoalPtr | getGoalTSR (const std::vector< TSRPtr > &tsrs) |
| Set a set of TSRs as the goal for the planning problem (will create a TSRGoal) More... | |
| std::shared_ptr< ompl::base::GoalStates > | sampleGoalConfiguration () |
| Sample a valid goal configuration. More... | |
| void | setGoal (const ompl::base::GoalPtr &goal) |
| Set the goal for the problem. More... | |
Other Functions | |
| ompl::base::State * | sampleState () const |
| Sample a valid state. More... | |
| ompl::geometric::PathGeometric | getSolutionPath (bool simplify=true, bool interpolate=true) const |
| Get the solution path from a successful plan. More... | |
Public Member Functions inherited from robowflex::darts::ConstraintExtractor | |
| ConstraintExtractor ()=default | |
| Constructor. More... | |
| ConstraintExtractor (const ompl::base::SpaceInformationPtr &si) | |
| Constructor. More... | |
| const StateSpace * | getSpace () const |
| Gets the underlying state space from the space information. More... | |
| void | setSpaceInformation (const ompl::base::SpaceInformationPtr &si) |
| Set space information used for constraint extraction. More... | |
| StateSpace::StateType * | toState (ompl::base::State *state) const |
| Extract underlying state from a base state. More... | |
| const StateSpace::StateType * | toStateConst (const ompl::base::State *state) const |
| Extract underlying state from a base state. More... | |
| StateSpace::StateType * | fromConstrainedState (ompl::base::State *state) const |
| Access the underlying state from a constrained OMPL state. More... | |
| const StateSpace::StateType * | fromConstrainedStateConst (const ompl::base::State *state) const |
| Access the underlying state from a constrained OMPL state. More... | |
| StateSpace::StateType * | fromUnconstrainedState (ompl::base::State *state) const |
| Access the underlying state from an unconstrained OMPL state. More... | |
| const StateSpace::StateType * | fromUnconstrainedStateConst (const ompl::base::State *state) const |
| Access the underlying state from an unconstrained OMPL state. More... | |
Public Attributes | |
| StateSpacePtr | rspace {nullptr} |
| Underlying Robot State Space. More... | |
| ompl::base::StateSpacePtr | space {nullptr} |
| Actual OMPL State Space (might be constrained). More... | |
| ompl::base::SpaceInformationPtr | rinfo {nullptr} |
| Underlying Space Information. More... | |
| ompl::base::SpaceInformationPtr | info {nullptr} |
| Actual Space Information. More... | |
| ompl::geometric::SimpleSetupPtr | ss {nullptr} |
| Simple Setup. More... | |
| WorldPtr | world |
| World used for planning. More... | |
| std::vector< TSRPtr > | path_constraints |
| Path Constraints. More... | |
| TSRConstraintPtr | constraint {nullptr} |
| OMPL Constraint for Path Constraints. More... | |
| Eigen::VectorXd | start |
| Start configuration. More... | |
| struct { | |
| struct { | |
| double delta {0.2} | |
| Manifold delta. More... | |
| double lambda {5.0} | |
| Manifold lambda. More... | |
| } constraints | |
| Constrained planning options. More... | |
| } | options |
| Hyperparameter options. More... | |
Protected Member Functions | |
| void | initializeConstrained () |
| Initialize when path constraints are present. More... | |
| void | initializeUnconstrained () |
| Initialize when no path constraints are present. More... | |
| void | setStateValidityChecker () |
| Set the state validity checker on the simple setup. More... | |
| ompl::base::StateValidityCheckerFn | getSVCUnconstrained () |
| Get a state validity checker for the unconstrained space. More... | |
| ompl::base::StateValidityCheckerFn | getSVCConstrained () |
| Get a state validity checker for the unconstrained space. More... | |
Protected Attributes | |
| ompl::base::GoalPtr | goal_ {nullptr} |
| Desired goal. More... | |
A helper class to setup common OMPL structures for planning.
Definition at line 221 of file robowflex_dart/include/robowflex_dart/planning.h.
| PlanBuilder::PlanBuilder | ( | WorldPtr | world | ) |
Constructor.
| [in] | world | World to use for planning. |
Definition at line 243 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::addConstraint | ( | const TSRPtr & | tsr | ) |
Adds a TSR as a path constraint to the problem.
| [in] | tsr | Path constraint. |
Definition at line 408 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::addGroup | ( | const std::string & | robot, |
| const std::string & | name, | ||
| std::size_t | cyclic = 0 |
||
| ) |
Add a robot's planning group to the controlled DoF in the state space.
| [in] | robot | Name of the robot. |
| [in] | name | Name of the group in the robot to add. |
| [in] | cyclic | If > 0, if the group contains cyclic joints (SO(2), SO(3)) these will be modeled as Rn. |
Definition at line 403 of file robowflex_dart/src/planning.cpp.
| JointRegionGoalPtr PlanBuilder::fromJointConstraints | ( | const std::vector< moveit_msgs::JointConstraint > & | msgs | ) | const |
Get a joint region goal from a message.
| [in] | msgs | Joint constraint messages to create region goal. |
Definition at line 287 of file robowflex_dart/src/planning.cpp.
| ompl::base::GoalPtr PlanBuilder::fromMessage | ( | const std::string & | robot_name, |
| const moveit_msgs::MotionPlanRequest & | msg | ||
| ) |
Use all of the planning request message to setup motion planning.
| [in] | robot_name | Robot name to use message on. |
| [in] | msg | Planning request message. |
Definition at line 388 of file robowflex_dart/src/planning.cpp.
| TSRPtr PlanBuilder::fromOrientationConstraint | ( | const std::string & | robot_name, |
| const moveit_msgs::OrientationConstraint & | msg | ||
| ) | const |
Get a TSR from an orientation constraint.
| [in] | robot_name | Robot name to use message on. |
| [in] | msg | Orientation constraint. |
Definition at line 346 of file robowflex_dart/src/planning.cpp.
| TSRPtr PlanBuilder::fromPositionConstraint | ( | const std::string & | robot_name, |
| const moveit_msgs::PositionConstraint & | msg | ||
| ) | const |
Get a TSR from an position constraint.
| [in] | robot_name | Robot name to use message on. |
| [in] | msg | Position constraint. |
Definition at line 303 of file robowflex_dart/src/planning.cpp.
| std::shared_ptr< ompl::base::GoalStates > PlanBuilder::getGoalConfiguration | ( | const Eigen::Ref< const Eigen::VectorXd > & | q | ) |
Set the goal configuration from a configuration.
| [in] | q | Configuration. |
Definition at line 447 of file robowflex_dart/src/planning.cpp.
| std::shared_ptr< ompl::base::GoalStates > PlanBuilder::getGoalConfiguration | ( | const std::vector< double > & | q | ) |
Set the goal configuration from a configuration.
| [in] | q | Configuration. |
Definition at line 461 of file robowflex_dart/src/planning.cpp.
| std::shared_ptr< ompl::base::GoalStates > PlanBuilder::getGoalConfigurationFromWorld | ( | ) |
Set the goal configuration from the current state of the world.
Definition at line 439 of file robowflex_dart/src/planning.cpp.
| ompl::base::GoalPtr PlanBuilder::getGoalFromMessage | ( | const std::string & | robot_name, |
| const moveit_msgs::MotionPlanRequest & | msg | ||
| ) |
Get the goal constraints from the planning request message.
| [in] | robot_name | Robot name to use message on. |
| [in] | msg | Planning request message. |
Definition at line 372 of file robowflex_dart/src/planning.cpp.
| TSRGoalPtr PlanBuilder::getGoalTSR | ( | const std::vector< TSRPtr > & | tsrs | ) |
Set a set of TSRs as the goal for the planning problem (will create a TSRGoal)
| [in] | tsrs | TSRs for the goal. |
Definition at line 471 of file robowflex_dart/src/planning.cpp.
| TSRGoalPtr PlanBuilder::getGoalTSR | ( | const TSRPtr & | tsr | ) |
Set a TSR as the goal for the planning problem (will create a TSRGoal)
| [in] | tsr | TSR for the goal. |
Definition at line 466 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::getGroupFromMessage | ( | const std::string & | robot_name, |
| const moveit_msgs::MotionPlanRequest & | msg | ||
| ) |
Set group for planning from message.
| [in] | robot_name | Robot name to use message on. |
| [in] | msg | Planning request message. |
Definition at line 260 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::getPathConstraintsFromMessage | ( | const std::string & | robot_name, |
| const moveit_msgs::MotionPlanRequest & | msg | ||
| ) |
Get the set of path constraints from the request message.
| [in] | robot_name | Robot name to use message on. |
| [in] | msg | Planning request message. |
Definition at line 363 of file robowflex_dart/src/planning.cpp.
| ompl::geometric::PathGeometric PlanBuilder::getSolutionPath | ( | bool | simplify = true, |
| bool | interpolate = true |
||
| ) | const |
Get the solution path from a successful plan.
| [in] | simplify | Simplify the solution. |
| [in] | interpolate | Interpolate the solution. |
Definition at line 623 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::getStartFromMessage | ( | const std::string & | robot_name, |
| const moveit_msgs::MotionPlanRequest & | msg | ||
| ) |
Get the start state from the request message.
| [in] | robot_name | Robot name to use message on. |
| [in] | msg | Planning request message. |
Definition at line 271 of file robowflex_dart/src/planning.cpp.
|
protected |
Get a state validity checker for the unconstrained space.
Definition at line 610 of file robowflex_dart/src/planning.cpp.
|
protected |
Get a state validity checker for the unconstrained space.
Definition at line 597 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::getWorkspaceBoundsFromMessage | ( | const moveit_msgs::MotionPlanRequest & | msg | ) |
Get workspace bounds from a planning request.
| [in] | msg | Planning request message. |
Definition at line 247 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::initialize | ( | ) |
Initialize OMPL structures. Only call this once all constraints, groups, and other parameters have been set for the builder.
Definition at line 501 of file robowflex_dart/src/planning.cpp.
|
protected |
Initialize when path constraints are present.
Definition at line 523 of file robowflex_dart/src/planning.cpp.
|
protected |
Initialize when no path constraints are present.
Definition at line 544 of file robowflex_dart/src/planning.cpp.
| std::shared_ptr< ompl::base::GoalStates > PlanBuilder::sampleGoalConfiguration | ( | ) |
Sample a valid goal configuration.
Definition at line 479 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::sampleStartConfiguration | ( | ) |
Sample a valid start configuration.
Definition at line 429 of file robowflex_dart/src/planning.cpp.
| ompl::base::State * PlanBuilder::sampleState | ( | ) | const |
Sample a valid state.
Definition at line 553 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::setGoal | ( | const ompl::base::GoalPtr & | goal | ) |
Set the goal for the problem.
| [in] | goal | Goal to use. |
Definition at line 493 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::setStartConfiguration | ( | const Eigen::Ref< const Eigen::VectorXd > & | q | ) |
Set the start configuration from a configuration.
| [in] | q | Configuration. |
Definition at line 419 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::setStartConfiguration | ( | const std::vector< double > & | q | ) |
Set the start configuration from a configuration.
| [in] | q | Configuration. |
Definition at line 424 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::setStartConfigurationFromWorld | ( | ) |
|
protected |
Set the state validity checker on the simple setup.
Definition at line 580 of file robowflex_dart/src/planning.cpp.
| void PlanBuilder::setup | ( | ) |
Calls setup routines on OMPL structures. Call after all setup is done and builder is initialized.
Definition at line 511 of file robowflex_dart/src/planning.cpp.
| TSRConstraintPtr robowflex::darts::PlanBuilder::constraint {nullptr} |
OMPL Constraint for Path Constraints.
Definition at line 415 of file robowflex_dart/include/robowflex_dart/planning.h.
| struct { ... } robowflex::darts::PlanBuilder::constraints |
Constrained planning options.
| double robowflex::darts::PlanBuilder::delta {0.2} |
Manifold delta.
Definition at line 427 of file robowflex_dart/include/robowflex_dart/planning.h.
|
protected |
Desired goal.
Definition at line 433 of file robowflex_dart/include/robowflex_dart/planning.h.
| ompl::base::SpaceInformationPtr robowflex::darts::PlanBuilder::info {nullptr} |
Actual Space Information.
Definition at line 410 of file robowflex_dart/include/robowflex_dart/planning.h.
| double robowflex::darts::PlanBuilder::lambda {5.0} |
Manifold lambda.
Definition at line 428 of file robowflex_dart/include/robowflex_dart/planning.h.
| struct { ... } robowflex::darts::PlanBuilder::options |
Hyperparameter options.
| std::vector<TSRPtr> robowflex::darts::PlanBuilder::path_constraints |
Path Constraints.
Definition at line 414 of file robowflex_dart/include/robowflex_dart/planning.h.
| ompl::base::SpaceInformationPtr robowflex::darts::PlanBuilder::rinfo {nullptr} |
Underlying Space Information.
Definition at line 409 of file robowflex_dart/include/robowflex_dart/planning.h.
| StateSpacePtr robowflex::darts::PlanBuilder::rspace {nullptr} |
Underlying Robot State Space.
Definition at line 407 of file robowflex_dart/include/robowflex_dart/planning.h.
| ompl::base::StateSpacePtr robowflex::darts::PlanBuilder::space {nullptr} |
Actual OMPL State Space (might be constrained).
Definition at line 408 of file robowflex_dart/include/robowflex_dart/planning.h.
| ompl::geometric::SimpleSetupPtr robowflex::darts::PlanBuilder::ss {nullptr} |
Simple Setup.
Definition at line 411 of file robowflex_dart/include/robowflex_dart/planning.h.
| Eigen::VectorXd robowflex::darts::PlanBuilder::start |
Start configuration.
Definition at line 417 of file robowflex_dart/include/robowflex_dart/planning.h.
| WorldPtr robowflex::darts::PlanBuilder::world |
World used for planning.
Definition at line 412 of file robowflex_dart/include/robowflex_dart/planning.h.