Mobile Robot Navigation
Take a small wheeled rover from driving blind to finding its own way: steer it, track where it thinks it is, turn lidar scans into a map, plan a path through the map and follow it.
Start the lesson0/6 steps done
What you'll learn
- Drive a differential-drive robot with speed and turn-rate commands
- Track a pose by dead reckoning, and see why it drifts
- Turn lidar ranges into points in the world
- Build an occupancy grid map from scans
- Plan shortest paths on a grid with A*
- Follow a path with pure pursuit
Before you start
You should be comfortable with basic Python: variables, loops and functions. We'll introduce the robotics and the maths as you go. The first visit downloads the physics engine and Python, about 20 MB, and later visits load from your browser's cache.
Steps
- 1Driving a wheeled robotSteer a rover with a speed and a turn rate: drive a perfect circle, then write a controller that visits three beacons.Differential drivePose (x, y, θ)Go-to-goal controlOpen
- 2Odometry & dead reckoningPredict where a drive ends by adding up small steps, then watch the wheel odometry drift away from the truth.The unicycle modelDead reckoningOdometry driftPro
- 3Seeing with lidarTurn lidar ranges into points on the walls, then drive a winding corridor with a rule that reacts to what the rover sees.Range sensingFrames and the SE(2) transformReactive controlPro
- 4Mapping with an occupancy gridDrive through a maze you've never seen and build its map from lidar beams, one grid cell at a time.Occupancy gridsLog-oddsWalking a ray through a gridPro
- 5Planning a path on the gridGrow the walls by the rover's size, then find the shortest way through the maze: breadth-first, then A*, which heads for the goal.Configuration spaceBreadth-first searchA* and heuristicsPro
- 6Following the pathChase a point a little way along the path: pure pursuit turns a list of cells into smooth steering.Pure pursuitLookahead distanceCross-track errorPro
- ★Bonus: Find the goal in an unseen mazeNo map, no route: map as you go, plan through what you haven't seen yet, and replan whenever the plan hits a wall.Planning under uncertaintyOptimism in the face of the unknownReplanningPro