Closed nunoguedelha closed 2 years ago
By using the bouncing ball mode (option --mode ball
) and change the code section https://github.com/robotology/yarp/blob/82bcafc792ba9b32aad771f7f5d6f3c52ba5fbbe/src/devices/fakeFrameGrabber/FakeFrameGrabber.cpp#L434-L442 for drawing 3 RGB circles instead of two
case VOCAB_BALL:
{
if (have_bg) {
image.copy(background);
} else {
image.zero();
}
addCircle(image,PixelRgb{255,0,0},bx,by,22);
addCircle(image,PixelRgb{0,255,0},bx,by,15);
addCircle(image,PixelRgb{0,0,255},bx,by,8);
we can check the color order used on the receiver side to be BGR:
fakeFrameGrabber
yarpdev --file fakeFrameGrabber_basic.ini --mode ball --name /icubSim/camLeftEye
fakeFrameGrabber_basic.ini
:
device fakeFrameGrabber
width 640
height 480
period 10
syncro 1
yarpview
device.We need to understand how this order is configured on the Open-MCT API and change it.
As discussed in the call, Also check that the Open-MCT visualizer checks any present metadata about the RGB information.
Check https://github.com/robotology/yarp/pull/2061/files regarding how to check the used R, G, B order.
The color swap was due to an issue in yarp.js
module (https://github.com/robotology/yarp.js/issues/41). Fixed by https://github.com/robotology/yarp.js/pull/40 .
When visualizing the iCub camera views in the Open-MC based visualizer, we observe a color shift, e.g. blue instead of red. Typically, when visualizing the fake framegrabber through the Open-MC based visualizer, we observe a swiping blue line instead of a red one.