-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Implement support to MAV_CMD commands #21 and #22 #1281
Comments
In mavros side: mavlink/mavros#125, will allow now to TOL in the current GPS position, by reading the GPS coordinates and pushing them to the rospy srv. So offboard side is working, just needs to be supported on firmware side. |
@DrTon Could you chime in here and provide some guidance? |
I assume the behaviour will be similar to when the FCU reads a TOL waypoint, so parsing the command into the loop that controls this process is the way to go, I think. But I'm not really aware how it is implemented and what can be changed so some guidance to what files to change and what to change on those files would be helpful. |
LAND command can be implemented by switching to LAND nav state (but which main state to use in this case? do we need new main state LAND?) TAKEOFF will be more tricky. Which mode we need after takeoff? LOITER or MISSION? The problem is that both modes are intermediate, i.e. they shouldn't have corresponding main state. But then commander must know when to switch from one nav state to another. So let me think more how to do this better. |
I was assuming that land can be issued in every mode (being in Stabilize, POSCTL, LOITER or MISSION).
Sure thing :) I was looking if we can grab this process and move it also for TOL in local positions. This last ones behaviours can be built offboard and control the quad while it is in POSCTL. |
No, LAND and TAKEOFF must not be used only in manual controlled modes (including POSCTL), else we will have conflict between RC and auto action.
Leaving only LOITER or MISSION here: so what? LOITER or MISSION? This is the main question. As I see this: if user switched to MISSION and armed (with RC or GCS) he wants to start mission, so do takeoff immediately and we already do this. If he is in LOITER and armed - vehicle will stay on ground now, but this can be reviewed - if user armed he maybe want vehicle in air, in this case we don't need TAKEOFF command at all :) Could you please provide example of use case for TAKEOFF command. (LAND command is indeed useful as we have no simple one-button way to land vehicle now).
Not sure if I understand you correctly, but POSCTL was not designed for offboard control (i.e. control by offboard computer), but for controlling by human with RC/joystick. You should use OFFBOARD mode for this. |
So you are saying that TAKEOFF can't switch to POSCTL?
I was thinking in this case it can change to LOITER, but this mode needs to allow being armed and get out from the ground, so it can hold position on the coordinates issued.
I wasn't aware that this mode already was implemented. In the RC calibration and mode setup at least I didn't see it there. Can it be configured in a RC channel? By the way, if I change to this mode, will the vehicle enter in position hold and then allow to receive commands from offboard? (like setpoints for position and velocity) Thanks for the feedback! As I said, best I can think off for take-off is then change to POSCTL (which I didn't understand if it's possible or not) and to LOITER, since for MISSION we already can use the waypoint for take-off. |
Exactly. Because it's useless and dangerous, mc_pos_control will do the same if you just move throttle stick full up in POSCTL mode. Why need to complicate things? If you are using POSCTL you MUST use RC/joystick. So why need to takeoff with GCS if you can't control from it anyway.
So if copter will takeoff automatically when arming in LOITER mode, is it ok? I don't see real use case for TAKEOFF command in this case.
Yes, it's implemented but not in qgroundcontrol RC calibration, you have to change parameters manually, look RC_MAP_OFFB_SW parameter. This may be useful: http://pixhawk.org/users/system_modes/mode_switch_config OFFBOARD-related parameters are not documented yet, sorry, so if you will have any questions, create separate issue please, if no - add some docs please :) |
Arming in LOITER mode and then issue a takeoff command to take it off automatically: yes that's what I was thinking about. |
@LorenzMeier I see that you have support for |
This is just to be aware of how I'm going to implement mavlink/mavlink#401 in the loop. Also do I have to get commands to local frames through |
Hi, I would like to implement the multicopter takeoff on firmware side for local navigation, but I have a couple of questions:
|
We have this now. |
Hi,
Right now it's allowed to send, by
mavros
(here: https://github.com/vooon/mavros/blob/master/mavros/src/plugins/command.cpp#L269 and here: https://github.com/vooon/mavros/blob/master/mavros/scripts/mavcmd#L80), commands that useMAV_CMD_NAV_LAND
andMAV_CMD_NAV_TAKEOFF
to respectively land and take-off. Soon, it will also allow to land and take-off on the current GPS position (already working to get take-off/land in local position).They are both working but always get
FCU: command unsupported: 21
orFCU: command unsupported: 22
, since they are not supported in the firmware side.I ask if someone can add support for this commands in the PX4 side or, at least, give some guidance on how to implement them. I'm not really used to the PX4 code structure/API.
Thanks in advance!
The text was updated successfully, but these errors were encountered: