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

cffirmware python bindings pointing to the wrong folder #51

Open
Maaaackster opened this issue Oct 24, 2023 · 5 comments
Open

cffirmware python bindings pointing to the wrong folder #51

Maaaackster opened this issue Oct 24, 2023 · 5 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@Maaaackster
Copy link

I'm trying to use the cffirmware bindings in webots. Followed instructions under:

https://www.bitcraze.io/documentation/repository/crazyflie-simulation/main/functional_areas/controllers/.

When running webots I get the following error:

Traceback (most recent call last):
File "/home/marcus/LIU/TSRT10/crazyflie-simulation/webots/controllers/crazyflie_controller_py_firmware_pid/crazyflie_controller_py_firmware_pid.py", line 31, in
import cffirmware
File "/home/marcus/.local/lib/python3.10/site-packages/cffirmware.py", line 15, in
import _cffirmware
ModuleNotFoundError: No module named '_cffirmware'
WARNING: 'crazyflie_controller_py_firmware_pid' controller exited with status: 1.

Would gladly appriciate any help I could get.

@knmcguire
Copy link
Member

Hi! Have you updated this line to the actual location of your firmware?

And also have you build the python bindings as well?: https://www.bitcraze.io/documentation/repository/crazyflie-firmware/master/building-and-flashing/build/#build-python-bindings

@Maaaackster
Copy link
Author

Hi! Thanks for the quick reply!
So I have updated the line according to my folder structure, so that it looks like this:

sys.path.append('../../../../../../crazyflie-firmware')

I have also tried with the absolute path. But just to be clear, is it supposed to point to the parent directory of the crazyflie-firmware. Not the build directory "/build" where the python bindings are built as described in the link you now posted?

@knmcguire
Copy link
Member

You might be right actually. Have you tried adding the build folder too? then we need to change the docs and such.

Crazyswarm2 also uses the same python bindings for their simulation and they refer to the build folder. https://imrclab.github.io/crazyswarm2/installation.html

@Maaaackster
Copy link
Author

Okey now it is working! I tried changing the path to the actual build folder and that did it! :) Maybe I should have thought of that sooner... But anyways thanks so much for the help!

sys.path.append('../../../../../../crazyflie-firmware/build')

@knmcguire
Copy link
Member

knmcguire commented Oct 24, 2023

I'll keep it open as we actually need to fix this, and issues we see as 'a thing that we need to fix in the code or doc'. Regular support questions works differently but that is https://discussions.bitcraze.io/

@knmcguire knmcguire changed the title Trying to use cffirmware python bindings cffirmware python bindings pointing to the wrong folder Oct 24, 2023
@knmcguire knmcguire added bug Something isn't working documentation Improvements or additions to documentation labels Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants