Skip to content

Unable to listen to ATTITUDE_QUATERNION attribute #987

@zealtv

Description

@zealtv

I'm running a Navio 2 board on a Pi 3 with a simple script listening to telemetry, formatting it and forwarding it as Open Sound Control. I have been struggling for the past week to get access to the ATTITUDE_QUATERNION message. Relevant code below:

#@vehicle.on_message('ATTITUDE_QUATERNION')  #<- NOT WORKING. 
#but:
@vehicle.on_message('*')
def listener(self, name, message):
    print(message.name)

Printing all messages returns the following:
RAW_IMU SCALED_IMU2 SCALED_PRESSURE SYS_STATUS POWER_STATUS MEMINFO MISSION_CURRENT NAV_CONTROLLER_OUTPUT SERVO_OUTPUT_RAW RC_CHANNELS_RAW RC_CHANNELS AHRS HWSTATUS SYSTEM_TIME EKF_STATUS_REPORT VIBRATION GLOBAL_POSITION_INT ATTITUDE AHRS2 AHRS3 VFR_HUD

I have tried updating pymavlink bindings as suggested in this related issue (#747)

cd
git clone https://github.com/mavlink/mavlink.git
git clone https://github.com/ArduPilot/pymavlink.git
cd ~/pymavlink
sudo MDEF=$HOME/mavlink/message_definitions pip install . -v
sudo MDEF=$HOME/mavlink/message_definitions python setup.py build install --user --force

then testing with mavproxy seems to show ATTITUDE_QUATERNION is not present...

pi@navio:~ $ mavproxy.py --master=udpin:127.0.0.1:14550
Connect udpin:127.0.0.1:14550 source_system=255
Failed to load module: No module named adsb. Use 'set moddebug 3' in the MAVProxy console to enable traceback
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from 127.0.0.1:14550
 MAV> GPS lock at 3 meters
fence breach
online system 1
STABILIZE> Mode STABILIZE
APM: APM:Copter V3.5.7 (b11c6af3)
APM: Frame: QUAD
Received 763 parameters
Saved 763 parameters to mav.parm
status ATTITUDE
STABILIZE> 473: ATTITUDE {time_boot_ms : 1434220, roll : -0.0131699889898, pitch : -0.00505013763905, yaw : -0.161463707685, rollspeed : -0.00045908355969, pitchspeed : -0.00226206961088, yawspeed : 0.000840358843561}
status ATTITUDE_QUATERNION
STABILIZE>

I can see the quaternion in MAVROS so I'm pretty sure dronekit/pymavlink is where the issue is.
I'm at a loss! Wondering if this is replicable and if anyone can suggest what might be going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions