More RPLidarA1 support
This commit is contained in:
@@ -24,7 +24,7 @@ MAP_SIZE_METERS = 10
|
||||
LIDAR_DEVICE = '/dev/ttyUSB0'
|
||||
|
||||
from breezyslam.algorithms import RMHC_SLAM
|
||||
#from breezyslam.sensors import XVLidar as LaserModel
|
||||
from breezyslam.sensors import RPLidarA1 as LaserModel
|
||||
|
||||
from rplidar import RPLidar as Lidar
|
||||
|
||||
@@ -36,10 +36,10 @@ if __name__ == '__main__':
|
||||
lidar = Lidar(LIDAR_DEVICE)
|
||||
|
||||
# Create an RMHC SLAM object with a laser model and optional robot model
|
||||
#slam = RMHC_SLAM(LaserModel(), MAP_SIZE_PIXELS, MAP_SIZE_METERS)
|
||||
slam = RMHC_SLAM(LaserModel(), MAP_SIZE_PIXELS, MAP_SIZE_METERS)
|
||||
|
||||
# Set up a SLAM display
|
||||
#display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, 'SLAM')
|
||||
display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, 'SLAM')
|
||||
|
||||
# Initialize an empty trajectory
|
||||
trajectory = []
|
||||
|
||||
Reference in New Issue
Block a user