Servers by jDrones

Object Avoidance not working with Lightware SF20 via I2C

arducopter
(Kvynlim) #1

Issue details
I have followed the following link: http://ardupilot.org/dev/docs/code-overview-object-avoidance.html and http://ardupilot.org/copter/docs/common-lightware-lw20-lidar.html in my attempt to enable obstacle avoidance for my drone but with no success and . I discovered that the range finder does not give any distance data when it is set to forward but this can be solved by setting the PRX_TYPE to 2(MAVLink). Also, from the Mavlink Inspector, I can see that there is distance_sensor message which mean the ardupilot is receiving the message required for object avoidance. I set RC8 Opt for Object Avoidance but it can still pitch when it is on while the current distance is less than the max distance to avoid. Is there something that i miss? Thanks in advance for any help.

Version
ArduCopter V3.7.0-dev

Platform
[ ] All
[ ] AntennaTracker
[ x ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Airframe type
Quad

Hardware type
CubeBlack

(mtbsteve) #2

I never got it working either with a SF20.
I guess you need a 360 degrees lidar scanner like the SF40 to make it work with the Arducopter code.
I then developed object avoidance based on the 3DR Solo alongside with the SF20. It’s a very basic solution with the code running on the Solo companion computer but it works well. Details see here, maybe you can leverage something for your project.

(Kvynlim) #3

Thank you for the reply and I will refer your post to see how I can leverage it. Did you manage to get range finder reading and distance_sensor message but the drone doesn’t perform object avoidance as well?

(mtbsteve) #4

If its configured correctly, you should get a overlay window in Mission Planner which graphically shows the distance to the object. That worked for me, however I always got false readings causing the copter to stop randomly in flight. All my attempts were with AC3.5 and after I could not get it working I developed my own implementation with Solo.
See my experiences and video here:

(Kvynlim) #5

Yeah, I was able to get the radar graphic which shows the distance to object. However, when my pre_arm check is enabled, it tells me to check proximity sensor which indicates that the proximity sensor (SF20) is unhealthy. But, it is able to provide the distance_sensor message. So, this cause me to be confused about this matter on whether the SF20 can be used for object avoidance or the arducopter code requires us to use 360 lidars