mageshms / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

Range Finder fix #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When flying with four rangefinders for obstacle avoidance, on the front right 
side of the Arducopter it corrects in a wrong direction. It flies to front left 
instead of back left.

To fix that I changed the following in the file RangeFinder.h in the 
AP_RangeFinder library:
line 14
#define AP_RANGEFINDER_ORIENTATION_FRONT_RIGHT   -5, -5,  0
to
#define AP_RANGEFINDER_ORIENTATION_FRONT_RIGHT   -5,  5,  0

After this minor change it worked well.

Original issue reported on code.google.com by janerd...@googlemail.com on 10 Feb 2011 at 3:16

GoogleCodeExporter commented 8 years ago

Original comment by jasonshort on 11 Apr 2011 at 5:55

GoogleCodeExporter commented 8 years ago

Original comment by jasonshort on 8 May 2011 at 7:25

GoogleCodeExporter commented 8 years ago
Just wanted to clarify that this error is in the library, so this also affects 
the latest ACM Code Release. The posted fix has been tested and is working.

There might not be so many with four rangefinders for obstacle avoidance, but 
if you take a look in the code you will see that something is wrong:

#define AP_RANGEFINDER_ORIENTATION_FRONT_RIGHT   -5, -5,  0
#define AP_RANGEFINDER_ORIENTATION_BACK_RIGHT    -5, -5,  0
#define AP_RANGEFINDER_ORIENTATION_BACK_LEFT      5, -5,  0
#define AP_RANGEFINDER_ORIENTATION_FRONT_LEFT     5,  5,  0

==> same mixing for Orientation Front Right and Back Right

Original comment by janerd...@googlemail.com on 8 May 2011 at 8:20