Gps sensor issues (again?)

Hey,

Team is messing with GPS sensor in earnest. We are seeing following weird behavior:

  1. if you write code to display position to brain, in inches, the x/y readings jump +/- 2 inches at distances more than 7 feet away from the strip it is reading

  2. when you look through the sensor using the brain we notice a) light levels ramping up, 1 second at a time, through 4 levels then falling back to original brightness and b) gps encoder ‘blocks’ disappearing (in red) and reappearing at each brightness change

Have tried:

  1. two brand new sensors
  2. illuminating the gps strip with a flashlight for additional light
  3. pulling strip good and tight so it’s not sagging/etc

The workspace is VERY well lit, 3 rows of led strips, spaced 6 feet apart, running the length of the building.

That almost sounds like the LED lighting is using PWM that’s interfering with the auto exposure control of the GPS, no idea how to fix that.

3 Likes

That’s what I was thinking… which is why we tried a flashlight as supplemental light.

The brightness on the brain’s GPS image steps up, once each second, over 4 levels, then starts over again.

We CANNOT be the only place w/ led lights.

Once the sensor gets within 5-6’ of the strip, the readings stop jumping around, other +/- 1-2".

1 Like

I haven’t messed with it personally, but someone else on my team had the same thing happen. The position just oscillates between the correct one and one really far away.

Bot was sitting 2/3 of the way across the field. The ‘red’ areas on the screen kept shifting around every 1 second.

Some areas appeared/disappeared in red.


2 Likes

Had a team member use iphone slow mo video… the iphone was seeing light level fluctuations… I’m sure it’s in sync with 60hz a/c power. Going to test with other fields and lights soon.

If GPS is good and works… why do we not see more people using it?

1 Like

Perhaps the lack of adoption of the GPS indicates (none of which are mutually exclusive):

  1. It is cost prohibitive
  2. Not all tournaments support it, or do so for skills-only
  3. It has a reputation among competitors for not working
  4. It doesn’t work in real world settings

The lack of actual VexAI tournaments probably contributes as well as a possible source of real-world testing and real-world feedback.

I have no idea about how the Vex Classroom programs work, but perhaps this is a case where showcasing it in a classroom environment would build trust, exposure, etc. That said, it’s an expensive part and may be priced out of the Classroom kits, not to mention needing a 12x12 space in a classroom environment for the robots.

3 Likes

I dusted of my GPS sensor and did a couple of tests. Some comments

The image on the brain screen only updates once per second or so, even though what you see is a subsampled image, there’s a lot of data to push through a relatively slow serial link, that’s why you see light levels changing at that frequency. If you hook up the USB and view the GPS sensor as a webcam, you would see that the actual change in brightness is happening much faster. It tends to happen when there is a bright object (ie. light) that the GPS can see, the auto exposure algorithm over compensate, solution is to try and make sure there are no lights directly in the GPS field of view. Having said that, it usually doesn’t matter if the image changes brightness a little, it’s a monochrome camera and we mostly care about making sure there’s enough difference between the black and white squares on the GPS strip.

probably doesn’t matter, as long as enough of the strip can be seen the algorithm should calculate the GPS position.

I’m not seeing that, but I really don’t have the space to setup a full field for testing. At around 7 feet I see at most +/-1cm if the strip is partially obscured.
In VEXcode you should also check the “quality” of the readings, if quality() doesn’t return 100% then the GPS has less confidence in the values it’s returning. quality is also shown on the GPS dashboard as a red circle, you will see that expand if the GPS sensor cannot see enough of the field strip.

4 Likes

Changed some test code.

GPS quality is reporting 100% 7-8 feet away from strip. X/Y positions are changing 1-4 inches each update to the brain screen.

Note: am using code to display this to screen, not built in brain functions at this point.

2 Likes

Are you saying the numbers displayed by your code and the dashboard don’t match ?

2 Likes

No. I mean that at one point we were using the brain’s functions to see x/y distance. In order to view gps quality, we’ve switched over to some basic code which is showing similar fluctuations and quality of 100%.

1 Like