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

Different Trajectory #10

Open
sesem738 opened this issue Jun 25, 2024 · 2 comments
Open

Different Trajectory #10

sesem738 opened this issue Jun 25, 2024 · 2 comments

Comments

@sesem738
Copy link

sesem738 commented Jun 25, 2024

Hi,

If I want the Crazyflie to track different trajectories or waypoints, how do I go about it?

@jonas-eschmann
Copy link
Collaborator

Hi @sesem738, thanks for reaching out!

The easiest would be to add a new mode to the switch statement here:
https://github.com/arplaboratory/learning_to_fly_controller/blob/d52b11a03caa1dadaf6b6bf02f328719b5bdd215/rl_tools_controller.c#L492
You can see how the FIGURE_EIGHT just defines the reference position and velocity depending on the time. So you could implement your own trajectory or waypoints there.

If you want to use setpoins from cflib the NORMAL mode should already work as it takes the data from the setpoint handed to the controller by the firmware:
https://github.com/arplaboratory/learning_to_fly_controller/blob/d52b11a03caa1dadaf6b6bf02f328719b5bdd215/rl_tools_controller.c#L418

which are received from this function in cflib:
https://github.com/bitcraze/crazyflie-lib-python/blob/c09bd869f1a823f26dbc2a3238444e018470a11e/cflib/crazyflie/commander.py#L70

I hope this helps, please let me know how it goes!
Jonas

@sesem738
Copy link
Author

sesem738 commented Jun 25, 2024

Thank you very much for your response.

So technically, if I run turn the autonomousSequence.py example with the rl_tools firmware, it would work?

https://github.com/bitcraze/crazyflie-lib-python/blob/c09bd869f1a823f26dbc2a3238444e018470a11e/examples/autonomy/autonomousSequence.py,

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

No branches or pull requests

2 participants