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 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