[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4792: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4793: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
AutoQuad Forum • View topic - Object Avoidance with AQ

Object Avoidance with AQ

For everything that doesn't fit into the other (sub-) forums

Object Avoidance with AQ

Postby afernan » Mon May 04, 2015 10:17 am

I´m starting a project to implement a simple Object Avoidance on AQ using this promising Laser system "LIDAR-Lite" (Light Detector and Ranging) https://www.sparkfun.com/products/13167

Other projects like APM have already implemented this system (http://copter.ardupilot.com/wiki/common ... e/?lang=es)

To simplify the implementation (for me), the first step will be to add an independent sysbystem in between the Rx and the AQ control board that will read the LIDAR signal and manipulate the Pitch/Roll signal before inyecting to FC board. The idea is replicate what your eyes/fingers do when flying in front of a wall.

This intermediate subsystem is based on an ARDUINO-UNO board, and a servo for tilting the LIDAR 180º as an scanner - RADAR way. The code will add-remove PWM values to the Pitch/Roll signal received from the Tx in base of what LIDAR "see" around it. If none obstacle in front, no signal modification.

A second step will be a full itegration inside AQ code using the I2C inteface available.

Comments and ideas are wellcome

Angel
Attachments
1.JPG
LIDAR lite.jpg
LIDAR lite.jpg (57.3 KiB) Viewed 15126 times
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: Object Avoidance with AQ

Postby aBUGSworstnightmare » Mon May 04, 2015 1:50 pm

Hi Angel,
I had also looked into LIDAR. I think it's a better idea to use a Teensy 3.1 instead of an Arduino. This would allow you to use CAN later (and gives you more processing power for future updates.)
Joerg
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Object Avoidance with AQ

Postby Max » Mon May 04, 2015 3:09 pm

Sounds like an interesting project, Angel. +1 for Teensy. 'Been working with one lately, like it. Can even do hardware debugging, and fairly easy to dump the Arduino libraries baggage if need be.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Object Avoidance with AQ

Postby HeliHenkie » Mon May 04, 2015 6:22 pm

Hi Angel,

I don't know if this information is relevant for your project, but the ArduPilot community encounters problems when using I2C communication and the Lidar Lite sensor. The sensor often locks up when using the I2C interface. Especially when more than one sensor uses the I2C bus. A definitive solution has yet to be found. A thread about this subject can be found with the following link:

https://groups.google.com/forum/#!topic ... BVeykPoZBk[1-25]

To bypass this problem the ArduPilot software uses a PWM driver. This solution seems to be stable.

Good luck with your attempt!

Best regards,

Jan Willem
The Netherlands
HeliHenkie
 
Posts: 93
Joined: Wed Oct 24, 2012 5:33 pm

Re: Object Avoidance with AQ

Postby afernan » Tue May 05, 2015 7:22 am

@Jan: yes I saw that advise in the APM-Lidar wiki ("for LIDAR manufactured prior to Feb´15 there are I2C interface communications issues. When using these versions use the PWM alternative.". Thanks anyway.

@Max, Joerg: Didn´t know Teensy 3.1 but it looks a better solution (more powerfull, smaller, cheaper...) so I´ll try that. In fact I´ll try both since I have already Arduino.

Angel
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: Object Avoidance with AQ

Postby srinath » Fri May 15, 2015 7:43 am

Does the sensor give you bearing(relative yaw) and range. I don't think so.
If you get only range measurements, it might be necessary to yaw the Lidar Lite, so that you can get an idea of where the obstacle is, not just distance.

This site has the Arduino code you will need https://github.com/PulsedLight3D/LIDARLite_StateMachine

If you plan to yaw the sensor to get bearing information, maybe a narrow FOV is good to get an accurate bearing reading. Of course your readings will only be as fast as the rate at which you yaw the sensor.

One way of autonomous navigation+obstacle avoidance is to proceed fast till you see an obstacle at say 10 mtrs away from you. After which you reduce your speed, switch to a narrow beam(is that possible) and yaw from side to side it you locate exactly where the obstacle is. Then you maneuver around it

Maybe the 'ideal' board for this is the PDB. Would be nice to have multiple sensors connected to the PDB and AQ.
You could have various sensors communicating with PDB, through interfaces like i2c, spi, serial etc. It would then collate all the information, do some processing and send relevant information to AQ via CAN.
srinath
 
Posts: 1028
Joined: Mon Jun 25, 2012 5:47 pm

Re: Object Avoidance with AQ

Postby afernan » Fri May 22, 2015 11:55 pm

I´ve just succesfully completed the implementation step 1, using an intermediate ARDUINO UNO board to connect the LIDAR-Lite to AQ fc.

Flight results are very good after tunning of some parameters.

I´ve used the I2C library from 'Arduino I2C Master Library' from DSS Circuits: http://www.dsscircuits.com/index.php/ar ... er-library . It works much better than "wire" standard ARDUINO library. Attached is the code i´ve used.

The setup for this first test is very simple: LIDAR is fixed just in front of the copter.

Next step is to implement LIDAR using Teensy 3.1 instead of ARDUINO UNO. A setup radar type (paning left right) will be implemented to cover about 90º area in front. Finally I´ll try the implementation in the AQ code.

See how it performs here: https://www.youtube.com/watch?v=o7eLfZGucbo


Enjoy
Angel
Attachments
DSC_0036.JPG
DSC_0037.JPG
DSC_0038.JPG
DSC_0039.JPG
1.JPG
AQOA_V2.zip
(1.59 KiB) Downloaded 704 times
Last edited by afernan on Sat May 23, 2015 5:37 pm, edited 1 time in total.
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: Object Avoidance with AQ

Postby srinath » Sat May 23, 2015 3:36 am

Hi Angel

Very impressive. How do you communicate from Arduino/Teensy to AQ?

What's the logic for generating the pitch commands?

How do you override the pilot/nav commands in AQ?
srinath
 
Posts: 1028
Joined: Mon Jun 25, 2012 5:47 pm

Re: Object Avoidance with AQ

Postby kinderkram » Sat May 23, 2015 9:26 am

Cool stuff, Angel! 8-)

Besides the "follow me" we now have a "chase it" mode.
What´s that outtake at the end? The quad seems to try to hug the tree instead of avoiding it. :D
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: Object Avoidance with AQ

Postby afernan » Sat May 23, 2015 9:44 am

afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron