Hamish has recently built out the dronekit documentation to include some examples on how to control the copter. It’s python but it shows a fair bit of detail on the messages and individual fields that need to be set.
http://python.dronekit.io/guide/copter/guided_mode.html
We also have a dronekit gitter channel: https://gitter.im/diydrones/dronekit-python
-Randy
--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/lpGpfX-P_V4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.
1. if the unit is in guided mode velocity control and I am sending the target global pos int messages, the motion of the copter will be very harsh. Simplest case: vx=vy=vz=0, which should keep the copter is a still position, instead, its motor speeds are not smooth but changing constantly in a wide range, the copter seems to be kind of overreacting to this simple, constant command. What is the way of tuning the guided mode velocity control behaviour to e.g. limit acceleration, etc.? What is the preferred update rate of this command?
Martin, Vasarhelyi,
I noticed this roughness as well recently while working on precision landing and the issue is that the velocity controller’s Z-axis controller is only running at 50hz. I’ve fixed this in master and the change will also be included in the upcoming Copter-3.3.2-rc2 release candidate.
https://github.com/diydrones/ardupilot/commit/c9340dbeb6b697851581109302ea286ad2525c83
https://github.com/diydrones/ardupilot/commit/b2b8dcb8fffa558cf3964304537729ae03ca5584
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of martin...@live.com
Sent: 19-Nov-15 4:42 AM
To: drones-discuss
Subject: [drones-discuss] Re: guided mode velocity control
On Friday, November 13, 2015 at 4:33:50 PM UTC+1, Vásárhelyi Gábor wrote:
1. if the unit is in guided mode velocity control and I am sending the target global pos int messages, the motion of the copter will be very harsh. Simplest case: vx=vy=vz=0, which should keep the copter is a still position, instead, its motor speeds are not smooth but changing constantly in a wide range, the copter seems to be kind of overreacting to this simple, constant command. What is the way of tuning the guided mode velocity control behaviour to e.g. limit acceleration, etc.? What is the preferred update rate of this command?
This is exactly what I have noticed as well when using guided velocity commands. In my case I only noticed it on the Z axis (up/down). Sometimes the copter even did start oscillalting. Which parameter would be the right one to dampen the twitchy altitude controller? If I understand the code right it would be PILOT_VELZ_MAX and PILOT_ACCEL_Z_DEFAULT?
--
Gabor,
Can you be more specific? A dataflash log would be nice too.
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Gábor Vásárhelyi
Sent: 2-Dec-15 12:36 AM
To: drones-discuss
Subject: [drones-discuss] Re: guided mode velocity control
Hello,
--
Hello Randy!Is there a chance that you will look into the log I uploaded a while ago? I have not have much flights since than but the z-axis guided mode velocity control remained and unsolved issue for me ( I wonder whether it is for me alone or others are trying this feature as well with/without success). Thanks, Gabor
I’m pretty sure this is all fixed in master and in Copter-3.3.3-rc2 as of end-of-Jan. Here’s the link the release notes item for this:
https://github.com/diydrones/ardupilot/blob/master/ArduCopter/ReleaseNotes.txt#L5
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Gábor Vásárhelyi
Sent: 18-Feb-16 6:19 AM
To: drones-discuss
Subject: [drones-discuss] Re: guided mode velocity control
--
Gabor,
Really sorry for missing your emails. I’ll try and repond quicker from now on. You can also try asking in our Gitter chat.
https://gitter.im/diydrones/ardupilot
In any case, so I had a look at some logs from you from Dec 12th (using Copter-3.3.2) and I see that the climb rate is very low (see ClimbRate.png). Also the DAlt (Desired Alt) is below the Alt (actual alt) which is quiet odd actually. I’ve gone so far as to reproduce the issue in SITL with Copter-3.3.2 (see sitl-ac332.png) but the good news is that this is fixed in Copter-3.3.3 (see sitl-ac333.png).
Copter-3.3.3 went out as the official version a few days ago so if you upgrade you should be fine.
If it’s not fine, could you provide a new log?
As a side note, the THR_MID parameter is a bit high. It’s 700 but from looking at the CTUN.ThrOut message it should be about 540 (it doesn’t need to be perfect). This wouldn’t cause the problem you’re seeing though. This would simply lead to the vehicle climbing when you switch to a manual flight mode (like Stabilize).
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Gábor Vásárhelyi
Sent: 3-Mar-16 12:00 AM
To: drones-discuss
Subject: [drones-discuss] Re: guided mode velocity control
Dear Randy!
--
Gabor,
Also re your other questions.
· Velocity requests should be sent from the companion computer at least once every 3 seconds or it will timeout. https://github.com/diydrones/ardupilot/blob/master/ArduCopter/control_guided.cpp#L13
· The freeze-z and freeze-xy features in the velocity controller are just there to get rid of twitches when new velocity commands arrive. The only way I can imagine this could cause a problem is if the velocity commands are being sent from the companion computer at a very high rate (i.e. 50hz). Even then I’m not sure it would be a problem, we simply haven’t tested sending at such a high rate.
-Randy
From: Randy Mackay [mailto:rmac...@yahoo.com]
Sent: 3-Mar-16 9:22 AM
To: 'drones-...@googlegroups.com'
Subject: RE: [drones-discuss] Re: guided mode velocity control
Gabor,
Really sorry for missing your emails. I’ll try and repond quicker from now on. You can also try asking in our Gitter chat.
https://gitter.im/diydrones/ardupilot
In any case, so I had a look at some logs from you from Dec 12th (using Copter-3.3.2) and I see that the climb rate is very low (see ClimbRate.png). Also the DAlt (Desired Alt) is below the Alt (actual alt) which is quiet odd actually. I’ve gone so far as to reproduce the issue in SITL with Copter-3.3.2 (see sitl-ac332.png) but the good news is that this is fixed in Copter-3.3.3 (see sitl-ac333.png).
Copter-3.3.3 went out as the official version a few days ago so if you upgrade you should be fine.
If it’s not fine, could you provide a new log?
As a side note, the THR_MID parameter is a bit high. It’s 700 but from looking at the CTUN.ThrOut message it should be about 540 (it doesn’t need to be perfect). This wouldn’t cause the problem you’re seeing though. This would simply lead to the vehicle climbing when you switch to a manual flight mode (like Stabilize).
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Gábor Vásárhelyi
Sent: 3-Mar-16 12:00 AM
To: drones-discuss
Subject: [drones-discuss] Re: guided mode velocity control
Dear Randy!
--
Ah, excellent news! So happy.
By the way, we’re trying to get some companion computer images created for common platforms like RPI2, TX1. I hope in the future that that will help people get started more quickly with the kind of advanced stuff you (and others) are doing.
Anyway, best of luck!
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Gábor Vásárhelyi
Sent: 17-Mar-16 10:47 AM
To: drones-discuss
Subject: [drones-discuss] Re: guided mode velocity control
Dear Randy!
--