Giter VIP home page Giter VIP logo

mavlink2rest's Introduction

Build Status

MAVLink

MAVLink -- Micro Air Vehicle Message Marshalling Library.

MAVLink is a very lightweight, header-only message library for communication between drones and/or ground control stations. It consists primarily of message-set specifications for different systems ("dialects") defined in XML files, and Python tools that convert these into appropriate source code for supported languages. There are additional Python scripts providing examples and utilities for working with MAVLink data.

Tip MAVLink is very well suited for applications with very limited communication bandwidth. Its reference implementation in C is highly optimized for resource-constrained systems with limited RAM and flash memory. It is field-proven and deployed in many products where it serves as interoperability interface between components of different manufacturers.

Quick start

Generate C headers

To install the minimal MAVLink environment on Ubuntu LTS 20.04 or 22.04, enter the following on a terminal:

# Dependencies
sudo apt install python3-pip

# Clone mavlink into the directory of your choice
git clone https://github.com/mavlink/mavlink.git --recursive
cd mavlink

python3 -m pip install -r pymavlink/requirements.txt

You can then build the MAVLink2 C-library for message_definitions/v1.0/common.xml from the /mavlink directory as shown:

python3 -m pymavlink.tools.mavgen --lang=C --wire-protocol=2.0 --output=generated/include/mavlink/v2.0 message_definitions/v1.0/common.xml

Use from cmake

To include the headers in cmake, install them locally, e.g. into the directory install:

cmake -Bbuild -H. -DCMAKE_INSTALL_PREFIX=install -DMAVLINK_DIALECT=common -DMAVLINK_VERSION=2.0
cmake --build build --target install

Then use find_package to get the dependency in CMakeLists.txt:

find_package(MAVLink REQUIRED)

add_executable(my_program my_program.c)

target_link_libraries(my_program PRIVATE MAVLink::mavlink)

And pass the local install directory to cmake (adapt to your directory structure):

cd ../my_program
cmake -Bbuild -H. -DCMAKE_PREFIX_PATH=../mavlink/install

For a full example, check examples/c.

Note: even though we use target_link_libraries in cmake, it doesn't actually "link" to MAVLink as it's just a header-only library.

Other instructions

Instructions for using the C libraries are then covered in Using C MAVLink Libraries (mavgen).

Note: Installing the MAVLink Toolchain explains how to install MAVLink on other Ubuntu platforms and Windows, while Generating MAVLink Libraries explains how to build MAVLink for the other programming languages supported by the project. The sub-topics of Using MAVLink Libraries explain how to use the generated libraries.

Key Links

mavlink2rest's People

Contributors

ericjohnson97 avatar joaoantoniocardoso avatar joaomario109 avatar khancyr avatar noahbliss avatar patrickelectric avatar raultrombin avatar rotu avatar williangalvani avatar zhiburt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mavlink2rest's Issues

unsupported message

Hello, when trying to send a set mode i get unsupported command.
I've tried using both that message body

{
        "header": {
            "system_id": 1,
            "component_id": 1,
            "sequence": 0
        },
        "message": {
            "type": "SET_MODE",
            "custom_mode": 2,
            "target_system": 0,
            "base_mode": {
                "type": "MAV_MODE_PREFLIGHT"
            }
        }
    }

and this one

{
        "header": {
            "system_id": 1,
            "component_id": 1,
            "sequence": 0
        },
        "message": {
            "type": "COMMAND_LONG",
            "param1": 2,  # mode
            "param2": 0.0,  # custom mode
            "param3": 0.0,  # custom submode
            "param4": 0.0,  # empty
            "param5": 0.0,  # empty
            "param6": 0.0,  # empty
            "param7": 0.0,  # empty
            "command": {
                "type": "MAV_CMD_DO_SET_MODE"
            },
            "target_system": 0,
            "target_component": 0,
            "confirmation": 0
      }
}

Any suggestion ?

Add about endpoint

  • Add /about endpoint where it provides a json with payload related to the current version

NAMED_VALUE_FLOAT is invalid message

pi@raspberrypi:~/companion $ curl --request POST http://0.0.0.0:8088/mavlink -H "Content-Type: application/json" --data '{
"header": {
"system_id": 255,
"component_id": 0,
"sequence": 0
},
"message": {
"type":"NAMED_VALUE_FLOAT",
"time_boot_ms":0,
"name":"leak",
"value":0.0
}
}'
Failed to parse message, not a valid MAVLinkMessage.

Getting 404 response for MAV_CMD_FIXED_MAG_CAL_YAW

I get a 404 "Failed to parse image" response when sending the request below:

{
    "header": {
        "system_id": 255,
        "component_id": 0,
        "sequence": 0
    },
    "message":{
        "type": "COMMAND_LONG",
        "param1": 100.0,
        "param2": 0.0,
        "param3": 0.0,
        "param4": 0.0,
        "param5": 0.0,
        "param6": 0.0,
        "param7": 0.0,
        "command":{
            "type": "MAV_CMD_FIXED_MAG_CAL_YAW"
        },
        "target_system": 1,
        "target_component": 1,
        "confirmation":0
    }
}

I believe MAV_CMD_FIXED_MAG_CAL_YAW is part of ardupilotmega.xml so it should be supported. Is that correct?

(The MAV_CMD_COMPONENT_ARM_DISARM command is working great so everything else is set up correctly.)

Any assistance is appreciated!

Thread panic when changing flight mode

Running the stock Ardusub Pi Image, with the Mavlink2Rest 0.6.0 release binary. Vehicle is using ArduRover 4.0 Stable.

When I change the flight mode (in QGC), the Mavlink2Rest server crashes with the following output

pi@champ:~/companion/tools $ ./mavlink2rest --connect udpin:127.0.0.1:9002 --server 0.0.0.0:4777
MAVLink connection string: udpin:127.0.0.1:9002
REST API address: 0.0.0.0:4777
thread '<unnamed>' panicked at 'Unexpected enum value 11.', /target/armv7-unknown-linux-musleabihf/release/build/mavlink-c1b7c2ed7a6a321a/out/common.rs:4124:13
stack backtrace:
   0:   0x60a6c4 - backtrace::backtrace::libunwind::trace::h2740b7779bb3fbf6
                       at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:   0x60a6c4 - backtrace::backtrace::trace_unsynchronized::hc587e09a69bdc583
                       at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:   0x60a6c4 - std::sys_common::backtrace::_print_fmt::hde9114c81a02c611
                       at src/libstd/sys_common/backtrace.rs:77
   3:   0x60a6c4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h069b16b4a6ea2d7a
                       at src/libstd/sys_common/backtrace.rs:59
   4:   0x6307b0 - core::fmt::write::h3fe08fe0e1c8dec3
                       at src/libcore/fmt/mod.rs:1052
   5:   0x60508c - std::io::Write::write_fmt::hb40c902bf8e5da41
                       at src/libstd/io/mod.rs:1426
   6:   0x60cb3c - std::sys_common::backtrace::_print::hc4e20dd38a1f8083
                       at src/libstd/sys_common/backtrace.rs:62
   7:   0x60cb3c - std::sys_common::backtrace::print::hf29b05d8b728a743
                       at src/libstd/sys_common/backtrace.rs:49
   8:   0x60cb3c - std::panicking::default_hook::{{closure}}::h2c253e0d3587e013
                       at src/libstd/panicking.rs:204
   9:   0x60c7b0 - std::panicking::default_hook::h637f76a8fdb3ad07
                       at src/libstd/panicking.rs:224
  10:   0x60d1ec - std::panicking::rust_panic_with_hook::h2dccb74573dc29e8
                       at src/libstd/panicking.rs:472
  11:   0x60ce00 - rust_begin_unwind
                       at src/libstd/panicking.rs:380
  12:   0x62f064 - core::panicking::panic_fmt::hc9fedf85d2814a69
                       at src/libcore/panicking.rs:85
  13:   0x62ee44 - core::option::expect_failed::hb19b537baead1f0a
                       at src/libcore/option.rs:1191
  14:   0x40d764 - mavlink::common::COMMAND_ACK_DATA::deser::h72a1b199dc63d25b
  15:   0x4284ec - <mavlink::common::MavMessage as mavlink::Message>::parse::hfbe47a60d6f17d16
  16:   0x320a8c - mavlink::read_versioned_msg::h58b4e622963d9ac3
  17:   0x30749c - <mavlink::connection::udp::UdpConnection as mavlink::connection::MavConnection<M>>::recv::h351d371a76729332
  18:   0x3f6e10 - std::sys_common::backtrace::__rust_begin_short_backtrace::h851d5b082366ffcc
  19:   0x31d090 - std::panicking::try::do_call::hb53df87ce34ece45
  20:   0x610638 - __rust_maybe_catch_panic
                       at src/libpanic_unwind/lib.rs:86
  21:   0x32908c - core::ops::function::FnOnce::call_once{{vtable.shim}}::h71edd6a2fe43f6d5
  22:   0x5ff568 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::haa16aef56df3b543
                       at /rustc/b8cedc00407a4c56a3bda1ed605c6fc166655447/src/liballoc/boxed.rs:1015
  23:   0x60fec8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hddbf5f21bb2e7945
                       at /rustc/b8cedc00407a4c56a3bda1ed605c6fc166655447/src/liballoc/boxed.rs:1015
  24:   0x60fec8 - std::sys_common::thread::start_thread::ha699d94be8e2f96d
                       at src/libstd/sys_common/thread.rs:13
  25:   0x60fec8 - std::sys::unix::thread::Thread::new::thread_start::hd01e2c359672fbae
                       at src/libstd/sys/unix/thread.rs:80

And with RUST_BACKTRACE=full:

pi@champ:~/companion/tools $ ./mavlink2rest --connect udpin:127.0.0.1:9002 --server 0.0.0.0:4777
MAVLink connection string: udpin:127.0.0.1:9002
REST API address: 0.0.0.0:4777
thread '<unnamed>' panicked at 'Unexpected enum value 11.', /target/armv7-unknown-linux-musleabihf/release/build/mavlink-c1b7c2ed7a6a321a/out/common.rs:4124:13
stack backtrace:
   0:   0x60a6c4 - backtrace::backtrace::libunwind::trace::h2740b7779bb3fbf6
                       at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:   0x60a6c4 - backtrace::backtrace::trace_unsynchronized::hc587e09a69bdc583
                       at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:   0x60a6c4 - std::sys_common::backtrace::_print_fmt::hde9114c81a02c611
                       at src/libstd/sys_common/backtrace.rs:77
   3:   0x60a6c4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h069b16b4a6ea2d7a
                       at src/libstd/sys_common/backtrace.rs:59
   4:   0x6307b0 - core::fmt::write::h3fe08fe0e1c8dec3
                       at src/libcore/fmt/mod.rs:1052
   5:   0x60508c - std::io::Write::write_fmt::hb40c902bf8e5da41
                       at src/libstd/io/mod.rs:1426
   6:   0x60cb3c - std::sys_common::backtrace::_print::hc4e20dd38a1f8083
                       at src/libstd/sys_common/backtrace.rs:62
   7:   0x60cb3c - std::sys_common::backtrace::print::hf29b05d8b728a743
                       at src/libstd/sys_common/backtrace.rs:49
   8:   0x60cb3c - std::panicking::default_hook::{{closure}}::h2c253e0d3587e013
                       at src/libstd/panicking.rs:204
   9:   0x60c7b0 - std::panicking::default_hook::h637f76a8fdb3ad07
                       at src/libstd/panicking.rs:224
  10:   0x60d1ec - std::panicking::rust_panic_with_hook::h2dccb74573dc29e8
                       at src/libstd/panicking.rs:472
  11:   0x60ce00 - rust_begin_unwind
                       at src/libstd/panicking.rs:380
  12:   0x62f064 - core::panicking::panic_fmt::hc9fedf85d2814a69
                       at src/libcore/panicking.rs:85
  13:   0x62ee44 - core::option::expect_failed::hb19b537baead1f0a
                       at src/libcore/option.rs:1191
  14:   0x40d764 - mavlink::common::COMMAND_ACK_DATA::deser::h72a1b199dc63d25b
  15:   0x4284ec - <mavlink::common::MavMessage as mavlink::Message>::parse::hfbe47a60d6f17d16
  16:   0x320a8c - mavlink::read_versioned_msg::h58b4e622963d9ac3
  17:   0x30749c - <mavlink::connection::udp::UdpConnection as mavlink::connection::MavConnection<M>>::recv::h351d371a76729332
  18:   0x3f6e10 - std::sys_common::backtrace::__rust_begin_short_backtrace::h851d5b082366ffcc
  19:   0x31d090 - std::panicking::try::do_call::hb53df87ce34ece45
  20:   0x610638 - __rust_maybe_catch_panic
                       at src/libpanic_unwind/lib.rs:86
  21:   0x32908c - core::ops::function::FnOnce::call_once{{vtable.shim}}::h71edd6a2fe43f6d5
  22:   0x5ff568 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::haa16aef56df3b543
                       at /rustc/b8cedc00407a4c56a3bda1ed605c6fc166655447/src/liballoc/boxed.rs:1015
  23:   0x60fec8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hddbf5f21bb2e7945
                       at /rustc/b8cedc00407a4c56a3bda1ed605c6fc166655447/src/liballoc/boxed.rs:1015
  24:   0x60fec8 - std::sys_common::thread::start_thread::ha699d94be8e2f96d
                       at src/libstd/sys_common/thread.rs:13
  25:   0x60fec8 - std::sys::unix::thread::Thread::new::thread_start::hd01e2c359672fbae
                       at src/libstd/sys/unix/thread.rs:80

Altitude not retrieved

Hi,
Using mavlink2rest with ardupilot autotest, altitude information is available in AHRS3 section. Data is updated regularly and correct.
Using physical BR2, this info is not available. Value is sticked to zero.
Any idea why ?
Tested with :

  • ArduSub 4.0.2
  • Companion software 0.0.22
    On two different ROVs.
    Thank you for your return.

Error messages appearing when using tcpout connection string

Getting lots of error messages when using a tcpout connection:

$ ./mavlink2rest-x86_64-unknown-linux-musl -c tcpout:127.0.0.1:14550
[2022-02-12T21:58:09Z ERROR mavlink2rest::mavlink_vehicle] Recv error: Io(Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" })
[2022-02-12T21:58:10Z ERROR mavlink2rest::mavlink_vehicle] Recv error: Io(Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" })
[2022-02-12T21:58:10Z ERROR mavlink2rest::mavlink_vehicle] Recv error: Io(Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" })
[2022-02-12T21:58:10Z ERROR mavlink2rest::mavlink_vehicle] Recv error: Io(Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" })

I don't get these error messages when using UDP or tcpin.

The application still appears to be working despite the error messages.

Ardusub command MAV_CMD_DO_SET_MODE is unsupported

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.

Parameter to activate logs of external requests

Feature proposal: add a parameter to log requests that are posted to the API.

The idea is to have a least a trace of paths that are called from clients and the HTTP status code associated (like you can have on a Web server or a proxy server). Result can be read in console or dedicated file if specified.

Something like:

mavlink2rest -f ~/myfile.log 

Note: personaly I won't include the "mavlink flow" in this file (AHRS, HEARTBEAT, ...) ; only external requests are logged.

Websocket handling

Hello,

When we use the websocket connection for sending a stream link RC_OVERRIDE_CHANNEL, the server is answering all message with

Ok(
    (),
)

Would it be possible to have this as json and maybe ack with the correct message number ?

The issue is that on JS, it raised a syntax exception as the answer isn't a json

   ws = new WebSocket(websocketServerLocation);
    ws.onmessage = function (event) {
        try {
            var data = JSON.parse(event.data);
        } catch (error) {
            // on sending message we get non JSON response
            //console.log(error);
            //console.log(event.data);
        }

Not working on RPi Zero

Hello,

I try to install on a RPi Zero (ARMv6).

If I download mavlink2rest-armv7-unknown-linux-musleabihf file (ARMv7) I got an error : Segmentation fault

If I try to install it with cargo I got this error (same error using sudo) :

error: failed to compile `mavlink2rest v0.7.3`, intermediate artifacts can be found at `/tmp/cargo-installK7vrEl`

Caused by:  failed to parse lock file at: /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/mavlink2rest-0.7.3/Cargo.lock

Caused by:  invalid serialized PackageId for key `package.dependencies`


I tried to remove this file and execute again, but I got a lot of compilation error 
error[E0658]:` use of unstable library feature 'alloc': this library is unlikely to be stabilized in its current form or name (see issue #27783)
  --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/lib.rs:41:1
   |
41 | extern crate alloc;
   | ^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
 --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:5:23
  |
5 | use core::mem::{self, MaybeUninit};
  |                       ^^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
    --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:2312:20
     |
2312 |     rules_storage: MaybeUninit<[(Register, RegisterRule<R>); MAX_RULES]>,
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
    --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:2329:28
     |
2329 |             rules_storage: MaybeUninit::uninit(),
     |                            ^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `uninit` found for type `core::mem::MaybeUninit<_>` in the current scope
    --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:2329:41
     |
2329 |             rules_storage: MaybeUninit::uninit(),
     |                            -------------^^^^^^
     |                            |
     |                            function or associated item not found in `core::mem::MaybeUninit<_>`

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
    --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:2366:60
     |
2366 |             core::slice::from_raw_parts(self.rules_storage.as_ptr() as *const _, self.rules_len)
     |                                                            ^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
    --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:2374:36
     |
2374 |                 self.rules_storage.as_mut_ptr() as *mut _,
     |                                    ^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
    --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:2405:50
     |
2405 |                     let ptr = self.rules_storage.as_mut_ptr() as *mut (Register, RegisterRule<R>);
     |                                                  ^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
    --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.21.0/src/read/cfi.rs:2446:42
     |
2446 |             let ptr = self.rules_storage.as_mut_ptr() as *mut (Register, RegisterRule<R>);
     |                                          ^^^^^^^^^^

error: aborting due to 9 previous errors

Some errors occurred: E0599, E0658.
For more information about an error, try `rustc --explain E0599`.
error: failed to compile `mavlink2rest v0.7.3`, intermediate artifacts can be found at `/tmp/cargo-installeZYCIG`

Caused by:
  Could not compile `gimli`.

Add log list+download endpoint

Featurerequest

It would be nice to have a endpoint to list all logs and also being able to download *.bin logs from flash.

MANUAL_CONTROL command not supported

Hi,
I try to control BlueROV2 by sending MANUAL_CONTROL messages in POST mode to: 0.0.0.0:8088/mavlink
Message content is retrieved and adapted from helper

{
        "header": {
        "system_id": 1,
        "component_id":1,
        "sequence":0
        },
        "message": {
            "type":"MANUAL_CONTROL",
            "x":1000,
            "y":0,
            "z":0,
            "r":0,
            "buttons":0,
            "target":0
        }
}

mavlink2rest logout is two parenthesis as if everything was fine: ()
But command has no effect whatever the control mode I use.
Any ideas what happens ? Thanks
Note. Other commands in COMMAND_LONG are working well: ARM, DISARM, SET_MODE

tilting camera

Hi
I was wondering if its possible to tilt the camera with mavlink2rest.
I tried setting a tilt angle with the following body in the request 2500 centidegrees
"header": {{
"system_id": 1,
"component_id": 1,
"sequence": 0
}},
"message": {{
"type": "COMMAND_LONG",
"param1": 1,
"param2": 2500,
"param3": 0,
"param4": 0,
"param5": 0,
"param6": 0,
"param7": 0,
"command": {{
"type": "MAV_CMD_DO_MOUNT_CONTROL"
}},
"target_system": 0,
"target_component": 0,
"confirmation": 0

But i dont get any reaction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.