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

FlightTab: Add Command Based Flight Control #474

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

jonasdn
Copy link
Contributor

@jonasdn jonasdn commented Mar 4, 2021

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

And when connected and a positioning deck is detected it is enabled:
command-connected

If connected and no deck is found a tooltip is added as well:
'You need a positioning deck to use Command Based Flight Control'

@jonasdn jonasdn marked this pull request as draft March 4, 2021 10:11
@jonasdn jonasdn force-pushed the jonasdn/command_based_flight_control branch 4 times, most recently from 5a5293c to 1e94ebf Compare March 5, 2021 05:43
@krichardsson
Copy link
Contributor

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).
Not sure what a generic positioning tab would look like but maybe 3D visualization and simple control of the CF?

@jonasdn
Copy link
Contributor Author

jonasdn commented Mar 5, 2021

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).
Not sure what a generic positioning tab would look like but maybe 3D visualization and simple control of the CF?

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 Flight Planner tab, where you would drag-n-drop command-actions to a list and then execute a flight plan, a playful way to make the drone do your bidding.

Comment on lines 418 to 420
sync = SyncCrazyflie(linkURI, cf=self.helper.cf)
self._hlCommander = PositionHlCommander(
sync,
Copy link
Contributor

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

@tobbeanton
Copy link
Member

Nice! What about having rotate 90 deg left/right buttons as well?

@jonasdn jonasdn force-pushed the jonasdn/command_based_flight_control branch from 1e94ebf to 63951a9 Compare March 10, 2021 18:57
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.
@jonasdn jonasdn force-pushed the jonasdn/command_based_flight_control branch from 63951a9 to d3b9624 Compare March 10, 2021 19:00
@jonasdn
Copy link
Contributor Author

jonasdn commented Mar 10, 2021

Nice! What about having rotate 90 deg left/right buttons as well?

Yeah maybe! My main goal was making something simple, but if we can get the UI intuitive enough, lets go for it.

@jonasdn jonasdn marked this pull request as ready for review March 10, 2021 19:00
@jonasdn jonasdn merged commit f98dcfa into bitcraze:master Mar 11, 2021
@jonasdn jonasdn added this to the next-release milestone Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants