Skip to content

Instantly share code, notes, and snippets.

@kamplom
Created February 9, 2025 18:34
Show Gist options
  • Save kamplom/99160a7bb92a1e919d56d0e18b391581 to your computer and use it in GitHub Desktop.
Save kamplom/99160a7bb92a1e919d56d0e18b391581 to your computer and use it in GitHub Desktop.
Obstacle Avoidance System.md

The system does not require a full SLAM system, we just don't want to crash if something appears front of the moving part. Thus we can build an independent system that handles all the logic and processing and signals the drive system if it needs to stop. The drive system can be agnostic to the source of the signal. It may additionally signal a maximum stopping distance, depending on the detection type.

Collision detection systems

This systems detect a collision has occurred and stop the drive unit as fast as possible. The main challenge with this kind of systems is to keep the detection time as low as possible while avoiding false positives.

This methods require a DAQ. The accuracy of the DAQ can be relatively small, as we care about stopping in case of a crash and not about measuring the magnitude of the crash. The sample rate is important though, we need to detect the crash as fast as possible. Further discussion about DAQs.

They are worth researching and developing to work in parallel with an avoidance system, in case the second fails.

Strain gauges

If we crash into something, some members of the structure will deform rapidly, and we might detect so with a strain gauge. The order of magnitude of the deformation may be too small to be sensed. Considering the cost the best approach may be to test it empirically.

IMUs

A spike in the acceleration may indicate a crash has occurred. A COTS IMU with high sample rate is cheap enough to do empirical testing.

Capacitive sensor

This will allow to kill the drive unit if a person touches any part of the structure. The drawbacks are clear: it will likely not stop if the crash is originated by an object and if a person touches the structure while it is moving it will stop it. They are very cheap as well so may be a last resort.

Collision avoidance systems

Avoiding the contact all together is preferable. This kind of sensor need extra processing power and potentially more complicated algorithms. We can maybe use opensource models of machine vision (OpenCV, etc) and greatly simplify the task.

The benefits greatly outweigh the drawbacks, and the increased developing time can be justified by selling it as an expensive add-on. The idea is mount the sensor facing downwards on highest part of the structure and measure the height of whatever is below. If the height is great enough to cause a solution we stop the motor.

It is also possible to measure the distance left to impact, and stop within that distance in a controlled manner.

LIDAR

The narrow FOV of a fixed LIDAR seems like a problem to properly detect the objects. If the detection zone is a certain distance in front of the moving part, an object appearing in the distance between the detection zone and the chart will not be detected. Rotating LIDARs seem like a pain for reliability and they do not solve the FOV problem on the rotation axis.

Ultrasonic

See LIDAR.

Cameras

Cameras with depth sensing capabilities seem like the ideal solution for our problem. They have a wide range of view and while they lack accuracy we do not need millimetre level mesuraments.

Software-wise there exists a lot of libraries to process the image and overly the distance data, although the implementation may be difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment