How do we control speed of vehicle by using MavLink?

387 views
Skip to first unread message

ichia chung

unread,
Jul 26, 2022, 11:57:55 PM7/26/22
to MAVLink
Dear all,

We want to control  speed of vehicle. 
We have tried to use POSITION_TARGET_LOCAL_NED API (i.e. mavlink_msg_set_position_target_local_ned_pack) to control vehicle.
This API can only control copter, but it doesn't control plane or vtol plane.
What API of MavLink should we use to control  speeds of  plane or vtol plane?
Thanks

I-Chia

Hamish Willee

unread,
Jul 27, 2022, 5:16:48 PM7/27/22
to MAVLink

ichia chung

unread,
Jul 28, 2022, 6:30:34 AM7/28/22
to MAVLink
Thanks for your reply.

We have tried to use COMMAND_INT API to send command(MAV_CMD_DO_CHANGE_SPEED).
However, it doesn't change speed.
We use MAVLink 1.0 protocol, GUIDED mode  and use the following code to send command to SITL.

code.PNG

It has flight to target position, but its speed isn't 15 m/s.
Moreover, does this API work when we don't get target position? 

I-Chia
hamish...@gmail.com 在 2022年7月28日 星期四清晨5:16:48 [UTC+8] 的信中寫道:

Hamish Willee

unread,
Jul 28, 2022, 6:45:13 PM7/28/22
to MAVLink
1. What flight stack are you using this with?
2. You say GUIDED mode so why are you using mission items?
3. I would move to MAVLink 2. Mavlink 1 is more or less dead. Though it should not matter for this kind of thing.

What are you trying to achieve? I.e. control over a vehicle via a companion computer? Or mission planning etc. 

My answer is likely to be "ask this again in the discussion forum for your flight stack, providing all the information about what you are trying to do". They will be able to tell you what commands are supported in the modes that you want to use.

ichia chung

unread,
Jul 28, 2022, 9:25:44 PM7/28/22
to MAVLink
Thanks for your reply.

Our final purpose is to control the vtol plane to automatically land on moving target. Like this, (A Robust and Accurate Landing Methodology for Drones on Moving Targets).
code.PNGcode.PNG

On the Drone, we have successfully auto-landed on moving target by use  POSITION_TARGET_LOCAL_NED API.
But, This API(POSITION_TARGET_LOCAL_NED) doesn't work in plane or VTOL plane.
We want to ask if there is an alternative API to control speed and  direction of the plane or VTOL plane. 
Many thanks.

I-Chia
hamish...@gmail.com 在 2022年7月29日 星期五清晨6:45:13 [UTC+8] 的信中寫道:

Hamish Willee

unread,
Jul 28, 2022, 10:42:47 PM7/28/22
to MAVLink
Hi

It depends on the flight stack. Assuming you are working on ArduPilot, please re-raise this question here: https://discuss.ardupilot.org/c/ground-control-software/mavlink/116

Include the information you put in this last message about using https://mavlink.io/en/messages/common.html#SET_POSITION_TARGET_LOCAL_NED and what you have tried.

The flight stack can tell you what is supported in terms of velocity and acceleration setpoints for particular frames in particular versions.
There are many other messages like the change_speed that might work, but best to ask the experts for the flight stack.



--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von diesem Thema abmelden möchten, rufen Sie https://groups.google.com/d/topic/mavlink/Txis0Ot6cBc/unsubscribe auf.
Wenn Sie sich von dieser Gruppe und allen Themen dieser Gruppe abmelden möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/mavlink/16466ffa-4678-4caf-ab5b-aa425dd2c255n%40googlegroups.com auf.

ichia chung

unread,
Jul 28, 2022, 11:34:06 PM7/28/22
to MAVLink
Thanks for your reply.

We will re-raise this question.
Many thanks.

I-Chia

hamish...@gmail.com 在 2022年7月29日 星期五上午10:42:47 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages