I tested the correct functionality of the SICK LMS-200 laser using both player and Aria demo
1. Creation of cfg file
In order to test it with player I had to create a new .cfg file named sick.cfg which only content is the driver for the laser as follows:
driver
(
name "sicklms200"
provides ["laser:0"]
port "/dev/ttyUSB1")
2. Running the cfg file and testing with playerv
$ robot-player sick.cfg
$ robot-playerv
3. Testing the laser with Aria demo.
3.1 I first needed to change the port that makes the communication with the laser
Note: Although we are working with a pioneer p3at, its laser integration board belongs to a pioneer p3dx
$ roscd Aria
$ cd Aria/params
$ gedit p3dx.p
In line 110 change LaserPort from COM2 to /dev/ttyUSB1
$ rosmake Aria
$ roscd Aria
$ cd Aria/examples
Run demo with the corresponding robot port
$ ./demo -rp /dev/ttyUSB0
Connected to robot.
Name: ITESM_1853
Type: Pioneer
Subtype: p3dx
Loaded robot parameters from p3dx.p
Stabilizing gyro
Then choose 'l' for laser mode and you should see the readings as follows:
You are in 'laser' mode currently.
Laser mode connects to a laser, or uses a previously established connection.
Laser mode then displays the closest and furthest reading from the laser.
'z' or 'Z': toggle between far reading and middle reading with reflectivity
1: lms2xx_1
ArModeLaser is connecting to lms2xx_1.
lms2xx_1: waiting for laser to power on.
lms2xx_1: Connected to the laser.
Laser mode has connected to the laser.
Close: 836mm -26.4 deg Far: 4278mm 49.8 deg 119 readings
No hay comentarios:
Publicar un comentario