Skip to content
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

Ardusub command MAV_CMD_DO_SET_MODE is unsupported #33

Closed
enderocean opened this issue Feb 21, 2021 · 4 comments
Closed

Ardusub command MAV_CMD_DO_SET_MODE is unsupported #33

enderocean opened this issue Feb 21, 2021 · 4 comments

Comments

@enderocean
Copy link

Hi,
Below message is submitted on "0.0.0.0:8088/mavlink" URL and works well using SITL autotest tool

msg.payload = {
      "header": {
        "system_id": 1,
        "component_id": 1,
        "sequence": 0
      },
      "message": {
        "type":"COMMAND_LONG",
        "param1":19.0,
        "param2":0.0,"param3":0.0,"param4":0.0,"param5":0.0,"param6":0.0,"param7":0.0,
        "command":{
          "type":"MAV_CMD_DO_SET_MODE"
        },
        "target_system":0,
        "target_component":0,
        "confirmation":0
      }
    };

In this case, system is set in STABILIZE mode.

But same message does not work on real BlueROV2.

When opening "0.0.0.0:8088/mavlink", I found this:

...
"COMMAND_ACK":{"command":{"type":"MAV_CMD_DO_SET_MODE"},"message_information":{"counter":3,"frequency":0.11999999731779099,"time":{"first_message":"2021-02-21T19:28:35.290372244+01:00","last_message":"2021-02-21T19:29:00.714305563+01:00"}},"progress":0,"result":{"type":"MAV_RESULT_UNSUPPORTED"},"result_param2":0,"target_component":0,"target_system":0,"type":"COMMAND_ACK"}
...

and

...
"HEARTBEAT":{"autopilot":{"type":"MAV_AUTOPILOT_ARDUPILOTMEGA"},"base_mode":{"bits":209},"custom_mode":19,"mavlink_version":3,"mavtype":{"type":"MAV_TYPE_SUBMARINE"},"message_information":{"counter":106,"frequency":1.009523868560791,"time":{"first_message":"2021-02-21T19:27:16.370862274+01:00","last_message":"2021-02-21T19:29:01.574418010+01:00"}},"system_status":{"type":"MAV_STATE_CRITICAL"},"type":"HEARTBEAT"}
...

Any idea why message is supported in SITL and not on BR2 ?
Thank you for your return.

@patrickelectric
Copy link
Member

Hi @enderocean, can you please inform your ardusub version and the entire output of the root page of the rest api ?

@enderocean
Copy link
Author

ArduSub Version: 3.5.4

@patrickelectric
Copy link
Member

patrickelectric commented Feb 21, 2021 via email

@enderocean
Copy link
Author

Problem solved. Thank @patrickelectric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants