LIDAR-Lite Rangefinder

I’m trying to use the LIDAR-Lite Rangefinder with my rover. I’ve connected it my Pixhawk using the PWM method with the resistor described here:
rover.ardupilot.com/wiki/common- … lidarlite/
and I’ve changed the appropriate parameters in Mission Planner as also described in the wiki. So I’ve set:
RNGFND_TYPE = 5
RNGFND_STOP_PIN = 55
BRD_PWM_COUNT = 4
RNGFND_SCALING = 1
RNGFND_OFFSET = 0
RNGFND_MAX_CM = 4000
RNGFND_MIN_CM = 20

In the Flight Data tab under “status” I can see reasonable readings for sonar range and sonar voltage, where they are about equal. However, when running the rover in auto mode at relatively slow speeds (2 m/s) it does not stop in front of any obstacles or avoid them.

Has anyone had any luck implementing the LIDAR on the rover?

@,
What are you values for the following parameters as you did not state their values:

Rangefinder trigger distance (APMrover2:RNGFND_TRIGGR_CM)
The distance from an obstacle in centimeters at which the rangefinder triggers a turn to avoid the obstacle
•Range: 0 1000
•Increment: 1
•Units: centimeters

Rangefinder trigger angle (APMrover2:RNGFND_TURN_ANGL)
The course deviation in degrees to apply while avoiding an obstacle detected with the rangefinder. A positive number means to turn right, and a negative angle means to turn left.
•Range: -45 45
•Increment: 1
•Units: centimeters

Rangefinder turn time (APMrover2:RNGFND_TURN_TIME)
The amount of time in seconds to apply the RNGFND_TURN_ANGL after detecting an obstacle.
•Range: 0 100
•Increment: 0.1
•Units: seconds

Rangefinder debounce count (APMrover2:RNGFND_DEBOUNCE)
The number of 50Hz rangefinder hits needed to trigger an obstacle avoidance event. If you get a lot of false sonar events then raise this number, but if you make it too large then it will cause lag in detecting obstacles, which could cause you go hit the obstacle.
•Range: 1 100
•Increment: 1

Regards,
TCIII GM

Thanks for your help. Here is what I have set for those values:
RNGFND_TRIGGR_CM = 100
RNGFND_TURN_ANGL = 45
RNGFND_TURN_TIME = 1
RNGFND_DEBOUNCE = 2

Perhaps the 1 second for turn time is too long? Also, under Basic Tuning all of the text boxes under Sonar are greyed out so I can’t change them and all say 0 even though the LIDAR is on and reporting sonar range values. So to find the parameters that you mentioned I had to go into the full parameter list.

@brettm2277,
What GCS are you using?
Regards,
TCIII GM

Mission Planner 1.3.31 with ArduRover 2.50.

Hi Brett. I configured my LiDAR-Lite on my desk and connected to MAVProxy and as I put my hand over the LiDAR I get “APM: Sonar obstacle 36 cm” but I only get it once. i.e. if I move my hand up and down but still in the way of the sonar I don’t see the message change with a new distance reading. However, when I then move my hand away I get “APM: Obstacle passed”.
In MP if you go to the “Messages” tab on the end you should see the same messages without the “APM:” bit at the front (I just tested and confirmed this). So turn your vehicle on and put your hand in front of the sensor and see if you get those messages.
Now paranoid mode for the next 2 tips. In MissionPlanner when you write the parameters you should read them back to make sure they changed correctly. After changing the parameters a reboot of the Pixhawk may help.
Let us know how you go. If it doesn’t work please send us your dataflash log (downloaded from your Pixhawk) and we will have a look.
Thanks, Grant.