Page 1 of 1

[SOLVED] Changing velocity with assisted flight

Posted: Thu Jan 07, 2021 2:45 am
by maxmart
Hi,

I am trying to change the velocity for flying the Crazyflie using a PS4 controller with a flow deck in Hover assisted flight. Currently, the limit for velocity is set to 1m/s by default. I was advised to change the xyVelMax (attached image) to increase the limit of the velocity. I tried to change it to 2.0 or even higher, but when I checked the log file, specifically kalman_states.vy or kalman_states.vx, the maximum value is still 1.0.

Then I also tried to increase the RPLimit and observe the changes. When I checked the log file, specifically the controller.pitch/roll, the limit did change, but the velocity still remained limited to 1.0. Would anyone know how to change the velocity?

Thank you.

Re: Changing velocity with assisted flight

Posted: Fri Jan 08, 2021 12:37 pm
by kimberly
Hi!

My colleagues saw this and they said to try to place a multiplier on these lines and build the cfclient again. Apparently the RPLimit is not used there.

Re: Changing velocity with assisted flight

Posted: Fri Jan 08, 2021 12:54 pm
by maxmart
Hi!

Thank you for your reply. Unfortunately, I am not yet familiar with how to build the cfclient. Does this mean I have to use the VM to edit the lines of code you have mentioned and then thru the terminal window, build the cfclient itself and run the modified cfclient within the VM?

I have recently tried to use the VM in the bitcraze website, so far I am unable to run the Crazyflie client, the terminal window starts and then exits without proceeding to open the client itself. I have updated the source files already by this point.

Would you have an idea on how to go about this?

Thank you!

Re: Changing velocity with assisted flight

Posted: Fri Jan 08, 2021 2:40 pm
by kimberly
Yeah indeed, since this is a feature that requires the source code of the client to be changed.

There are instructions how to build the cfclient from source: https://github.com/bitcraze/crazyflie-clients-python and then go to 'building from source'.

Re: Changing velocity with assisted flight

Posted: Mon Jan 25, 2021 6:47 am
by maxmart
Hi!

I just recently tried this. I followed the link you mentioned to setup a virtual environment in the VM. Then I added a multiplier on the variables you mentioned. I tried putting 0.5 for vx, and 1.5 for vy as seen in the image below.
code.png
Then I use this code "python3 -m pip install -e ." to build the cfclient within the venv. Once I opened it in the venv, I saw that the vx and vy are having the 0.5 and 1.5 limits when I push the sticks. The Crazyflie can now move faster or slower based on the multiplier.
graph for velocity.png

Re: Changing velocity with assisted flight

Posted: Tue Jan 26, 2021 8:43 am
by kimberly
Ah good. And this is what you needed? Is it solved for you now?

Re: Changing velocity with assisted flight

Posted: Tue Jan 26, 2021 8:56 am
by maxmart
Yes! So far this is what I needed. Thank you!

Re: Changing velocity with assisted flight

Posted: Tue Jan 26, 2021 9:04 am
by kimberly
Great! Good luck and if you need to know anything else, just start a new forum thread :)