Skip to content

Expanded publisher point could message type #1

Description

@markgol

Currently this node publishes the keyframes just as the builtin type PointXYZI. This removes the time stamp on each point in the point cloud data. This limits what deskewing can be done later on in the pipeline.

header.stamp = epoch time of first point
time = relative seconds from header stamp

The solution is to to register a new type PointXYZIT to be used in this and downstream nodes.

#include <pcl/point_types.h>
#include <pcl/register_point_struct.h>

namespace pcXYZIT
{
struct EIGEN_ALIGN16 PointXYZIT
{
PCL_ADD_POINT4D;

    float intensity;
    float time;

    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};

} // namespace pcXYZIT

POINT_CLOUD_REGISTER_POINT_STRUCT(
pcXYZIT::PointXYZIT,
(float, x, x)
(float, y, y)
(float, z, z)
(float, intensity, intensity)
(float, time, time)
)

This should be implemented in a separate include file like pcXYZIT_type.h that can easily be included in any node.
Usage would be rather than:
pcl::PointCloudpcl::PointXYZI::Ptr scan(new pcl::PointCloudpcl::PointXYZI);
use the following:
pcl::PointCloudpcXYZIT::PointXYZIT::Ptr scan(new pcl::PointCloudpcXYZIT::PointXYZIT);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions