Skip to content

YarpOpenraveRGBDSensor remove hard-coded depthWidth/depthHeight pairs #103

@jgvictores

Description

@jgvictores

YarpOpenraveRGBDSensor remove hard-coded depthWidth/depthHeight pairs.

Attempt: Via https://github.com/rdiankov/openrave/blob/v0.9.0/plugins/basesensors/baseflashlidar3d.h#L116-L121 we can replace/remove the ugly hard-coded lines:

if( (depthHeight == 0) || (depthWidth == 0) )
{
if (sensorRanges.size()==3072)
{
depthWidth = 64;
depthHeight = 48;
}
else if (sensorRanges.size()==12288)
{
depthWidth = 128;
depthHeight = 96;
}
else if (sensorRanges.size()==49152)
{
depthWidth = 256;
depthHeight = 192;
}
else if (sensorRanges.size()==307200)
{
depthWidth = 640;
depthHeight = 480;
}
else if (sensorRanges.size()==4)
{
depthWidth = 2;
depthHeight = 2;
}
else if (sensorRanges.size()==0)
{
CD_WARNING("sensorRanges.size()==0\n");
}
else
{
depthWidth = sensorRanges.size();
depthHeight = 1;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev:YORGBDSensorupstreamIssue coming from outside the scope of roboticslab-uc3m, fix it on that end (outside)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions