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

Sending MAV_CMD_NAV_TAKEOFF while flying in other flight modes pushes the drone towards vec = (1, 1, 0) #19268

Open
squizz617 opened this issue Feb 28, 2022 · 4 comments
Assignees
Labels

Comments

@squizz617
Copy link
Contributor

Describe the bug
When the drone is flying in MANUAL / ALTCTL / POSCTL / ACRO (and probably more?) mode and receives a MAV_CMD_NAV_TAKEOFF message (to set mode to TAKEOFF), it flies towards (x, y, z) = (1, 1, 0) direction.

To Reproduce
Steps to reproduce the behavior:
[terminal 1] make px4_sitl_rtps gazebo -j4
[terminal 2] Download and run the PoC

Expected behavior
As described in the documentation, the drone should get to the target altitude and hold. No movement in the X and Y direction is expected.

Log Files and Screenshots

Drone (please complete the following information):

  • Build: px4_sitl_rtps
  • tested commit: a2645418
@xiaobai-cai-hold
Copy link

hello , do you use ros2 to send MAV_CMD_NAV_TAKEOFF message?
I used ros2 to send MAV_CMD_NAV_TAKEOFF message to px4 , it can be set to takeoff mode, but it can't takeoff.
I found the documentation you described above, takeoff need some params, however I did't find any ways to set takeoff params?

Can you share your ways that control the vehicle to takeoff ? thanks in advance

@squizz617
Copy link
Contributor Author

Hi @xiaobai-cai-hold.
As shown in the PoC above, I used MAVLink (through pymavlink APIs), not ros2, for setting takeoff mode.
I thought with ROS2 and rtps bridge, we can only use the offboard mode.. anyways, it seems that you should create a separate issue for your question.

@mcsauder
Copy link
Contributor

mcsauder commented Mar 2, 2022

I think I've replicated this issue. https://review.px4.io/plot_app?log=aa495108-dcc2-4b03-bf98-a87ab54af336
Glancing at the takeoff logic I can't see where the takeoff setpoint is being generated, however, I also can't determine what the difference from 1.12.3 is.

@xiaobai-cai-hold
Copy link

Hi @xiaobai-cai-hold. As shown in the PoC above, I used MAVLink (through pymavlink APIs), not ros2, for setting takeoff mode. I thought with ROS2 and rtps bridge, we can only use the offboard mode.. anyways, it seems that you should create a separate issue for your question.

thanks for your replying, I find that ros2 can only set uav to offboard mode to fly. About flying params,the offical said that they will make a param file. I believe that if that finish, using ros2 to control the uav is easy.

@dagar dagar added the bug label Mar 2, 2022
@dagar dagar self-assigned this Mar 2, 2022
@dagar dagar added this to To do in High-Priority Queue via automation Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

4 participants