Closed mxbi closed 6 years ago
Hi, you're exactly correct with this, however it was not accidental. We initially shipped kits with an older training model for distances because there was an error with our measurements for the C016 data. We've fixed it and are verifying for shipping it on Monday.
Hi @Adimote Is this fixed in the update you pushed out?
distance.metres
, while changing less dramatically, is still giving us wildly incorrect results. For example, when this is the view of the camera:
We are getting ~160 metres from marker.distance_metres
Hi,
Just noticed that even after the update distance_metres
still gets the value from the polar co-ordinate system, and not the supposedly fixed spherical coordinate system:
https://github.com/sourcebots/robot-api/blob/master/robot/markers.py#L132-L134
Should this be changed to access the spherical system instead?
Yes, you are correct. This is an oversight on our part. I'll fix that now!
The issue with getting the data from polar
rather than spherical
has been fixed (even though they do the same thing). The issue with its inaccuracies are still being worked on. Reopening this issue to track those.
Can confirm this issue has been fixed with the recent overhaul to sb-vision
, closing. :)
I will note however that the values we've obtained out of distance_metres with the new software has been off by a constant factor (around 1.14*actual distance) - we're correcting for this in our software but it may be something to look into.
Hi, it's me again :)
We've been playing around with the vision API and some of the behaviour is a bit unusual, so I thought I would flag it up here:
The value of
marker.distance_metres
varies by a huge amount when callingcamera.see()
in a loop even when the entire scene is static, and I'm not sure why. When looking atmarker.pixel_corners
ormarker.pixel_centre
I can see that the values are staying constant (changing than less than 1 pixel),Here's an example of what I mean:
You can see that the distance is all over the place (varying from 20 to 140 metres in this case), but the values of the detected centre and top left corner barely change by a single pixel. And if I manually superimpose the detected co-ordinates on an image taken from the webcam, it lines up basically perfectly - so the detection isn't incorrect - the issue is somewhere in the distance calculation I guess.
This also behaves differently on different tags: I'm testing on cube ID 44, and most of the faces give a distance varying between 1 and 8 metres (the real distance is about 2m). However, there is one specific face which is giving me the 20 to 140m in the plot above:
I also found something which might be causing the issue: Looking in robotd, the DISTANCE_MODEL is set to "c270" (https://github.com/sourcebots/robotd/blob/master/robotd/camera.py#L19). The camera we've been given is a Tecknet C016 and not a logitech c270. I haven't looked any deeper so I have no idea what this would affect, but it's suspicious.