Private Member Functions | Private Attributes | List of all members
mesh_layers::RidgeLayer Class Reference

Costmap layer which assigns high costs to ridges. This is useful for dam avoidance in agricultural applications. More...

#include <ridge_layer.h>

Inheritance diagram for mesh_layers::RidgeLayer:
Inheritance graph
[legend]

Private Member Functions

virtual bool computeLayer ()
 calculate the values of this layer More...
 
bool computeLethals ()
 mark vertices with values above the threshold as lethal More...
 
virtual lvr2::VertexMap< float > & costs ()
 deliver the current costmap More...
 
virtual float defaultValue ()
 delivers the default layer value More...
 
virtual bool initialize (const std::string &name)
 initializes this layer plugin More...
 
virtual std::set< lvr2::VertexHandle > & lethals ()
 deliver set containing all vertices marked as lethal More...
 
virtual bool readLayer ()
 try read layer from map file More...
 
void reconfigureCallback (mesh_layers::RidgeLayerConfig &cfg, uint32_t level)
 callback for incoming reconfigure configs More...
 
virtual float threshold ()
 delivers the threshold above which vertices are marked lethal More...
 
virtual void updateLethal (std::set< lvr2::VertexHandle > &added_lethal, std::set< lvr2::VertexHandle > &removed_lethal)
 update set of lethal vertices by adding and removing vertices More...
 
virtual bool writeLayer ()
 try to write layer to map file More...
 

Private Attributes

RidgeLayerConfig config
 
dynamic_reconfigure::Server< mesh_layers::RidgeLayerConfig >::CallbackType config_callback
 
bool first_config
 
std::set< lvr2::VertexHandlelethal_vertices
 
boost::shared_ptr< dynamic_reconfigure::Server< mesh_layers::RidgeLayerConfig > > reconfigure_server_ptr
 
lvr2::DenseVertexMap< float > ridge
 

Additional Inherited Members

- Public Types inherited from mesh_map::AbstractLayer
typedef boost::shared_ptr< mesh_map::AbstractLayerPtr
 
- Public Member Functions inherited from mesh_map::AbstractLayer
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)
 
void notifyChange ()
 
virtual lvr2::BaseVector< float > vectorAt (const lvr2::VertexHandle &vertex)
 
virtual lvr2::BaseVector< float > vectorAt (const std::array< lvr2::VertexHandle, 3 > &vertices, const std::array< float, 3 > &barycentric_coords)
 
virtual const boost::optional< lvr2::VertexMap< lvr2::BaseVector< float > > & > vectorMap ()
 
- Protected Attributes inherited from mesh_map::AbstractLayer
std::string layer_name
 
std::shared_ptr< mesh_map::MeshMapmap_ptr
 
std::shared_ptr< lvr2::AttributeMeshIOBasemesh_io_ptr
 
std::shared_ptr< lvr2::HalfEdgeMesh< Vector > > mesh_ptr
 
ros::NodeHandle private_nh
 

Detailed Description

Costmap layer which assigns high costs to ridges. This is useful for dam avoidance in agricultural applications.

Definition at line 51 of file ridge_layer.h.

Member Function Documentation

◆ computeLayer()

bool mesh_layers::RidgeLayer::computeLayer ( )
privatevirtual

calculate the values of this layer

Returns
true if successfull; else false

Implements mesh_map::AbstractLayer.

Definition at line 96 of file ridge_layer.cpp.

◆ computeLethals()

bool mesh_layers::RidgeLayer::computeLethals ( )
private

mark vertices with values above the threshold as lethal

Returns
true if successfull; else false

Definition at line 78 of file ridge_layer.cpp.

◆ costs()

lvr2::VertexMap< float > & mesh_layers::RidgeLayer::costs ( )
privatevirtual

deliver the current costmap

Returns
calculated costmap

Implements mesh_map::AbstractLayer.

Definition at line 182 of file ridge_layer.cpp.

◆ defaultValue()

virtual float mesh_layers::RidgeLayer::defaultValue ( )
inlineprivatevirtual

delivers the default layer value

Returns
default value used for this layer

Implements mesh_map::AbstractLayer.

Definition at line 79 of file ridge_layer.h.

◆ initialize()

bool mesh_layers::RidgeLayer::initialize ( const std::string &  name)
privatevirtual

initializes this layer plugin

Parameters
namename of this plugin
Returns
true if initialization was successfull; else false

Implements mesh_map::AbstractLayer.

Definition at line 217 of file ridge_layer.cpp.

◆ lethals()

virtual std::set<lvr2::VertexHandle>& mesh_layers::RidgeLayer::lethals ( )
inlineprivatevirtual

deliver set containing all vertices marked as lethal

Returns
lethal vertices

Implements mesh_map::AbstractLayer.

Definition at line 110 of file ridge_layer.h.

◆ readLayer()

bool mesh_layers::RidgeLayer::readLayer ( )
privatevirtual

try read layer from map file

Returns
true if successul; else false

Implements mesh_map::AbstractLayer.

Definition at line 50 of file ridge_layer.cpp.

◆ reconfigureCallback()

void mesh_layers::RidgeLayer::reconfigureCallback ( mesh_layers::RidgeLayerConfig &  cfg,
uint32_t  level 
)
private

callback for incoming reconfigure configs

Parameters
cfgnew config
levellevel

Definition at line 187 of file ridge_layer.cpp.

◆ threshold()

float mesh_layers::RidgeLayer::threshold ( )
privatevirtual

delivers the threshold above which vertices are marked lethal

Returns
lethal threshold

Implements mesh_map::AbstractLayer.

Definition at line 91 of file ridge_layer.cpp.

◆ updateLethal()

virtual void mesh_layers::RidgeLayer::updateLethal ( std::set< lvr2::VertexHandle > &  added_lethal,
std::set< lvr2::VertexHandle > &  removed_lethal 
)
inlineprivatevirtual

update set of lethal vertices by adding and removing vertices

Parameters
added_lethalvertices to be marked as lethal
removed_lethalvertices to be removed from the set of lethal vertices

Implements mesh_map::AbstractLayer.

Definition at line 121 of file ridge_layer.h.

◆ writeLayer()

bool mesh_layers::RidgeLayer::writeLayer ( )
privatevirtual

try to write layer to map file

Returns
true if successfull; else false

Implements mesh_map::AbstractLayer.

Definition at line 64 of file ridge_layer.cpp.

Member Data Documentation

◆ config

RidgeLayerConfig mesh_layers::RidgeLayer::config
private

Definition at line 143 of file ridge_layer.h.

◆ config_callback

dynamic_reconfigure::Server<mesh_layers::RidgeLayerConfig>::CallbackType mesh_layers::RidgeLayer::config_callback
private

Definition at line 139 of file ridge_layer.h.

◆ first_config

bool mesh_layers::RidgeLayer::first_config
private

Definition at line 141 of file ridge_layer.h.

◆ lethal_vertices

std::set<lvr2::VertexHandle> mesh_layers::RidgeLayer::lethal_vertices
private

Definition at line 135 of file ridge_layer.h.

◆ reconfigure_server_ptr

boost::shared_ptr<dynamic_reconfigure::Server<mesh_layers::RidgeLayerConfig> > mesh_layers::RidgeLayer::reconfigure_server_ptr
private

Definition at line 138 of file ridge_layer.h.

◆ ridge

lvr2::DenseVertexMap<float> mesh_layers::RidgeLayer::ridge
private

Definition at line 133 of file ridge_layer.h.


The documentation for this class was generated from the following files:


mesh_layers
Author(s): Sebastian Pütz
autogenerated on Thu Jan 25 2024 03:43:03