Page 1 of 1

Blob orientation

Posted: 07 Dec 2018, 16:01
by BiancaSan93
Hi,
I am making some experiments with the blob detection camera, in order to detect the orientation of some objects in the scene, but I am unsure about the returned value.
I only have one blob and my code is

Code: Select all

    
    res1,packet1a,packet1b=sim.handleVisionSensor(sensor1)

    if res1 >=0 then

        q1=packet1b[4]
        q1=q1*180/math.pi --convert to degrees
        sim.setFloatSignal('detectedAngle',q1)
        print(q1)
    end
The values printed out are obviously the angle of inclination of the detected object, but relative to what exactly? Shouldn't the orientation be a table with the euler angle, and if not, what angle is it measuring (alpha, beta, gamma)? This causes me a problem because, if I plot the results, I get the following

Image

The object I am tracking is attached to a revolute joint, exactly in front of the sensor, following a sinusoidal trajectory.
Obviously it detects the orientation of the blob as the opposite one after certain angles. Is there a way to transform the blob orientation scalar value with respect to the orientation of another object? How do I do that, if I don't know the whole orientation matrix?

Thanks in advance

Re: Blob orientation

Posted: 10 Dec 2018, 14:58
by coppelia
Hello,

the extracted blob orientation is always relative to the vision sensor's Y axis (or its viewing axis). You can't possible extract the full orientation of the object based on a single blob, since that is 2 D information.

Cheers