Fwd: Proper way to arm FCU via Mavlink

1,309 views
Skip to first unread message

Vladimir Ermakov

unread,
Oct 8, 2014, 12:22:32 PM10/8/14
to drones-...@googlegroups.com
Hi All,

I need to know how to arm the system.
I send the command #400 - MAV_CMD_COMPONENT_ARM_DISARM with 1.0 (arm) or 0.0 (disarm) in param1.

It works fine with APM:Plane (but actually not needed), but mavros users have issues with arming (e.g. http://answers.ros.org/question/194507/mavros-not-arming-quadcopter/).
Usually returns 3 - MAV_CMD_ACK_ERR_NOT_SUPPORTED and that confuse me.

So i want check how to arm systems and add this to FAQ (or fix code).
Please tell what conditions must be ok to arm systems, APM:Plane, APM:Copter.

With best regards,
Vladimir

Jonathan Challinger

unread,
Oct 8, 2014, 7:23:49 PM10/8/14
to drones-...@googlegroups.com
My suggestion would be to take a look at how the mavproxy "arm" command works... it always does for me.

--
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.

Arthur Benemann

unread,
Oct 8, 2014, 8:36:46 PM10/8/14
to drones-...@googlegroups.com

Vladimir Ermakov

unread,
Oct 9, 2014, 1:44:05 PM10/9/14
to drones-...@googlegroups.com
Thank you all,
I compared the code MAVProxy, DroidPlanner and mavros, and do all the same. In addition to the values ​​target_component: I set fcu id, and not MAV_COMP_ID_SYSTEM_CONTROL, but it does not matter because APM does not check component_id.

https://github.com/mavlink/mavros/blob/master/mavros/src/plugins/command.cpp#L285

четверг, 9 октября 2014 г., 4:36:46 UTC+4 пользователь Arthur Benemann написал:

Lucas Chiesa

unread,
Oct 31, 2014, 4:15:33 PM10/31/14
to drones-...@googlegroups.com
Hi Vladimir,

I'm having the same problem.

Are you using arducopter 3.1.5? I found that it works on arducopter 3.2, but not in 3.1.5.

Were you able to make it work using 3.1.5?

Thank you very much!
Lucas

Vladimir Ermakov

unread,
Nov 2, 2014, 1:51:59 PM11/2/14
to drones-...@googlegroups.com
Hi Lucas,

Actually i use ArduPlane and do not have any copter.
Now the flight season is over and I'm slowly going to prepare for the next.

I think easier is to update firmware when it stabilize, and use hand arm now (RC).


пятница, 31 октября 2014 г., 23:15:33 UTC+3 пользователь Lucas Chiesa написал:

Lucas Chiesa

unread,
Nov 4, 2014, 1:29:17 PM11/4/14
to drones-...@googlegroups.com
Dear Vladimir,

Thanks for the answer! Yesterday we were finally able to arm arducopter 3.1 by changing the target component id when opening mavros. The target component id that worked was 250. For some reason when using 3.2 that value does not seem to make a difference.

Thank you again!
Lucas

--

Charles Goddard

unread,
Nov 12, 2014, 3:44:10 PM11/12/14
to drones-...@googlegroups.com
Hi Vladimir,

I'm not too familiar with your codebase but I managed to kludge together an arm function that works. Here's what I did:


It consistently arms my 3DR Iris, while the regular arm service always fails. It looks like the PX4 firmware might insist the target component must be MAV_COMP_ID_SYSTEM_CONTROL.

I hope this is vaguely helpful!

Best,
Charles

Vladimir Ermakov

unread,
Jan 16, 2015, 4:35:30 AM1/16/15
to drones-...@googlegroups.com
FYU: i just added parameter ~cmd/use_comp_id_system_control
It it enabled, all commands addressed to MAV_COMP_ID_SYSTEM_CONTROL.

среда, 8 октября 2014 г., 20:22:32 UTC+4 пользователь Vladimir Ermakov написал:

Randy Mackay

unread,
Jan 16, 2015, 5:33:27 AM1/16/15
to drones-...@googlegroups.com

 

     I don’t fully understand what we’re getting at here but one common cause of the copter failing to arm is the pre-arm checks.  Try setting the ARMING_CHECK parameter to 0.

              http://copter.ardupilot.com/wiki/prearm_safety_check/

 

 

-Randy

--

Владимир ПроектныйТренинг

unread,
Feb 13, 2015, 10:39:16 AM2/13/15
to drones-...@googlegroups.com
Владимир, хотелось бы с вами пообщаться отдельно по данной теме.
Сообщите свой скайп-ник.
С Уважением, тоже Владимир.

среда, 8 октября 2014 г., 19:22:32 UTC+3 пользователь Vladimir Ermakov написал:

Randy Mackay

unread,
Feb 13, 2015, 7:28:47 PM2/13/15
to drones-...@googlegroups.com

Vladirmir (the first one),

 

      It’s very likely failing because of a pre-arm check failure.  It should have sent a text message to the GCS just before the failure response which has the reason for the failure.  We intend to add a more easily-understood-by-machines error message but haven’t quite got to it yet.  Hopefully that’ll happen for AC3.3.

 

      In the meantime, the “Error Not Supported” nack is misleading and I’ll replace it with “Error Failed”.

 

      Thanks for the report!

 

-Randy

P.S isn’t google translate amazing at least with Russian!

--

Ihor Khomyn

unread,
Dec 4, 2015, 11:11:09 AM12/4/15
to drones-discuss
Hi Charles, I've tried your arm_hack, but still no luck with arming my Pixhawk with PX4 flight stack on it with Mavros. Any ideas where to go next? Thanks.
Reply all
Reply to author
Forward
0 new messages