-
Notifications
You must be signed in to change notification settings - Fork 481
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
FlightTab: Add Command Based Flight Control #474
FlightTab: Add Command Based Flight Control #474
Conversation
5a5293c
to
1e94ebf
Compare
Nice addition! If you want a bigger take on this, there is also the option of adding a generic positioning tab. It might be out of scope for this PR but I just wanted to put it out there. At the moment we have 3 tabs with positioning related functionality (the LPS tab, the lighthouse tab and the Qualisys tab) and it might be interesting to consolidate it somehow. There is for instance a similar functionality to what you are adding in the Qualisys tab (a simple trajectory generator and autonomous flight). |
Thank you! I wanted this simple thing on the landing page because I sort of looked for it the first time I opened the client. And it is simple enough that my kids could fly around a bit with the CF. I was actually thinking about adding a |
src/cfclient/ui/tabs/FlightTab.py
Outdated
sync = SyncCrazyflie(linkURI, cf=self.helper.cf) | ||
self._hlCommander = PositionHlCommander( | ||
sync, |
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.
Don't create a SyncCrazyflie (should only be used with the "with" syntax). Instead, use self.helper.cf directly, see https://github.com/bitcraze/crazyflie-lib-python/blob/6e3f0e3c2870ab96a0276aaaf0d14bf49b758a34/cflib/positioning/position_hl_commander.py#L67-L70
Nice! What about having rotate 90 deg left/right buttons as well? |
1e94ebf
to
63951a9
Compare
If connected and a positioning deck (bcFlow, bcFlow2, bcLightHouse4, bcDWM1000) is found we enable a simple interface to send high level commands to the Crazyflie. This is to make the "first encounter" with the Crazyflie and the client more enjoyable, and to enable a user to fly around with the drone without any real experience.
63951a9
to
d3b9624
Compare
Yeah maybe! My main goal was making something simple, but if we can get the UI intuitive enough, lets go for it. |
If connected and a positioning deck (bcFlow, bcFlow2, bcLightHouse4, bcDWM1000) is found we enable a simple interface to send high level commands to the Crazyflie.
This is to make the "first encounter" with the Crazyflie and the client more enjoyable, and to enable a user to fly around with the drone without any real experience.
When disconnected the interface is disabled:
![command-disconnected](https://user-images.githubusercontent.com/974401/109947760-f845bf00-7cd9-11eb-90cf-91aab03f75ed.png)
And when connected and a positioning deck is detected it is enabled:
![command-connected](https://user-images.githubusercontent.com/974401/109947871-14496080-7cda-11eb-9040-c559f01c5194.png)
If connected and no deck is found a tooltip is added as well:
'You need a positioning deck to use Command Based Flight Control'