RGLGazeboPlugin icon indicating copy to clipboard operation
RGLGazeboPlugin copied to clipboard

RGL pointcloud does not cointain ray timestamp

Open Cionix90 opened this issue 1 year ago • 1 comments

Hi, i am using you gazebo plugin and it is very cool. Since i want to develop mine LIDAR odometry algorithm in ROS2 environment, i want to de-skew the point cloud using IMU data but i need a sort of time stamp, also relative to a certain scan, to perform this operation. This data can be get using your plugin? if not how could i add it? Thanks in advance.

Cionix90 avatar Dec 03 '24 16:12 Cionix90

In Lidar.cc file, add the time field

gz::msgs::InitPointCloudPacked(outMsg, frame, false,
                                         {{"xyz", gz::msgs::PointCloudPacked::Field::FLOAT32},
                                          {"t", gz::msgs::PointCloudPacked::Field::UINT32}});

In RGLServerPluginInstance.hh file, add the time field

inline static const std::vector<rgl_field_t> rglFields = {
                RGL_FIELD_XYZ_VEC3_F32,
                RGL_FIELD_TIME_STAMP_U32};

AllenIsaacJose avatar Aug 20 '25 14:08 AllenIsaacJose