-
Notifications
You must be signed in to change notification settings - Fork 13.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: circle mode for multicopters #6306
Conversation
I have a question about the general structure. I have also implemented a smoothing for waypoints in the position controller because with the current structure it is the most obvious thing to do (the feature is not in master). However, I did not really like to put that stuff into the position controller, since it just adds more complexity to that class. Therefore, I was wondering if we could try to avoid adding more and more features to the position controller, but rather start a new class or classes which are called before the position controller and map the inputs to desired position setpoints. |
That sounds good to me. These monster classes are hard to navigate. |
@dagar: |
@dagar I even tried make submodules clean and git clean -dfx . Nothing helps. |
Since the continuous integration is passing here you did not check out this branch. Make sure git status is not showing any stale sub modules. |
@LorenzMeier I cloned the latest master. Then ran the below commands before building the code. git fetch origin pull/6306/head:pr-6306 malte@malte-Latitude-E6400:~/orbit/src/Firmware$ git status
no changes added to commit (use "git add" and/or "git commit -a") |
Yep. That status output looks wrong. It should have catched it on building automatically, but what you need to do is |
@LorenzMeier Thanx! Tat worked. |
Right now the orbit button in QGC switches to hold first. Do you know how to build QGC? Otherwise I could make this accessible via px4 command line. |
@dagar Yes. I have been building qGC from source. But I'm not using the latest code. The orbit button does switch to hold. But what is the expected behaviour? It just seems to hold the altitude and nothing else. |
bd1cab8
to
e40080d
Compare
@aysh-shariff I updated commander so you can switch to orbit from the px4 command line.
I'll update QGC once the firmware side settles. |
Do people want multicopter orbiting in a mission context? We could do it with loiters that have a radius set. |
@dagar I couldn't test it. I fly the UAV in Mission mode and then switch to Circle from the command line. But the command gets rejected. |
Did you update the branch? I amended the commit and rebased on master, so you might be out of sync.
|
@dagar pxh> commander takeoff pxh>
|
I'm pretty sure it's your local branch not matching the upstream version. Did you try the reset described above? Or you could just do a fresh clone. |
@dagar I did follow all the steps you mentioned. |
e40080d
to
0f5b4cb
Compare
@aysh-shariff so it seems to be a bit stubborn getting into position control circle mode the way I hacked the change via commander. Update the branch again and try asking twice.
It's still going to give the wrong error, but I can fix it later. |
@dagar This command puts the drone in Position mode and causes it to land. |
Position control mode needs manual input (gamepad, onscreen sticks, etc) and the throttle needs to be in the middle to maintain altitude, |
@dagar Ok. So this needs to be tested in HITL ? I am having issues testing this in jmavsim HITL. Pixhawk led blinks purple and HITL fails. |
No, not necessarily. You just need manual control from some source. In SITL this could be QGC and a gamepad/joystick or the on screen thumbsticks. |
@dagar I could finally test this. I came across how Circle Mode works in Ardupilot. I guess it would be nice to be able to set the circle radius in qGC, and have min and max radius parameters . I am intending to use this mode when I use a camera on my UAV to get good 360° videos. Also, will this mode be available only through qGC? |
I think the next piece that's missing for more testing is the QGC side. |
0f5b4cb
to
05d6672
Compare
@aysh-shariff I've resolved the conflicts and rebased. I'll push a QGC test branch with better orbit support shortly and link to the binary. |
Issues
@aysh-shariff QGC here https://s3-us-west-2.amazonaws.com/qgroundcontrol/builds/orbit/QGroundControl.AppImage I don't really have good answers to some of the outstanding design issues. What should be controllable from RC and from QGC, should it work as an AUTO mode, what the sticks should do. If someone would like to take the lead on figuring out these parts I'm happy to help finish this off, but otherwise this isn't really solving a problem I have, so it's hard to know what's wanted. |
Considering redoing this from scratch using ecl L1. |
@dagar On the RC/position control mode side
On the QGC/mission mode side
Param 1 = Turns So there can be two separate sub-modes of position control, one being the mission item and one being the RC controlled version. But I think implementing the mission item would be much more useful given the fact that this is functionality which would be mostly used outdoors, and with GPS. Sorry if any of this sounds stupid or if anyone has already said all these, just trying to be useful :) |
Thanks @deksprime, that's very helpful. I'm interested in implementing this, but as I don't actually use multicopters for filming I didn't want to create something useless. My thought was if I structure the code properly we'll be able to get multicopter loiter with radius as part of missions for free. I also haven't figured out how we can get into and leave position control submodes entirely from a transmitter. |
We should discuss on the dev call. Rather than solving circle one-off I think we need a trajectory / task interface that allows to define curves and how sticks map to them. |
Sounds good to me. |
Any plans to implement this in the most basic way? (e.g. center position + radius, forward flight) |
Yes, this is going to be done within the new FlightTasks architecture. @MaEtUgR FYI |
@dagar Yes thanks, I'm currently bringing it up to good usability level here: #9434 |
#4792 continued
TODO
@aysh-shariff this is functional, but needs some work. I wouldn't test it outside of a simulator quite yet.
@Tumbili FYI