Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSITION_TARGET_LOCAL_NED stream not appearing #12757

Open
protobits opened this issue Aug 20, 2019 · 17 comments · Fixed by #12780
Open

POSITION_TARGET_LOCAL_NED stream not appearing #12757

protobits opened this issue Aug 20, 2019 · 17 comments · Fixed by #12780

Comments

@protobits
Copy link

Describe the bug
Quadcopter set to altitude mode (on ground, disarmed) with PX4FLOW sensor attached. No POSITION_TARGET_LOCAL_NED stream on QGC visible

To Reproduce
Steps to reproduce the behavior:

  1. Quadcopter with PX4FLOW attached, disarmed
  2. Altitude mode set via radio transmitter (confirmed in QGC)
  3. No POSITION_TARGET_LOCAL_NED stream visible in QGC analyze

Expected behavior
I expect to be able to switch to altitude mode and observe the setpoint in order to tune the altitude controller. Same thing happens if set to position control with local position input from onboard computer. I'm using FMUv2 board. I tried observing the visible mavlink streams from TELEM1 (set to "Normal" as per default) and from USB port. PX4 version is 1.9.2.

Log Files and Screenshots
No log as the drone was not armed.

Add screenshots to help explain your problem.

Drone (please complete the following information):

  • Custom built quadcopter
  • Pixhawk FMUv2 with PX4FLOW sensor attached via I2C
@julianoes
Copy link
Contributor

julianoes commented Aug 21, 2019

I think you would need to request the MAVLink message stream using:
https://mavlink.io/en/messages/common.html#MAV_CMD_SET_MESSAGE_INTERVAL

It would probably be a nice addition to QGC to be able to request certain sets of messages for tuning, e.g. a button "enable position tuning stream".

@protobits
Copy link
Author

According to the code I've read, this stream is supposed to be on for "normal" and "onboard" stream types.

@julianoes
Copy link
Contributor

Ok, and what mode are you using?

@protobits
Copy link
Author

This is on default TELEM1 port with Normal mode (the default).

@julianoes
Copy link
Contributor

I'm trying to reproduce this and I can see POSITION_TARGET_LOCAL_NED being streamed at around 0.5 Hz when flying in HITL in MISSION, POSCTL, and ALTCTL.

However, the values in ALTCTL are all NaN except vz.

Selection_035

In POSCTL everything seems sane, except z is still NaN. I wonder why that happens, presumably it's just not passed to this message.

Selection_036

@julianoes
Copy link
Contributor

@bresch it looks like the z setpoint is NaN for ALTCTL and POSCTL. I think that's not intuitive and makes it weird to tune.

@julianoes
Copy link
Contributor

The issue where the z setpoint is NaN is a recent problem -> #12776.

@protobits
Copy link
Author

Maybe it is because of this that the mavlink message is not visible (some not Nan guard avoid publication)?

@julianoes
Copy link
Contributor

Maybe it is because of this that the mavlink message is not visible (some not Nan guard avoid publication)?

Let me check!

@julianoes
Copy link
Contributor

This works for me now with latest master (the screenshot is SITL) but this should be the same thing over telem1 just only 0.5 Hz.

Selection_037

@protobits
Copy link
Author

I've flashed current master on a standalone Pixhawk board (just RC receiver connected) and, while I can switch to altitude mode, I still don't get position target stream (neither on USB port nor TELEM1 port):

image

@julianoes
Copy link
Contributor

Ok, and that's with a GPS lock?

@protobits
Copy link
Author

No, no lock. This is a board with only RC attached. It is on altitude mode using baro.

@julianoes
Copy link
Contributor

This might be the issue then. Can you check if you see the message with GPS?

@protobits
Copy link
Author

Do you mean that the setpoint will not be visible without GPS? In altitude mode I believe it should appear even without GPS since it is sending an altitude setpoint to follow with barometer. Right?

@julianoes
Copy link
Contributor

Do you mean that the setpoint will not be visible without GPS? In altitude mode I believe it should appear even without GPS since it is sending an altitude setpoint to follow with barometer. Right?

I agree that it should but first I need to understand why it doesn't.

@stale
Copy link

stale bot commented Nov 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants