USC-ACTLab / crazyswarm

A Large Quadcopter Swarm
MIT License
319 stars 316 forks source link

crazyswarm import error after Installation #679

Closed CookiePPP closed 2 years ago

CookiePPP commented 2 years ago

I followed the Installation Guide for Physical Robots and Simulation.

However I am stuck at the Hello World Tutorial. I get the below error when running helloworld.py without --sim argument.

blimpy@blimpy-OMEN:~/Documents/crazyswarm/ros_ws/src/crazyswarm/scripts$ python3 hello_world.py
Traceback (most recent call last):
  File "hello_world.py", line 22, in <module>
    main()
  File "hello_world.py", line 11, in main
    swarm = Crazyswarm()
  File "/home/blimpy/Documents/crazyswarm/ros_ws/src/crazyswarm/scripts/pycrazyswarm/crazyswarm_py.py", line 50, in __init__
    from .crazyflie import TimeHelper, CrazyflieServer
  File "/home/blimpy/Documents/crazyswarm/ros_ws/src/crazyswarm/scripts/pycrazyswarm/crazyflie.py", line 12, in <module>
    from crazyswarm.srv import *
ModuleNotFoundError: No module named 'crazyswarm'

I've checked pip and crazyswarm package is not installed. I followed the installation instructions a second time and was more careful to read every output and ensure all commands ran successfully but I didn't see anything that suggested a command failed.

Can someone help me install the package locally? I can see the relavent files in crazyswarm/ros_ws/devel/lib/python3/dist-packages/crazyswarm/srv but don't know how to install them to pip.

PS: The self-test passes and both chooser.py and the crazyswarm_server run successfully.

uhvardhan commented 2 years ago

In the crazyswarm folder, can you type the following source ros_ws/devel/setup.bash?

Once you run the above command, you should be able to run python3 hello_world.py