Ros2PointCloudMessage#
Fully qualified name: isaacsim::ros2::bridge::Ros2PointCloudMessage
-
class Ros2PointCloudMessage : public isaacsim::ros2::bridge::Ros2Message#
Class implementing a
sensor_msgs/msg/PointCloud2
message.Public Functions
- virtual void generateBuffer(
- const double &timeStamp,
- const std::string &frameId,
- const size_t &width,
- const size_t &height,
- const uint32_t &pointStep,
Generate the buffer (data) according to the point cloud metadata.
It allocates memory for the
data
field, and computes and fills in the values of the other message fields.- Parameters:
timeStamp – Time (seconds).
frameId – Transform frame with which this data is associated.
height – Point cloud height.
width – Point cloud width.
pointStep – Length of a point in bytes.
-
inline void *getBufferPtr()#
Get the pointer to the buffer (data).
- Returns:
Pointer to the buffer.
-
inline size_t getTotalBytes()#
Get the total size (
width * point_step
) of the buffer, in bytes.- Returns:
Buffer size.
-
inline void *getPtr()#
Get the message pointer.
- Returns:
The pointer to the message if it has been created and initialized properly, otherwise
nullptr
.
-
virtual const void *getTypeSupportHandle() = 0#
Get the pointer to the struct that contains the ROS IDL message type support data.
The pointer points to a ROS IDL struct if the message if founded.
Message type
ROS IDL struct
Topic (Message)
rosidl_message_type_support_t
Service
rosidl_service_type_support_t
Action
rosidl_action_type_support_t
- Returns:
The pointer to the struct, otherwise
nullptr
.