Sensing a corner

Has anyone ever used an ultrasonic or something to detect a corner of the field? The girls wanted to try to detect the corner with an ultrasonic The thought was to point off the corner (one side of the field wall), and slowly rotate toward facing the corner, letting the measurement get larger and larger, until it started to get smaller again (just passing the corner point, and now sensing the other wall in the corner). After doing some tests, this appears unreliable, as the readings get all wonky and jump around or stay stable when they shouldn’t, or even go to -1.

Is this sensor just unrealistic to do something this fine?

A ultrasonic sensor right now probably wont work that well when far away from the wall as vex just has not reach that point yet. Even close dont expect it to be super perfect. Maybe attempt to use another sensor or something else to take over the job for you. Remember using multiple sensors might help it be more accurate.

3 Likes

FYI, -1 means that it got no reading (i.e. it sent out a ping and never heard the pong).

I’d recommend other methods of figuring out your direction, such as encoders and/or the intertial sensor. And as The_To said, using more sensors than strictly necessary can give you more accurate data if done properly.

2 Likes

Actually, my team developed a relatively simple and robust way to accomplish this: Field Autonomous Navigation Gizmos (FANGs).

On each side of the drivetrain is a rotating channel with a sloped piece of lexan attached. When the slope comes into contact with the barrier, the channel rotates upward slightly. This slight rotation undepresses a limit switch.

Whenever one FANG is triggered, that side of the drivetrain stops and the other side continues to align with the goal zone. This greatly increased the consistency of our auton and I would definitely recommend it.

12 Likes

Yes. It is definitely doable.
We did it during Starstruck and used 2 ultrasound sensors (one back facing, and the other at the side) to guide the robots to the hanging pole. Pretty high accuracy. But you can’t move the robot too fast though.

Edit: i am not sure if it is applicable for this season though… considering there will be various stacks of cubes at the corners

4 Likes

Not sure about sensing a corner, that would likely be tricky due to beam dispersion, but my students use the sonar to measure the distance to the wall before scoring in auton.

Due to the design of their robot (front wheels too close to the tray edge), they need to drive quite precisely to the edge of the scoring zone.
So, after collecting the cubes, they drive back towards the driving station, stop few inches from the rear perimeter, measure the distance to the side wall, do a 90-ish degree turn and drive forward based on the measured distance.

The ultrasonic sensor has proven to be very precise and reliable for this purpose, but after one pronounced failure, they have added sensor reading range validation: Say the expected distance before turn is about 650mm ± 50mm. If the value is outside the measured range, they use the median default instead. (It turned out the observed failure was not properly accounting for red/blue auton selection and using the sonar on the other side of the robot)

4 Likes

If you have ultrasonics reading the distance to each wall, you can use Pythagorean theorem to find the distance to the corner, and some trig to get the angle you need to turn to. this assumes there aren’t cubes in the way of the walls, however.

I have seen this in action and it really works well!!

1 Like

hhmmm.

From our path, it appears that cubes will be clear, but I’d have to play with some items to see how this would work.

Thanks everyone for the ideas. I’ll play with this some and see what I can teach the girls.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.