Skip to content

No RGB data in output pointcloud #37

Description

@roboticlemon

When running with pointcloud enable I can only seem to get mono output from the pointcloud output. I am checking RGB in Rviz and manually inspected the cloud output to verify that indeed it is only publishing mono data.

I can see that the plugin is always dropping into this else if:

else if (this->image_msg_.data.size() == rows_arg * cols_arg)
{
// mono (or bayer? @todo; fix for bayer)
iter_rgb[0] = image_src[i + j * cols_arg];
iter_rgb[1] = image_src[i + j * cols_arg];
iter_rgb[2] = image_src[i + j * cols_arg];

Since we are filling the this->image_msg_ data with both RGB colour images and MONO IR images here:

fillImage(this->image_msg_, pixel_format, cam->ImageHeight(),
cam->ImageWidth(), cam->ImageDepth() * cam->ImageWidth(),
reinterpret_cast<const void *>(cam->ImageData()));

I'm suspecting that somehow only the MONO images are actually being used exclusively for:

uint8_t *image_src = (uint8_t *)(&(this->image_msg_.data[0]));

It seems at least one other user may have experienced this issue too: #3

Any ideas or fixes would be much appreciated! Happy to contribute back if I figure something out too.

Cheers

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions