Classes | Typedefs | Functions
mesh_msgs_conversions Namespace Reference

Classes

struct  MaterialGroup
 

Typedefs

typedef std::vector< boost::shared_ptr< MaterialGroup > > GroupVector
 
typedef boost::shared_ptr< MaterialGroupMaterialGroupPtr
 
using PointBuffer = lvr2::PointBuffer
 
using PointBufferPtr = lvr2::PointBufferPtr
 
using Vec = lvr2::BaseVector< float >
 

Functions

bool fromMeshBufferToMeshGeometryMessage (const lvr2::MeshBufferPtr &buffer, mesh_msgs::MeshGeometry &mesh_geometry)
 
bool fromMeshBufferToMeshMessages (const lvr2::MeshBufferPtr &buffer, mesh_msgs::MeshGeometry &mesh_geometry, mesh_msgs::MeshMaterials &mesh_materials, mesh_msgs::MeshVertexColors &mesh_vertex_colors, boost::optional< std::vector< mesh_msgs::MeshTexture > & > texture_cache, std::string mesh_uuid)
 Convert lvr2::MeshBuffer to various messages for services. More...
 
bool fromMeshGeometryMessageToMeshBuffer (const mesh_msgs::MeshGeometry &mesh_geometry, const lvr2::MeshBufferPtr &buffer)
 Convert mesh_msgs::MeshGeometry to lvr2::MeshBuffer. More...
 
bool fromMeshGeometryToMeshBuffer (const mesh_msgs::MeshGeometry &mesh_geometry, lvr2::MeshBuffer &buffer)
 
bool fromMeshGeometryToMeshBuffer (const mesh_msgs::MeshGeometry &mesh_geometry, lvr2::MeshBufferPtr &buffer_ptr)
 
bool fromMeshGeometryToMeshBuffer (const mesh_msgs::MeshGeometryConstPtr &mesh_geometry_ptr, lvr2::MeshBuffer &buffer)
 
bool fromMeshGeometryToMeshBuffer (const mesh_msgs::MeshGeometryConstPtr &mesh_geometry_ptr, lvr2::MeshBufferPtr &buffer_ptr)
 
bool fromMeshGeometryToMeshBuffer (const mesh_msgs::MeshGeometryPtr &mesh_geometry_ptr, lvr2::MeshBuffer &buffer)
 
bool fromMeshGeometryToMeshBuffer (const mesh_msgs::MeshGeometryPtr &mesh_geometry_ptr, lvr2::MeshBufferPtr &buffer_ptr)
 
bool fromPointCloud2ToPointBuffer (const sensor_msgs::PointCloud2 &cloud, PointBuffer &buffer)
 
static bool hasCloudChannel (const sensor_msgs::PointCloud2 &cloud, const std::string &field_name)
 
void PointBufferToPointCloud2 (const lvr2::PointBufferPtr &buffer, std::string frame, sensor_msgs::PointCloud2Ptr &cloud)
 converts lvr2::Pointbuffer to pointcloud2. Every channel is added as a pointfield. More...
 
void PointCloud2ToPointBuffer (const sensor_msgs::PointCloud2Ptr &cloud, lvr2::PointBufferPtr &buffer)
 converts pointcloud2 to a newly created Pointerbuffer. Every pointfield is written into its own channel. More...
 
bool readMeshBuffer (lvr2::MeshBufferPtr &buffer, string path)
 Creates a LVR-MeshBufferPointer from a file. More...
 
template<typename CoordType >
const mesh_msgs::MeshGeometry toMeshGeometry (const lvr2::HalfEdgeMesh< lvr2::BaseVector< CoordType >> &hem, const lvr2::VertexMap< lvr2::Normal< CoordType >> &normals=lvr2::DenseVertexMap< lvr2::Normal< CoordType >>())
 
template<typename CoordType >
const mesh_msgs::MeshGeometryStamped toMeshGeometryStamped (const lvr2::HalfEdgeMesh< lvr2::BaseVector< CoordType >> &hem, const std::string &frame_id, const std::string &uuid, const lvr2::VertexMap< lvr2::Normal< CoordType >> &normals=lvr2::DenseVertexMap< lvr2::Normal< CoordType >>(), const ros::Time &stamp=ros::Time::now())
 
const mesh_msgs::MeshVertexCosts toVertexCosts (const lvr2::DenseVertexMap< float > &costs)
 
const mesh_msgs::MeshVertexCosts toVertexCosts (const lvr2::VertexMap< float > &costs, const size_t num_values, const float default_value)
 
const mesh_msgs::MeshVertexCostsStamped toVertexCostsStamped (const lvr2::DenseVertexMap< float > &costs, const std::string &name, const std::string &frame_id, const std::string &uuid, const ros::Time &stamp=ros::Time::now())
 
const mesh_msgs::MeshVertexCostsStamped toVertexCostsStamped (const lvr2::VertexMap< float > &costs, const size_t num_values, const float default_value, const std::string &name, const std::string &frame_id, const std::string &uuid, const ros::Time &stamp=ros::Time::now())
 
bool writeMeshBuffer (lvr2::MeshBufferPtr &mesh, string path)
 Writes a LVR-MeshBufferPointer to a file. More...
 

Typedef Documentation

◆ GroupVector

Definition at line 89 of file conversions.h.

◆ MaterialGroupPtr

Definition at line 90 of file conversions.h.

◆ PointBuffer

Definition at line 77 of file conversions.h.

◆ PointBufferPtr

Definition at line 78 of file conversions.h.

◆ Vec

Definition at line 76 of file conversions.h.

Function Documentation

◆ fromMeshBufferToMeshGeometryMessage()

bool mesh_msgs_conversions::fromMeshBufferToMeshGeometryMessage ( const lvr2::MeshBufferPtr buffer,
mesh_msgs::MeshGeometry &  mesh_geometry 
)

Definition at line 37 of file conversions.cpp.

◆ fromMeshBufferToMeshMessages()

bool mesh_msgs_conversions::fromMeshBufferToMeshMessages ( const lvr2::MeshBufferPtr buffer,
mesh_msgs::MeshGeometry &  mesh_geometry,
mesh_msgs::MeshMaterials &  mesh_materials,
mesh_msgs::MeshVertexColors &  mesh_vertex_colors,
boost::optional< std::vector< mesh_msgs::MeshTexture > & >  texture_cache,
std::string  mesh_uuid 
)

Convert lvr2::MeshBuffer to various messages for services.

Definition at line 89 of file conversions.cpp.

◆ fromMeshGeometryMessageToMeshBuffer()

bool mesh_msgs_conversions::fromMeshGeometryMessageToMeshBuffer ( const mesh_msgs::MeshGeometry &  mesh_geometry,
const lvr2::MeshBufferPtr buffer 
)

Convert mesh_msgs::MeshGeometry to lvr2::MeshBuffer.

Parameters
messageto be read
bufferto be returned
Returns
bool success status

Definition at line 538 of file conversions.cpp.

◆ fromMeshGeometryToMeshBuffer() [1/6]

bool mesh_msgs_conversions::fromMeshGeometryToMeshBuffer ( const mesh_msgs::MeshGeometry &  mesh_geometry,
lvr2::MeshBuffer buffer 
)

Definition at line 260 of file conversions.cpp.

◆ fromMeshGeometryToMeshBuffer() [2/6]

bool mesh_msgs_conversions::fromMeshGeometryToMeshBuffer ( const mesh_msgs::MeshGeometry &  mesh_geometry,
lvr2::MeshBufferPtr buffer_ptr 
)

Definition at line 252 of file conversions.cpp.

◆ fromMeshGeometryToMeshBuffer() [3/6]

bool mesh_msgs_conversions::fromMeshGeometryToMeshBuffer ( const mesh_msgs::MeshGeometryConstPtr &  mesh_geometry_ptr,
lvr2::MeshBuffer buffer 
)

Definition at line 222 of file conversions.cpp.

◆ fromMeshGeometryToMeshBuffer() [4/6]

bool mesh_msgs_conversions::fromMeshGeometryToMeshBuffer ( const mesh_msgs::MeshGeometryConstPtr &  mesh_geometry_ptr,
lvr2::MeshBufferPtr buffer_ptr 
)

Definition at line 229 of file conversions.cpp.

◆ fromMeshGeometryToMeshBuffer() [5/6]

bool mesh_msgs_conversions::fromMeshGeometryToMeshBuffer ( const mesh_msgs::MeshGeometryPtr &  mesh_geometry_ptr,
lvr2::MeshBuffer buffer 
)

Definition at line 245 of file conversions.cpp.

◆ fromMeshGeometryToMeshBuffer() [6/6]

bool mesh_msgs_conversions::fromMeshGeometryToMeshBuffer ( const mesh_msgs::MeshGeometryPtr &  mesh_geometry_ptr,
lvr2::MeshBufferPtr buffer_ptr 
)

Definition at line 237 of file conversions.cpp.

◆ fromPointCloud2ToPointBuffer()

bool mesh_msgs_conversions::fromPointCloud2ToPointBuffer ( const sensor_msgs::PointCloud2 &  cloud,
lvr2::PointBuffer buffer 
)

Definition at line 384 of file conversions.cpp.

◆ hasCloudChannel()

static bool mesh_msgs_conversions::hasCloudChannel ( const sensor_msgs::PointCloud2 &  cloud,
const std::string &  field_name 
)
inlinestatic

Definition at line 375 of file conversions.cpp.

◆ PointBufferToPointCloud2()

void mesh_msgs_conversions::PointBufferToPointCloud2 ( const lvr2::PointBufferPtr buffer,
std::string  frame,
sensor_msgs::PointCloud2Ptr &  cloud 
)

converts lvr2::Pointbuffer to pointcloud2. Every channel is added as a pointfield.

Parameters
bufferthe input lvr2::Pointbuffer
framethe frame of the converted pointcloud2
cloudthe converted pointcloud2

Definition at line 590 of file conversions.cpp.

◆ PointCloud2ToPointBuffer()

void mesh_msgs_conversions::PointCloud2ToPointBuffer ( const sensor_msgs::PointCloud2Ptr &  cloud,
lvr2::PointBufferPtr buffer 
)

converts pointcloud2 to a newly created Pointerbuffer. Every pointfield is written into its own channel.

Parameters
cloudthe input cloud
bufferthe converted lvr2::Pointbuffer
Returns

Definition at line 742 of file conversions.cpp.

◆ readMeshBuffer()

bool mesh_msgs_conversions::readMeshBuffer ( lvr2::MeshBufferPtr buffer,
string  path 
)

Creates a LVR-MeshBufferPointer from a file.

Parameters
pathPath to a MeshFile
Returns
LVR-MeshBufferPointer

Definition at line 301 of file conversions.cpp.

◆ toMeshGeometry()

template<typename CoordType >
const mesh_msgs::MeshGeometry mesh_msgs_conversions::toMeshGeometry ( const lvr2::HalfEdgeMesh< lvr2::BaseVector< CoordType >> &  hem,
const lvr2::VertexMap< lvr2::Normal< CoordType >> &  normals = lvr2::DenseVertexMap<lvr2::Normal<CoordType>>() 
)
inline

Definition at line 94 of file conversions.h.

◆ toMeshGeometryStamped()

template<typename CoordType >
const mesh_msgs::MeshGeometryStamped mesh_msgs_conversions::toMeshGeometryStamped ( const lvr2::HalfEdgeMesh< lvr2::BaseVector< CoordType >> &  hem,
const std::string &  frame_id,
const std::string &  uuid,
const lvr2::VertexMap< lvr2::Normal< CoordType >> &  normals = lvr2::DenseVertexMap<lvr2::Normal<CoordType>>(),
const ros::Time stamp = ros::Time::now() 
)
inline

Definition at line 139 of file conversions.h.

◆ toVertexCosts() [1/2]

const mesh_msgs::MeshVertexCosts mesh_msgs_conversions::toVertexCosts ( const lvr2::DenseVertexMap< float > &  costs)
inline

Definition at line 186 of file conversions.h.

◆ toVertexCosts() [2/2]

const mesh_msgs::MeshVertexCosts mesh_msgs_conversions::toVertexCosts ( const lvr2::VertexMap< float > &  costs,
const size_t  num_values,
const float  default_value 
)
inline

Definition at line 154 of file conversions.h.

◆ toVertexCostsStamped() [1/2]

const mesh_msgs::MeshVertexCostsStamped mesh_msgs_conversions::toVertexCostsStamped ( const lvr2::DenseVertexMap< float > &  costs,
const std::string &  name,
const std::string &  frame_id,
const std::string &  uuid,
const ros::Time stamp = ros::Time::now() 
)
inline

Definition at line 196 of file conversions.h.

◆ toVertexCostsStamped() [2/2]

const mesh_msgs::MeshVertexCostsStamped mesh_msgs_conversions::toVertexCostsStamped ( const lvr2::VertexMap< float > &  costs,
const size_t  num_values,
const float  default_value,
const std::string &  name,
const std::string &  frame_id,
const std::string &  uuid,
const ros::Time stamp = ros::Time::now() 
)
inline

Definition at line 167 of file conversions.h.

◆ writeMeshBuffer()

bool mesh_msgs_conversions::writeMeshBuffer ( lvr2::MeshBufferPtr mesh,
string  path 
)

Writes a LVR-MeshBufferPointer to a file.

Parameters
meshLVR-MeshBufferPointer
pathPath to a MeshFile

Definition at line 317 of file conversions.cpp.



mesh_msgs_conversions
Author(s): Sebastian Pütz , Henning Deeken
autogenerated on Sun Jan 21 2024 04:06:17