Open anuppari opened 7 years ago
Duplicated of #333. You are welcomed to make a PR with what that feature to be reviewed.
This is not a duplicate of #333, this is the opposite. #333 asks to shutdown the OBC from the FCU (or GCS), this issue is to shutdown the FCU from the OBC. Please reopen.
Sorry misunderstood. Still, you are welcomed to add the support. We will gladly review it.
@anuppari any updates on this? Have you tried to implement the feature already?
I'm pretty sure that all what you need is call COMMAND_LONG with desired cmd code, so you may use ~cmd/long
service to do that.
@anuppari MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN
is the command code you want, having parameter 1 set to 1. You can create a script for that (PR welcomed) or you can use raw cmd/long
srv as @vooon stated to that same purpose.
Thanks for the info. How can I access the mavlink enumerations (is there a mavros header that defines these)? Or do I just have to hardcode the value (e.g., 246)?
MAVROS uses the enumerations defined on the Mavlink msg definitions supported on the Mavlink ROS package
Is this feature already available?
Is this feature already available?
No.
I am using PX4 simulator in gazebo. rosservice call /mavros/cmd/command "{broadcast: false, command: 246, confirmation: 0, param1: 2, param2: 0.0, param3: 0.0, param4: 0.0, param5: 0.0, param6: 0.0, param7: 0.0}" seems to shut PX4 down with success: True.
However, the service call below returns success: False, result: 2 and does not reboot PX4. rosservice call /mavros/cmd/command "{broadcast: false, command: 246, confirmation: 0, param1: 1, param2: 0.0, param3: 0.0, param4: 0.0, param5: 0.0, param6: 0.0, param7: 0.0}".
Is there anything I am missing? What are broadcast and confirmation variables used for inside the mavros_msgs/CommandLong.srv? Thanks in advance!
@shakeebbb thanks for the tip. That flight controller reboot rosservice call works fine on ArduPilot.
Currently there is no way to signal a reboot of the FCU if e.g., some parameters are changed or there is a bad boot. This feature is available in QGC, so presumably it can be done through mavlink?
MAVROS version and platform
Mavros: 0.19 ROS: Kinetic Ubuntu: 16.04