7

Even very small errors can bother the balancing. Small errors such as: Weight of the quadcopter is unbalanced. One motor is rotating faster/slower than others due to manufacturing or your power-source. Air resistance and wind. Unbalanced propellers due to manufacturing. Strong magnetic forces. You simple can not send the same motor speed to all motors ...


4

I read the code but it looks like it is for the first attempt where you tried to hover "open loop" that can't work. So now you tried a PID control based straight off the raw IMU data. Tha't better but you are going to need one more step between the two. Will I say this assuming you are using a low-cost IMU, the kind that just breaks out the chip. ...


4

Quadcopter is inherently unstable system. So you have to apply some feedback controller (eg. PID) to keep it airborne. Even if you apply some basic PID using angular rates and angles, you still have to provide manual correction for drift till PID gains are perfectly set. So using radio control for manual control is really helpful during initial development ...


4

I understand a new Ardupilot was released recently. I am not familiar with it, so if that's the device you have then this answer may not be helpful. With that said I have done something similar to what you are doing with the Ardupilot Mega. Specifically I wrote a node in ROS to control a quadrotor and read its state. The Ardupilot uses a fairly simple ...


4

Technically, you can do it either way, but consider the following scenario: You are flying with a heavy load, and there is a wind gust. Each rotor is operating at almost 100% capacity due to the heavy load. Now the wind gust has gotten you un-level. Say you need 20% of full speed to make the correction. What happens? Well, if you are trying to control level ...


4

There are a couple libraries for doing what you want to to, the first is pyMAVlink and the second is dronekit-python it is going to be easiest to use dronekit as it handles a lot of the lower level stuff like processing incoming packets and connecting over your preferred interface for you automatically. I assume you want to load waypoints from a file and ...


3

If you carefully go through Ardupilot code, you will find all the mavlink communication related function are put in file GCS_Mavlink.pde. If you wish to receive particular message you will have to look into and modify this file. Mavlink message attitude(#30) is handled in this function within ardupliot. So you will have to modify and the ardupilot code and ...


3

You should start with http://dev.ardupilot.com/ You can find articles that will make you familarize with code. Alternatively you can look at Aeroquad(https://github.com/AeroQuad/AeroQuad) which runs quadcopter on Arduino


3

To get the sensor data you need: First to write a MAV_DATA_STREAM_EXTRA1 message to the arduCopter. This message tells it to send out the sensor data (and at what rate it should do that). (BTW - this message relates to yaw/pitch/roll data only). Then you read the relevant data message (in this case MAVLINK_MSG_ID_ATTITUDE) and decode the relevant sensor ...


3

This answer is incorrect (TaW) It is based on IMU noise that's about 1000 times faster than it really is, based on a typo in the discussion following the original question. I'm not a big fan of the Ziegler-Nichols method. It's an ad-hoc method that is not only not guaranteed to stabilize all plants, it comes with a guarantee that there will be some plants ...


2

Turns out it's implemented in https://github.com/mavlink/mavlink/blob/master/pymavlink/tools/mavparms.py and the relevant code is: m = mlog.recv_match(type='PARAM_VALUE')


2

Telemetry is used to get in-flight data back to a ground station. For example, attitude (roll, pitch, yaw), altitude, GPS position, speed, battery voltages. It just gives you more feedback. It can also be used to alert you when battery levels are too low or when a fault occurs.


2

MAVLink is an encoded message. In order for you to get specific data out of it you will need to decode it in some way. There are a number of ways of doing this including writing your own code and attaching MAVlink to it. This is described here: http://qgroundcontrol.org/dev/mavlink_onboard_integration_tutorial. In order to use this you will have to have ...


2

I can see several mistakes in your approach. The biggest red flag for me is that you are treating the motors as individually-controlled PIDs when in fact they need to work in pairs. I'm talking about this line that you posted: motor1.write((int)(val + (kP * pError1) +(kI * iError1) +(kD * dError1))); //front left The output of your PID should be the ...


2

I thought for sure that there would have been a duplicate question somewhere on the site that answers this question, but I can't find one, so here's a quick description of the method. Put your IMU in a known starting position and orientation (position + orientation = "pose"). Capture IMU accelerometer and gyroscope readings. Use numeric integration on the ...


2

I would not attempt to power the Pi directly from the flight controller. The last thing you want is to have unexpected power demands crash your vehicle. The easiest solution is probably to grab a 5v BEC (if you don't already have a regulated 5v supply available from one of your ESCs or from your power distribution board) and wire that to the appropriate ...


2

Firstly, you may be confusing ArduPilot/ArduCopter software with the ArduPilot Mega (APM) hardware platform. ArduPilot/ArduCopter is indeed a great piece of software and is still maintained. The ArduPilot Mega (APM) has been discontinued, and as such, has very limited support and development. Regardless of that, I looked into this whole issue, of which ...


1

Macros(_MAV_RETURN_??) for uin8_t, int8_t and char are defined at https://github.com/diydrones/ardupilot/blob/master/libraries/GCS_MAVLink/include/mavlink/v1.0/protocol.h#L236 onwoards. However for datatype with more that 8 bits, they have written inline function _MAV_RETURN_## using 'Token Pasting Operator' which handles rest 16bit, 32bit and 64bit ...


1

The best way to achieve this would be with RC channel pass through, you can configure any channel from 7-14 for RC passthrough (technically you can configure lower channels for this but this can cause weird things to happen as they might be sharing your pitch/roll/yaw/throttle/mode setting) You can then read in the servo value on the arduino with the pulseIn ...


1

You don't need to send any mavlink message. You can simply change the parameter SR1_EXTRA_1 to desired Attitude data rate and your data rate will be changed. Similarly you can change other parameter to change data rate of other messages. More information of messages can be found at https://github.com/ArduPilot/ardupilot/blob/master/ArduCopter/GCS_Mavlink.cpp#...


1

For hours I've been dealing with this and no one has documented the same issue online. I tried the following with no success: Changed permissions of parent folder /var/folders/r4/s_j4c02s3wvcx6wy41__rnwh0000gp/T Ran APM as sudo Multiple versions of APM Multiple operating systems I had to get a bit creative to come up with a workable solution: Solution When ...


1

The 3DR radios by default use 57600 baud, be sure that it is set properly on both the sending and receiving side, this has been the source of many problems for me.


1

Sorry, I'm not sure exactly what your code is doing but generally speaking ... Instead of trying to control using the accelerometer directly, it is usually better to estimate velocity and control using that (as the D part of your PID controller). If you're willing to dig into the math, the most common way to do this is to combine the barometer and ...


1

I have done something similar to this. I used a Samsung Galaxy onboard an APM2.6-based quadcopter. As a starting point, I used DroidPlanner and it was a pretty simple matter to use the same libraries it does. Then I used another Galaxy with a screen-mirroring application over wifi to run the app. It's good that you realize the importance of keeping RC ...


1

Is it always the same side that topples? If so, one obvious thing to try to eliminate the possibility that one of your motors is faulty, is to simply switch motor positions and see if the side that topples changes.


1

You can use least square approach and solve this problem using Gauss-Newton method. Following blog post sums it up very well. http://chionophilous.wordpress.com/2011/08/26/accelerometer-calibration-iii-improving-accuracy-with-least-squares-and-the-gauss-newton-method/


1

Yes, there is programmatic interface. Like many autopilot systems the Ardupilot uses a protocol called Mavlink. It allows for both sending commands and receiving telemetry data. It also allows for managing the data that is sent to the ground control system to avoid overburdening ones communication link. There is support for Mavlink in C and python as well as ...


1

have a look to my Java Mavlink Library : https://code.google.com/p/mavlinkjava/ It can be used on Android, Windows, Linux and Java RT JVM from IS2T. Guillaume


1

From what I understand, this telemetry kit uses Mavlink as a protocol for data transfer and unless I follow the specific header, footer, data etc format for Mavlink, I will invariably end up with gibberish on my hyperterminal. This means in order to read and modify the telemetry data, I'd have to develop a Mavlink engine from scratch, right? I would like to ...


1

Well, I'll be darned. A serial number shows up in dmesg when you plug the thing in. I checked two boards that the number was different, so hopefully these are globally unique. me@mycompy:~/arducopter/MissionPlanner$ dmesg|tail ...


Only top voted, non community-wiki answers of a minimum length are eligible