Skip to content
New issue

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

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

Already on GitHub? # to your account

Debugging failure to switch to offboard #197

Open
vranki opened this issue May 25, 2023 · 2 comments
Open

Debugging failure to switch to offboard #197

vranki opened this issue May 25, 2023 · 2 comments

Comments

@vranki
Copy link

vranki commented May 25, 2023

I'm writing a offboard controller in c++. It's based on examples found in the px4_ros_com repository. The program can fly a quadcopter perfectly fine in simulator (gazebo + QGroundControl). But on real Pixhawk hardware it fails to switch to offboard randomly maybe 90% of tries. I'm looking for method of figuring out what's the cause. QGroundControl just says offboard was rejected, but doesn't provide any detail on actual reason.

I should be outputting the correct topics (trajectorysetpoint in position and velocity control modes) and the fact that it works always on simulator and sometimes on hardware also suggests this. Of course there is a chance of a bug but I'm stuck trying to find it.
The hardware itself seems healthy and flies fine using non-offboard control modes.

Any help is appreciated.

@beniaminopozzan
Copy link
Member

Hi @vranki
Is the command rejected even if you send it from QGC ?
You could also subscribe to https://github.com/PX4/PX4-Autopilot/blob/main/msg/VehicleCommandAck.msg (add it to the bridge first) to have more info about what went wrong

@vranki
Copy link
Author

vranki commented May 26, 2023

On real drone we have a transmitter switch to go to offboard mode, so it's not possible to control it from QGC. In simulator switching to offboard from QGC works always. I'll try subscribing to VehicleCommandAck and see if it gives any useful hints.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants