OMPL
Download
Documentation
Primer
Installation
Tutorials
Demos
OMPL.app GUI
OMPL web app
Python Bindings
Available Planners
Planner Termination Conditions
Benchmarking Planners
Available State Spaces
Optimal Planning
Constrained Planning
Multilevel Planning
FAQ
External links
MoveIt
Planner Arena
ICRA 2013 Tutorial
IROS 2011 Tutorial
Gallery
OMPL Integrations
Code
API Overview
Classes
Files
Style Guide
Repositories
ompl on GitHub
omplapp on GitHub
Continuous Integration
ompl on Travis CI (Linux/macOS)
omplapp on Travis CI (Linux/macOS)
ompl on AppVeyor CI (Windows)
omplapp on AppVeyor CI (Windows)
Issues
Community
Get Support
Developers/Contributors
Submit a Contribution
Education
About
License
Citations
Acknowledgments
Blog
demos
SE2RigidBodyPlanning
SE2RigidBodyPlanning.cpp
1
/*********************************************************************
2
* Rice University Software Distribution License
3
*
4
* Copyright (c) 2010, Rice University
5
* All Rights Reserved.
6
*
7
* For a full description see the file named LICENSE.
8
*
9
*********************************************************************/
10
11
/* Author: Ioan Sucan */
12
13
#include <omplapp/apps/SE2RigidBodyPlanning.h>
14
#include <omplapp/config.h>
15
16
using namespace
ompl
;
17
18
int
main()
19
{
20
// plan in SE2
21
app::SE2RigidBodyPlanning
setup;
22
23
// load the robot and the environment
24
std::string robot_fname = std::string(OMPLAPP_RESOURCE_DIR) +
"/2D/car1_planar_robot.dae"
;
25
std::string env_fname = std::string(OMPLAPP_RESOURCE_DIR) +
"/2D/Maze_planar_env.dae"
;
26
setup.setRobotMesh(robot_fname);
27
setup.setEnvironmentMesh(env_fname);
28
29
// define starting state
30
base::ScopedState<base::SE2StateSpace>
start(setup.getSpaceInformation());
31
start->setX(0.0);
32
start->setY(0.0);
33
34
// define goal state
35
base::ScopedState<base::SE2StateSpace>
goal(start);
36
goal->setX(26.0);
37
goal->setY(0.0);
38
39
// set the start & goal states
40
setup.setStartAndGoalStates(start, goal);
41
42
// attempt to solve the problem, and print it to screen if a solution is found
43
if
(setup.solve())
44
setup.getSolutionPath().print(std::cout);
45
46
return
0;
47
}
ompl::base::ScopedState
Definition of a scoped state.
Definition:
ScopedState.h:120
ompl::app::SE2RigidBodyPlanning
Wrapper for ompl::app::RigidBodyPlanning that plans for rigid bodies in SE2.
Definition:
SE2RigidBodyPlanning.h:43
ompl
Main namespace. Contains everything in this library.
Definition:
AppBase.h:21