mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
847 stars 983 forks source link

setpoint_raw message floats the drone #1956

Closed moralkerim closed 1 month ago

moralkerim commented 1 month ago

Issue details

Hello, when i publish message to mavros/setpoint_raw/local without any velocity on SITL, drone begins to float. Video is below: https://youtu.be/GLlrhqDJyxk

Example message:

header: 
  seq: 186
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: "map"
coordinate_frame: 8
type_mask: 1024
position: 
  x: 0.0
  y: 0.0
  z: 0.0
velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
acceleration_or_force: 
  x: 0.0
  y: 0.0
  z: 0.0
yaw: 0.0
yaw_rate: 0.0
---

MAVROS version and platform

Mavros: 1.1 ROS: Noetic Ubuntu: 20.04

Autopilot type and version

[-] ArduPilot [ ] PX4

Version: 4.5.0

Diagnostics

header: 
  seq: 12
  stamp: 
    secs: 1716900628
    nsecs: 268977394
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "udp://:14550@"
    values: 
      - 
        key: "Received packets:"
        value: "686"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overru

Check ID:

OK. I got messages from 1:1.

---
Received 1787 messages, from 1 addresses
sys:comp   list of messages
  1:1     0, 1, 129, 2, 136, 137, 147, 11030, 24, 152, 27, 29, 30, 32, 33, 163, 36, 164, 168, 42, 178, 62, 65, 193, 74, 111, 241, 116, 125
moralkerim commented 1 month ago

Issue seems to be solved after setting bitmask as:

msg.type_mask        = mavros_msgs::PositionTarget::IGNORE_PX | mavros_msgs::PositionTarget::IGNORE_PY | mavros_msgs::PositionTarget::IGNORE_PZ | \
                           mavros_msgs::PositionTarget::IGNORE_AFX | mavros_msgs::PositionTarget::IGNORE_AFY | mavros_msgs::PositionTarget::IGNORE_AFZ | \
                           mavros_msgs::PositionTarget::IGNORE_YAW;