Corentin Chauvin-Hameau – 2019-2020
Coverage Path Planning for an underwater robot surveying a marine farm
lattice.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  *
4  * \brief Declaration of useful classes for planning with lattices
5  * \author Corentin Chauvin-Hameau
6  * \date 2020
7  *
8  * In our case, a lattice is a set of viewpoints corresponding to one step of
9  * the planning. Several lattices can be generated to plan several steps ahead.
10  */
11 
12 #ifndef LATTICE_HPP
13 #define LATTICE_HPP
14 
15 #include <geometry_msgs/Pose.h>
16 #include <vector>
17 
18 
19 namespace mfcpp {
20 
21 /**
22  * \brief Class to represent a node (viewpoint) of a lattice
23  */
25 {
26  public:
27  geometry_msgs::Pose pose; ///< Pose of the node in robot frame
28  float speed; ///< Longitudinal speed of the robot at this node
29  std::vector<std::shared_ptr<LatticeNode>> next; ///< Nodes in the next lattice that can be reached from this node
30 
31  float info_gain; ///< Information gain fo this viewpoint
32  std::vector<float> gp_cov; ///< Diagonal of the covariance of the Gaussian Process
33  std::vector<float> camera_pts_x; ///< X coord of camera hit pts for the viewpoint (in ocean frame)
34  std::vector<float> camera_pts_y; ///< Y coord of camera hit pts for the viewpoint (in ocean frame)
35  std::vector<float> camera_pts_z; ///< Z coord of camera hit pts for the viewpoint (in ocean frame)
36 
38  next.resize(0);
39  info_gain = 0;
40  gp_cov.resize(0);
41  camera_pts_x.resize(0);
42  camera_pts_y.resize(0);
43  camera_pts_z.resize(0);
44  }
45 
47 
48  }
49 };
50 
51 /**
52  * \brief Class to represent a lattice
53  */
54 class Lattice
55 {
56  public:
57  std::vector<std::shared_ptr<LatticeNode>> nodes; ///< Nodes of the lattice
58 
59  Lattice() {
60  nodes.resize(0);
61  }
62 
64 
65  }
66 };
67 
68 
69 } // namespace mfcpp
70 
71 #endif
float info_gain
Information gain fo this viewpoint.
Definition: lattice.hpp:31
geometry_msgs::Pose pose
Pose of the node in robot frame.
Definition: lattice.hpp:27
Definition: common.hpp:23
std::vector< std::shared_ptr< LatticeNode > > nodes
Nodes of the lattice.
Definition: lattice.hpp:57
std::vector< float > camera_pts_z
Z coord of camera hit pts for the viewpoint (in ocean frame)
Definition: lattice.hpp:35
Class to represent a lattice.
Definition: lattice.hpp:54
std::vector< std::shared_ptr< LatticeNode > > next
Nodes in the next lattice that can be reached from this node.
Definition: lattice.hpp:29
std::vector< float > gp_cov
Diagonal of the covariance of the Gaussian Process.
Definition: lattice.hpp:32
float speed
Longitudinal speed of the robot at this node.
Definition: lattice.hpp:28
std::vector< float > camera_pts_y
Y coord of camera hit pts for the viewpoint (in ocean frame)
Definition: lattice.hpp:34
std::vector< float > camera_pts_x
X coord of camera hit pts for the viewpoint (in ocean frame)
Definition: lattice.hpp:33
Class to represent a node (viewpoint) of a lattice.
Definition: lattice.hpp:24