15 #include <ompl/geometric/SimpleSetup.h> 
   16 #include <ompl/geometric/planners/rrt/RRTConnect.h> 
   20 int main(
int argc, 
char **argv)
 
   22     auto world = std::make_shared<darts::World>();
 
   25                                          "package://fetch_description/robots/fetch.urdf",  
 
   26                                          "package://fetch_moveit_config/config/fetch.srdf");
 
   28     world->addRobot(fetch1);
 
   32         nfetch = atoi(argv[1]);
 
   36         auto fetch2 = fetch1->cloneRobot(
"fetch2");
 
   37         fetch2->setDof(2, -1.57);
 
   38         fetch2->setDof(3, 0.525);
 
   39         fetch2->setDof(4, 0.525);
 
   40         world->addRobot(fetch2);
 
   45         auto fetch3 = fetch1->cloneRobot(
"fetch3");
 
   46         fetch3->setDof(2, 1.57);
 
   47         fetch3->setDof(3, 0.525);
 
   48         fetch3->setDof(4, -0.525);
 
   49         world->addRobot(fetch3);
 
   54         auto fetch4 = fetch1->cloneRobot(
"fetch4");
 
   55         fetch4->setDof(2, 3.14);
 
   56         fetch4->setDof(3, 1.05);
 
   57         world->addRobot(fetch4);
 
   63         builder.
addGroup(
"fetch1", 
"arm_with_torso");
 
   65             builder.
addGroup(
"fetch2", 
"arm_with_torso");
 
   67             builder.
addGroup(
"fetch3", 
"arm_with_torso");
 
   69             builder.
addGroup(
"fetch4", 
"arm_with_torso");
 
   72             0.05, 1.32, 1.40, -0.2, 1.72, 0.0, 1.66, 0.0,  
 
   73             0.05, 1.32, 1.40, -0.2, 1.72, 0.0, 1.66, 0.0,  
 
   74             0.05, 1.32, 1.40, -0.2, 1.72, 0.0, 1.66, 0.0,  
 
   75             0.05, 1.32, 1.40, -0.2, 1.72, 0.0, 1.66, 0.0,
 
   81             0.0,  0.501, 1.281, -2.272, 2.243, -2.774, 0.976, -2.007,
 
   82             0.13, 0.501, 1.281, -2.272, 2.243, -2.774, 0.976, -2.007,  
 
   83             0.38, 0.501, 1.281, -2.272, 2.243, -2.774, 0.976, -2.007,  
 
   84             0.26, 0.501, 1.281, -2.272, 2.243, -2.774, 0.976, -2.007,  
 
   88         auto rrt = std::make_shared<ompl::geometric::RRTConnect>(builder.
info, 
true);
 
   90         builder.
ss->setPlanner(rrt);
 
   95         ompl::base::PlannerStatus solved = builder.
ss->solve(30.0);
 
A helper class to setup common OMPL structures for planning.
 
void setGoal(const ompl::base::GoalPtr &goal)
Set the goal for the problem.
 
void setup()
Calls setup routines on OMPL structures. Call after all setup is done and builder is initialized.
 
void setStartConfiguration(const Eigen::Ref< const Eigen::VectorXd > &q)
Set the start configuration from a configuration.
 
void initialize()
Initialize OMPL structures. Only call this once all constraints, groups, and other parameters have be...
 
ompl::base::SpaceInformationPtr info
Actual Space Information.
 
ompl::geometric::PathGeometric getSolutionPath(bool simplify=true, bool interpolate=true) const
Get the solution path from a successful plan.
 
ompl::geometric::SimpleSetupPtr ss
Simple Setup.
 
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.
 
std::shared_ptr< ompl::base::GoalStates > getGoalConfiguration(const Eigen::Ref< const Eigen::VectorXd > &q)
Set the goal configuration from a configuration.
 
Open Scene Graph GUI for DART visualization.
 
void run(std::function< void()> thread={})
Run the GUI. Blocks.
 
void animatePath(const StateSpacePtr &space, const ompl::geometric::PathGeometric &path, std::size_t times=1, double fps=60, bool block=true)
Animate a motion plan using the world.
 
int main(int argc, char **argv)
 
#define RBX_WARN(fmt,...)
Output a warning logging message.
 
#define RBX_INFO(fmt,...)
Output a info logging message.
 
RobotPtr loadMoveItRobot(const std::string &name, const std::string &urdf, const std::string &srdf)
Load a robot from a URDF and SRDF (i.e., a MoveIt enabled robot).
 
Main namespace. Contains all library classes and functions.