Template Class GenericCloudConstIterator
Defined in File cloud.hpp
Inheritance Relationships
Base Type
public cras::impl::GenericCloudIteratorBase< unsigned char, const unsigned char, const unsigned char, const ::sensor_msgs::msg::PointCloud2, GenericCloudConstIterator >
(Template Class GenericCloudIteratorBase)
Class Documentation
-
template<typename T = unsigned char>
class GenericCloudConstIterator : public cras::impl::GenericCloudIteratorBase<unsigned char, const unsigned char, const unsigned char, const ::sensor_msgs::msg::PointCloud2, GenericCloudConstIterator> Generic const cloud iterator which can return the data in the raw type.
Public Functions
-
inline GenericCloudConstIterator(const ::sensor_msgs::msg::PointCloud2 &cloud_msg, const ::std::string &field_name)
- Parameters:
cloud_msg – [in] The PointCloud2 to iterate upon.
field_name – [in] The field to iterate upon.
-
template<typename D>
inline const D *dataAs() const Return the raw data converted to the given datatype. The datatype has to have the same size as the field.
- Template Parameters:
D – Type of the data the field should be converted to.
- Throws:
std::runtime_error – If sizeof(D) is not the same as getFieldSize().
- Returns:
Pointer to the current raw data converted to the given datatype.
-
inline GenericCloudConstIterator(const ::sensor_msgs::msg::PointCloud2 &cloud_msg, const ::std::string &field_name)