Online Sequencer Forums

Full Version: Liam how did you make that robot navigation thing?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Its in one of your old videos, there is a robot dot and its in a virtual room with obstacles. The robot walks around the obstacles instead of trying to walk through them. I think this could be a useful thing to know
It stores the map of its surroundings as a 2D grid of squares that are either passable or impassable. Its sensors give it a distance measurement for a few different vectors (this could be a LIDAR, but I was going to just use a Microsoft Kinect since that gives you a depth map and is cheap).

Every time it receives an input from its sensor, it draws a line on the map along that vector for the given distance. Every square that line goes through is marked as passable. The square it ends on is marked as impassable. Any squares it doesn't have any info about are assumed to be passable (this is what leads to the exploration behavior).

Then it just runs a standard path finding algorithm to navigate to its destination (I used A*, but Djikstra would work too), and it updates the calculated path every time the map changes due to new sensor input.

I never ended up building the robot, because this was around the time that I realized I enjoyed writing the software for this stuff more than building the electronics. That's why I do software engineering as my job, even though my degree is in electrical engineering.

Anyway, if you want to read more about this sort of algorithm, the keywords to search for are "simultaneous location and mapping" or SLAM for short. It's fun stuff.
Awesome, thanks!