QuadCopters

jaromrax
Phidgetly
Posts: 23
Joined: Wed May 21, 2008 11:10 am

Re: QuadCopters

Postby jaromrax » Mon Jul 25, 2011 6:11 am

Hi,
this looks quite nice. Just before finding this thread, I was thinking about how to construct the UAV with phidgets. My idea was than rather copying ar.drone (vehicle+smartphone-iface), I wouldcreate a core - high priority code in SBC, that keeps the vehicle stable in the air and protects it from crash when battery is low. And then a second (user) layer, that can translate commands and navigate the drone around our planet. And the general communication layer could benefit from other projects (3g,?).
Very nice, anyway. And not an easy job. e.g. I have 3 usb's on sbc1 and I can observe random 'disconnects/reconnects' of the 8/8/8 part of the board. And the reading from the ultrasound sensor is not always correct. And you face many more problems...
I follow this thread. I am really interested.
jaromir

RBBM wrote:Hi

finally our gimbal-mount is done and ready for testing. Check it out at http://www.robobuam.de -> Projekt Robodrohne.

Greetings from Lower Bavaria
Michael (RBBM)

RBBT
Phidgeteer!
Posts: 90
Joined: Sun Nov 15, 2009 2:16 pm
Location: Lower Bavaria (Germany)
Contact:

Re: QuadCopters

Postby RBBT » Tue Jul 26, 2011 12:37 am

Hi,
thank you for your interest, but unfortunately
we have less time to work on our project, so please be patient.

We don't have such random disconnects, and our sonar sensor works fine.

The major problem for us is the strange behavior and
instability of the TCP/IP stack on the SBC. Generally, processing
large amounts of data freezes the SBC, or at least the TCP/IP stack.
For implementing a low pass filter
we had to collect data from the PhidgetSpatial 3/3/3. At first we tried
to write this data on disk locally on the SBC, but after a few kilobytes
(less than 1 MB) the SBC freezes. So we decided to send this data over
the network to our transmitter app on a Win XP Laptop - the same behavior.
The solution was to slice this data in small pieces and send each piece
with a delay over the network.

The SBC also (but not always) freezes if we invoke Java's garbage collector.
Under these circumstances is a remote-controlled flying very critical.

We have decided to mount RoboDrohne into an gimbal frame which helps us to
develop an autopilot that has the ability to stabilize RoboDrohne if the
network connection makes "problems".

We have also discussed a replacement for the SBC:
1st solution: Buying the newer SBC2.
2nd solution: Buying a Trim-Slice http://trimslice.com/web/

Another work in progress is the replacement of our "old" software stack
which we use in our project Elwood. RBBM has developed an Android application
with which we can control Elwood with an HTC Desire. Android and our software
doesn't work well together, so we decided to reimplement the whole software
to make it "future proof". The idea ist to write the software for remote
controlling in any language (Android, Objective C,...), and the receiver
software on the vehicle remains the same.

There is much to do....
Best Regards from Lower Bavaria
RBBT
http://www.robobuam.de/

jaromrax
Phidgetly
Posts: 23
Joined: Wed May 21, 2008 11:10 am

Re: QuadCopters

Postby jaromrax » Tue Jul 26, 2011 3:52 am

Hi,
the time is always a problem. I would like to help you somehow,
but unfortunately, I have zero experience with java. I could try
to play with my sbc1 (no accelerometer still), but in pure c.
Just to remark- my experiences with gcc on sbc1 are only the best.
I have created a multithreaded code that communicates to the other
usb devices and terminal, and it is rock stable (I hope:) ) despite its complexity.
Maybe, at some moment, you decide to give a try to gcc for
the "internal stabilization" code. And it may communicate with
the other programs using tcp... I am thinking about ordering an accelerometer....


One question - maybe you reach some memory limit and it starts
to swap (which is deadly especialy in this case)? Few hundred kB is
nothing, but RAM is not large here.

Next thing - fft (or whatever filtering) is very consuming and with it you can also remove a good signal. My guess is that it worth to play a lot with the mount so that you do not transfer the vibrations. From putting the motors into a special holders to mounting the accelerometer on some suspension system. You can imagine, that changing the thickness/length/material of a holder rod will remove part of frequency spectrum.

Cheer up!
Jaromir

RBBT wrote:Hi,
thank you for your interest, but unfortunately
we have less time to work on our project, so please be patient.

We don't have such random disconnects, and our sonar sensor works fine.

The major problem for us is the strange behavior and
instability of the TCP/IP stack on the SBC. Generally, processing
large amounts of data freezes the SBC, or at least the TCP/IP stack.
For implementing a low pass filter
we had to collect data from the PhidgetSpatial 3/3/3. At first we tried
to write this data on disk locally on the SBC, but after a few kilobytes
(less than 1 MB) the SBC freezes. So we decided to send this data over
the network to our transmitter app on a Win XP Laptop - the same behavior.
The solution was to slice this data in small pieces and send each piece
with a delay over the network.

The SBC also (but not always) freezes if we invoke Java's garbage collector.
Under these circumstances is a remote-controlled flying very critical.

We have decided to mount RoboDrohne into an gimbal frame which helps us to
develop an autopilot that has the ability to stabilize RoboDrohne if the
network connection makes "problems".

We have also discussed a replacement for the SBC:
1st solution: Buying the newer SBC2.
2nd solution: Buying a Trim-Slice http://trimslice.com/web/

Another work in progress is the replacement of our "old" software stack
which we use in our project Elwood. RBBM has developed an Android application
with which we can control Elwood with an HTC Desire. Android and our software
doesn't work well together, so we decided to reimplement the whole software
to make it "future proof". The idea ist to write the software for remote
controlling in any language (Android, Objective C,...), and the receiver
software on the vehicle remains the same.

There is much to do....

RBBT
Phidgeteer!
Posts: 90
Joined: Sun Nov 15, 2009 2:16 pm
Location: Lower Bavaria (Germany)
Contact:

Re: QuadCopters

Postby RBBT » Tue Jul 26, 2011 5:53 am

The virtual machine doesn't swap (gc'ing) for 12 - 15 minutes,
because of its startup properties. We give them 32 MB (or so) space
for running our application. This means that after a maximum of 12 - 15 minutes
the gc starts and blocks the whole application for 300 millis (estimated).
JamVM's gc is an Stop-the-world collector. Before it executes,
RoboDrohne has to land. But this is not the problem, because after this time
the battery is empty.

To solve the vibration problems, one solution can be the separation
of our battery pack from the airframe and mounting it via vibration absorber
onto it. The PhidgetSpatial shold then be mounted onto the
battery pack. But at first we have to implement a good stabilisation
algorithm.
Best Regards from Lower Bavaria
RBBT
http://www.robobuam.de/

jaromrax
Phidgetly
Posts: 23
Joined: Wed May 21, 2008 11:10 am

Re: QuadCopters

Postby jaromrax » Tue Aug 30, 2011 5:57 am

I have seen elsewhere, that people spent time when tuning (equilibrating) the propellers to remove vibrations.

RBBM
Phidgetly
Posts: 19
Joined: Mon Nov 23, 2009 6:03 am
Contact:

Re: QuadCopters

Postby RBBM » Thu Sep 01, 2011 3:55 am

Hi

to be honest, we do not have a big problem with vibrations as we filter our incoming data with a low-pass filter. The more severe problem is that the electronics we use, namely the PhidgetServo in combination with the motor controllers react with a delay. This delay is so huge (around 500ms) that it is not possible to stabilize the RoboDrohne. So we decided to suspend this project. We will focus on refurbishing our software and find ways to get a grip on the delay problem.
Meanwhile we test the new software on Elwood and keep you informed on our homepage www.robobuam.de.

Greetings from Lower Bavaria
Michael (RBBM)

danielaaroe
Phidgetsian
Posts: 9
Joined: Mon May 03, 2010 1:30 pm
Contact:

Re: QuadCopters

Postby danielaaroe » Tue Nov 08, 2011 3:21 pm

I'm working on a very similar project and a heads up for issues that might come at a later stage would be really appriciated.

Have you tried using the Kalman filter for IMU sensor fusing ? What kind of control algorithm are you using for stabilizing the quad?

Most brushless regulators react with a time-delay, so a different type of regulator might help limit your issue with the delay. Also, using a more complex IMU data filter(such as the Kalman or maybe even a complimentary) might also help reduce the time delay(compared to a moving average filter, as I understand you are using now(?)).

Good luck finishing up the project when you get your issues sorted. Its a really exiting project.

Thanks in advance for any heads up's.


Danielaaroe

jaromrax
Phidgetly
Posts: 23
Joined: Wed May 21, 2008 11:10 am

Re: QuadCopters

Postby jaromrax » Wed Nov 09, 2011 1:59 am

danielaaroe wrote:I'm working on a very similar project and a heads up for issues that might come at a later stage would be really appriciated.

Have you tried using the Kalman filter for IMU sensor fusing ? What kind of control algorithm are you using for stabilizing the quad?

Most brushless regulators react with a time-delay, so a different type of regulator might help limit your issue with the delay. Also, using a more complex IMU data filter(such as the Kalman or maybe even a complimentary) might also help reduce the time delay(compared to a moving average filter, as I understand you are using now(?)).

Good luck finishing up the project when you get your issues sorted. Its a really exiting project.

Thanks in advance for any heads up's.


Danielaaroe


Hi,
since last time, I was prospecting a bit and I have found that many copters fly on arduino and the source is open - there you can find if some filtering is usually used or not. People, I saw, pay a big attention to centering the propelers to decrease vibrations. However, as far as I know, this project is probably on hold now :(... But I am a big fan of it's resurection. I dont know if using C instead of java could help with some issues...

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: QuadCopters

Postby Patrick » Wed Nov 09, 2011 10:29 am

Using C should help with latency, but there is still the problem of data only being delivered even 8ms from the USB device. Then there is the latency of the USB subsystem, and the kernel-userspace transition, though the library, into your application. Linux is not a real-time system. The data from the sensor is timestamped, but it's hard to predict how long it will take for that data to arrive. Java will make things even worse, as the event now has to pass through JNI into the JVM.

Arduino connected to an IMU via SPI or some other bus is going to have a lot lower latency.

I still think with a smart Kalman filter and code written in C, that this should be very possible.

-Patrick

danielaaroe
Phidgetsian
Posts: 9
Joined: Mon May 03, 2010 1:30 pm
Contact:

Re: QuadCopters

Postby danielaaroe » Wed Nov 09, 2011 1:10 pm

I used the arduino earlier for this purpose(to do the complete operation of controlling a quad), but before I tested the quad(or even finished up the programming) I decided to test the algorithms I had written on a reversed pendulum balancing robot(to avoid the costs of crashing the quad). The limitations of the small processor is rather annoying, and in the struggle of doing my calculations in such a way that the floating point numbers wouldn give me problems, I decided to try something else, which would be the PhidgetSBC2. So, I can tell you now, the grass isnt greener on the arduino side. Or maybe it is, who knows.

That said, quite a few people have managed to use the arduino controlling quads, but it seems many of them have only modified a fewer number of peoples code.

The arduino forum is a great place to look if you need algorithms. I have coded a simple kalman filter(from tom pyckes tutorial on kalman) in Arduino language (and in plain equations) and have it laying around the HD somewhere. If you want it, PM me and I'll try and find it.

some more brackets()()()()()()()()()

and some more ()()()()()

Daniel


Return to “Robotics”

Who is online

Users browsing this forum: No registered users and 1 guest