libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
HRICS_Navigation.hpp
1 //
2 // HRICS_Navigation.hpp
3 // libmove3d-motion
4 //
5 // Created by Jim Mainprice on 23/04/12.
6 // Copyright (c) 2012 LAAS-CNRS. All rights reserved.
7 //
8 
9 #ifndef libmove3d_motion_HRICS_Navigation_hpp
10 #define libmove3d_motion_HRICS_Navigation_hpp
11 
12 #include "API/Trajectory/trajectory.hpp"
13 
14 #include "Grid/HRICS_Grid.hpp"
15 #include "Grid/HRICS_TwoDGrid.hpp"
16 
17 #include <Eigen/StdVector>
18 
19 
20 
25 namespace HRICS
26 {
27  class Navigation
28  {
29  public:
30  Navigation(Robot* R);
31  ~Navigation();
32 
33  Robot* getRobot() { return m_robot; }
34 
35  API::Trajectory* computeRobotTrajectory( confPtr_t source, confPtr_t target );
36  API::Trajectory* getSimplePath(std::vector<double> goal, std::vector<std::vector<double> >& path);
37 
38  void reset();
39  void draw();
40  double pathCost();
41  void allow_smoothing(bool state);
42 
43  private:
44  bool init();
45  bool computeAStarIn2DGrid( Eigen::Vector2d source, Eigen::Vector2d target );
46  bool solveAStar(PlanState* start,PlanState* goal);
47 
48 
49  std::vector<double> m_envSize;
50 
51  Robot* m_robot;
52  Robot* m_cyl;
53 
54  double m_maxRadius;
55 
56  PlanGrid* m_2DGrid;
57  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > m_2DPath;
58  std::vector<API::TwoDCell*> m_2DCellPath;
59  };
60 }
61 
62 #endif
void draw()
Draws the 3D path as a yellow line.
Definition: HRICS_Navigation.cpp:234
Definition: HRICS_Navigation.hpp:27
Plannar HRI State.
Definition: HRICS_TwoDGrid.hpp:77
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Definition: trajectory.hpp:40
API::Trajectory * computeRobotTrajectory(confPtr_t source, confPtr_t target)
Computes a trajectory.
Definition: HRICS_Navigation.cpp:87
Plannar HRI Grid.
Definition: HRICS_TwoDGrid.hpp:13
Navigation(Robot *R)
Take as input a robot and a human and performs init.
Definition: HRICS_Navigation.cpp:31