SE3RigidBodyPlanning.h
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 #ifndef OMPLAPP_SE3_RIGID_BODY_PLANNING_
14 #define OMPLAPP_SE3_RIGID_BODY_PLANNING_
15 
16 #include "omplapp/apps/AppBase.h"
17 #include <ompl/base/spaces/SE3StateSpace.h>
18 
19 namespace ompl
20 {
21  namespace app
22  {
23 
26  class SE3RigidBodyPlanning : public AppBase<AppType::GEOMETRIC>
27  {
28  public:
29 
30  SE3RigidBodyPlanning() : AppBase<AppType::GEOMETRIC>(std::make_shared<base::SE3StateSpace>(), Motion_3D)
31  {
32  name_ = "Rigid body planning (3D)";
33  }
34 
35  ~SE3RigidBodyPlanning() override = default;
36 
37  bool isSelfCollisionEnabled() const override
38  {
39  return false;
40  }
41 
42  base::ScopedState<> getDefaultStartState() const override;
43 
44  base::ScopedState<> getFullStateFromGeometricComponent(const base::ScopedState<> &state) const override
45  {
46  return state;
47  }
48 
49  const base::StateSpacePtr& getGeometricComponentStateSpace() const override
50  {
51  return getStateSpace();
52  }
53 
54  unsigned int getRobotCount() const override
55  {
56  return 1;
57  }
58 
59  protected:
60 
61  const base::State* getGeometricComponentStateInternal(const base::State* state, unsigned int /*index*/) const override
62  {
63  return state;
64  }
65 
66  };
67 
68  }
69 }
70 
71 #endif
const base::StateSpacePtr & getStateSpace() const
Get the current instance of the state space.
Definition: SimpleSetup.h:156
Definition of a scoped state.
Definition: ScopedState.h:120
Main namespace. Contains everything in this library.
Definition: AppBase.h:21