diff --git a/README.md b/README.md index 5f4325a..fd683c9 100644 --- a/README.md +++ b/README.md @@ -28,27 +28,26 @@ the map (pixels) and mapping area (meters); a method for updating with the curre the current robot position; and a method for retrieving the current map as a byte array. -
- - from breezyslam.algorithms import RMHC_SLAM -
- lidar = MyLidarModel() -
- mapbytes = bytearray(800*800) -
- slam = RMHC_SLAM(lidar, 800, 35) -
- while True: -
- scan = readLidar() -
- slam.update(scan) -
- x, y, theta = slam.getpos(scan) -
- slam.getmap(mapbytes) - -
+
+from breezyslam.algorithms import RMHC\_SLAM + +lidar = MyLidarModel() + +mapbytes = bytearray(800*800) + +slam = RMHC_SLAM(lidar, 800, 35) + +while True: + + scan = readLidar() + + slam.update(scan) + + x, y, theta = slam.getpos(scan) + + slam.getmap(mapbytes) ++ If odometry is available, it can also be passed into the update method.