# qGroundcontrol through mavlink

**URL:** <https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359>\
**Category:** BlueBoat\
**Created:** [October 24, 2024, 8:00pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359 "2024-10-24T20:00:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jialuy2](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jialuy2](https://discuss.bluerobotics.com/u/jialuy2)\
**Post date:** [October 24, 2024, 8:00pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/1 "2024-10-24T20:00:04Z")

</div>

Hello,  
I tried to control the blueboat throught mavlink for testing then I added user defined json file to the action

 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/6/692007aebc9e5cd1ebbf503c90f509c98566578e.png)  
I read the ardupilot parameter that set servon\_function to disabled will set up control through mavlink command, when I did it and click the action in qGroundcontrol, nothing happen the motor didn’t rotate. But I can see that the mavlink do send the command to change the servo PWM in my mavlink analyze tool. So I believe some modes for my boat is wrong. Can someone helps me? Thanks

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [October 24, 2024, 8:08pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/2 "2024-10-24T20:08:01Z")

</div>

Hi @jialuy2 -  
Have you confirmed your servo has 5V power connected to the AUX rail? As @EliotBR mentioned in the thread you’re referring to, this is required - you could be sending the signal but not powering the servo?

---

<div class="post-metadata">

**Author:** ![jialuy2](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jialuy2](https://discuss.bluerobotics.com/u/jialuy2)\
**Post date:** [October 24, 2024, 8:29pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/3 "2024-10-24T20:29:37Z")

</div>

Hi, Tony,

Thanks for your fast reply. I’m not electrical guy but I didn’t change the starboard once I receive the blueboat. and I can control the motor through BLUEos and qgroundcontrol motor test so I think I have connected.

 ![IMG_7577](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/7/705d4e4a134fcf523d39e25b7ef9af7b48d8e37d.jpeg)  
Do I need to change the servo\_function to aux\_output instead of disabled? When I set allfunctions to disabled it shows me no motor output defined

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [October 24, 2024, 9:13pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/4 "2024-10-24T21:13:58Z")

</div>

Hi @jialuy2 -  
Let me back up, apologies. You’re not trying to control an additional servo it would seem. What are you trying to do? If you’d just like to test the motors, the BlueOS or QGC motor test interface is definitely the best way to accomplish this.

Servo channel 1 and 3 are configured to output to the motors that propel the BlueBoat. The ServoFunction for 1 and 3 are set for differential (skid) steering. Typically custom actions are used to control additional servo motors or ESCs connected to other channels…

---

<div class="post-metadata">

**Author:** ![jialuy2](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jialuy2](https://discuss.bluerobotics.com/u/jialuy2)\
**Post date:** [October 24, 2024, 9:40pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/5 "2024-10-24T21:40:39Z")

</div>

Right now I tried to use my own mavlink message to control the blueboat motor and I have added my json file that I mentioned before. I tried to set the servofunction to disabled, throttle, and gpio mode, but I can’t control it when I click the action button. So I am wondering somewhere I did wrong

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [October 24, 2024, 9:54pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/6 "2024-10-24T21:54:54Z")

</div>

I’m still not understanding your goals @jialuy2 -  
Are you trying to control the BlueBoat via mavlink message to make the vehicle navigate? Or are you just trying to spin the motor as a test? What application has you chasing motor control via button in QGC?

I’d suspect that what you’re trying to do isn’t supported, at least without disabling the vehicles ability to navigate…

---

<div class="post-metadata">

**Author:** ![jialuy2](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jialuy2](https://discuss.bluerobotics.com/u/jialuy2)\
**Post date:** [October 24, 2024, 10:08pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/7 "2024-10-24T22:08:10Z")

</div>

Sorry I didn’t explain it clearly. My final goal is to using moos-ivp to generate the speed and heading information and transfer them to blueboat to automatically control the boat . For my first step test I would like to generate some user defined mavlink message from moos to check whether the motor will rotate as desired, like transfering a message that let the boat to speed up. Right now I have my json file which contain the speed up and down function, when I want to test them through qgroundcontrol and added them as user defined action, when I click the action button the motor didn’t rotate. I am wondering if I set the mode wrong for the ardupilot parameter. Thanks for your time!

---

<div class="post-metadata">

**Author:** ![jialuy2](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jialuy2](https://discuss.bluerobotics.com/u/jialuy2)\
**Post date:** [October 24, 2024, 10:30pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/8 "2024-10-24T22:30:29Z")

</div>

[Sending custom MAVLink commands with QGC](https://discuss.bluerobotics.com/t/sending-custom-mavlink-commands-with-qgc/17070) Like I followed this post but I can’t drive the motors

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [October 25, 2024, 1:02pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/9 "2024-10-25T13:02:21Z")

</div>

Hi @jialuy2 -  
If your goal is to control the boat by sending desired speed and heading, than the approach you’re taking is not the correct one - the thread you linked is focused on triggering external devices on additional channels, not controlling the vehicle itself!

To control the vehicle in the way you’d like to, you’ll need to use [pymavlink](https://www.ardusub.com/developers/pymavlink.html)! This [thread](https://discuss.bluerobotics.com/t/desired-depth-and-heading-commands-in-a-manual-mode-e-g-depth-hold-mode/5640/2) has relevant information, albeit for ArduSub and not ArduRover.

---

<div class="post-metadata">

**Author:** ![jialuy2](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jialuy2](https://discuss.bluerobotics.com/u/jialuy2)\
**Post date:** [October 25, 2024, 3:05pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/10 "2024-10-25T15:05:30Z")

</div>

Thanks @tony-white  
I will take a look! By the way, do we have mavlink message that can set the speed and heading of boat instead of controlling the PWM of the servo. I plan to use c++ to send message since the moos is built by c++.

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [October 25, 2024, 3:17pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/11 "2024-10-25T15:17:15Z")

</div>

This is covered in the [Rover documentation!](https://ardupilot.org/dev/docs/mavlink-rover-commands.html)

---

<div class="post-metadata">

**Author:** ![jialuy2](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jialuy2](https://discuss.bluerobotics.com/u/jialuy2)\
**Post date:** [November 5, 2024, 6:51pm UTC](https://discuss.bluerobotics.com/t/qgroundcontrol-through-mavlink/18359/12 "2024-11-05T18:51:41Z")

</div>

Hi, Tony.  
I tried the rover command SET\_ATTITUDE\_TARGET and tried to send the command to the boat but my boat didn’t response for my signal. Could you check my recent post? Thanks for your time
