-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Check system type for SET_ATTITUDE_TARGET attitude publising #13141
Check system type for SET_ATTITUDE_TARGET attitude publising #13141
Conversation
This is a potential duplicate of #13122 |
c92d8b8
to
2949452
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this should be handled in the mc_att_control and fw_att_control modules rather than the mavlink receiver.
918eb8e
to
7ed8f8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is almost good, except:
- the attitude setpoint will no longer be sent if thrust ignore flag is set, I made code recommendation for this but did not test.
- rates setpoint should be handled the same way
@irsdkv Just curious, what is the main usecase for sending offboard attitude setpoints? Do you also want to control fixed wing with such setpoint? |
47a82a7
to
d8b3e77
Compare
Thanks, @jlecoeur |
At this time we use this only for MC mode. But in future it is most likely that we will test in FW mode also. |
@irsdkv My question is more on the decision on selecting attitude setpoints for VTOL control. Is there a specific reason? why not use high level setpoints such as position? |
d8b3e77
to
0c40906
Compare
@Jaeyoung-Lim oh, I understand now. This needed in two cases for us:
|
d6b5ada
to
0c5ff5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, it should be flight tested before merging.
@ThomasRigi can you please check that this solves your issue? |
It works in SITL (only tested in MC mode), not in HIL. In HIL the attitude setpoint remains the last one from before set_attitude() is called (in my case set from takeoff or hold). I still have no idea why this happens. Can someone else test the HIL simulation? Maybe something is wrong with my setup (even though take off command and many other things (offboard NED or set_actuator_control(), for example) work). I'm using a Pixhawk 4 which has never been connected to a real drone before. (Edit : for as long as it flies in the real world I don't care too much about HIL, but it's still weird) |
Thanks @ThomasRigi , is it working in HIL with a multirotor? |
@jlecoeur yes, it works with HIL Quadcopter X |
Ok then this is not directly related, can you open a separate issue to track this @ThomasRigi ? |
Co-Authored-By: Julien Lecoeur <jlecoeur@users.noreply.github.com>
4dfb58a
to
4dda73a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[2019-10-26T11:42:14.960Z] /opt/gcc/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: px4_fmu-v2_fixedwing.elf section `.data' will not fit in region `flash'
[2019-10-26T11:42:14.960Z] /opt/gcc/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: region `flash' overflowed by 64 bytes Really?! 64 bytes?... @irsdkv is there some gymnastic you can do here to reduce the footprint? |
Hm. Lets see what we can do. |
a6ce730
to
05b2abe
Compare
I suggest to remove a few drivers from px4_fmu-v2_fixedwing For example distance sensor drivers are built for v2_fixedwing but not v2_default |
05b2abe
to
52e8655
Compare
52e8655
to
6e608a1
Compare
6e608a1
to
66d5786
Compare
It should fit now 🤞 |
thanks for all the updates @irsdkv 👍 |
Check if system type is VTOL and publish attitude to proper uORB topic
Describe problem solved by the proposed pull request
Attitude target publish in wrong uORB topic in case of VTOL system type/
Test data / coverage
Tested on VTOL UAV and MAVSDK.
Describe your preferred solution
Check is system type is VTOL (VTOL system types from
is_vtol()
).