40 #include <mesh_map/MeshMapConfig.h> 42 #include <boost/optional.hpp> 44 #ifndef MESH_MAP__ABSTRACT_LAYER_H 45 #define MESH_MAP__ABSTRACT_LAYER_H 106 virtual std::set<lvr2::VertexHandle>&
lethals() = 0;
113 virtual void updateLethal(std::set<lvr2::VertexHandle>& added_lethal,
114 std::set<lvr2::VertexHandle>& removed_lethal) = 0;
123 const std::array<float, 3>& barycentric_coords)
134 virtual const boost::optional<lvr2::VertexMap<lvr2::BaseVector<float>>&>
vectorMap()
151 virtual bool initialize(
const std::string& name) = 0;
156 virtual bool initialize(
const std::string& name,
const notify_func notify_update,
158 std::shared_ptr<lvr2::AttributeMeshIOBase>& io)
177 std::shared_ptr<lvr2::HalfEdgeMesh<Vector>>
mesh_ptr;
188 #endif // MESH_MAP__ABSTRACT_LAYER_H
virtual float defaultValue()=0
Defines the default value for all vertex costs which are not set in the layer.
virtual lvr2::BaseVector< float > vectorAt(const std::array< lvr2::VertexHandle, 3 > &vertices, const std::array< float, 3 > &barycentric_coords)
Optional method if the layer computes vectors. Computes a vector within a triangle using barycentric ...
virtual bool writeLayer()=0
Writes the layer data, e.g. to a file, or a database.
virtual lvr2::BaseVector< float > vectorAt(const lvr2::VertexHandle &vertex)
Optional method if the layer computes vectors. Computes a vector for a given vertex handle...
lvr2::Normal< float > Normal
use normals with datatype float
virtual float threshold()=0
Defines the threshold value to consider vertices as a "lethal" obstacle. All vertices with cost value...
std::shared_ptr< mesh_map::MeshMap > map_ptr
virtual bool computeLayer()=0
Function which is called to compute the layer costs. It is called if the layer information could not ...
virtual bool readLayer()=0
reads the layer data, e.g. from a file, or a database
boost::shared_ptr< mesh_map::AbstractLayer > Ptr
std::function< void(const std::string &)> notify_func
virtual std::set< lvr2::VertexHandle > & lethals()=0
Returns a set of vertex handles which are associated with "lethal" obstacles.
lvr2::BaseVector< float > Vector
use vectors with datatype folat
virtual bool initialize(const std::string &name, const notify_func notify_update, std::shared_ptr< mesh_map::MeshMap > &map, std::shared_ptr< lvr2::HalfEdgeMesh< Vector >> &mesh, std::shared_ptr< lvr2::AttributeMeshIOBase > &io)
Initializes the layer plugin under the mesh_map namespace ans sets some basic attributes.
virtual void updateLethal(std::set< lvr2::VertexHandle > &added_lethal, std::set< lvr2::VertexHandle > &removed_lethal)=0
Called by the mesh map if another previously processed layer triggers an update.
virtual const boost::optional< lvr2::VertexMap< lvr2::BaseVector< float > > & > vectorMap()
Optional vector map. Can be implemented if the layer should also compute vectors. If the implmented l...
std::shared_ptr< lvr2::HalfEdgeMesh< Vector > > mesh_ptr
std::shared_ptr< lvr2::AttributeMeshIOBase > mesh_io_ptr
ros::NodeHandle private_nh
virtual bool initialize(const std::string &name)=0
Initializes the layer plugin with the giben name.
virtual lvr2::VertexMap< float > & costs()=0
Returns a vertex map, which associates a cost to each vertex handle. If a vertex handle is not associ...