java mavlink_java – 使用消息更改速度到Mavlink

我试图通过改变速度来移动车辆.我已经能够在

Python中成功执行操作,但对于我的项目,我不能使用Python,所以我使用

Android来尝试进行相同的操作. Python中的工作功能是:

def send_ned_velocity(velocity_x, velocity_y, velocity_z):

"""

Move vehicle in direction based on specified velocity vectors.

"""

msg = vehicle.message_factory.set_position_target_local_ned_encode(

0, # time_boot_ms (not used)

0, 0, # target system, target component

mavutil.mavlink.MAV_FRAME_BODY_NED, # frame

0b0000111111000111, # type_mask (only speeds enabled)

0, 0, 0, # x, y, z positions (not used)

velocity_x, velocity_y, velocity_z, # x, y, z velocity in m/s

0, 0, 0, # x, y, z acceleration (not supported yet, ignored in GCS_Mavlink)

0, 0) # yaw, yaw_rate (not supported yet, ignored in GCS_Mavlink)

# send command to vehicle

vehicle.send_mavlink(msg)

vehicle.flu

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值