what is the specific meaning of "path" in the "pip install -e path/to/cflib"
what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Hi
i follow the instruction in the crazyflie-lib-python,but i don't understand the word "path" in the "pip install -e path/to/cflib",so i try to input the crazyflie-lib-python as the path ,and it say like this
it seems say i has success install the cflib
but when i I'm going to do that python examples/basiclog,it says
i guess the problem is the path which i input is wrong before.
,what should i do ? thank you
i follow the instruction in the crazyflie-lib-python,but i don't understand the word "path" in the "pip install -e path/to/cflib",so i try to input the crazyflie-lib-python as the path ,and it say like this
it seems say i has success install the cflib
but when i I'm going to do that python examples/basiclog,it says
i guess the problem is the path which i input is wrong before.
,what should i do ? thank you
Last edited by NickCong on Tue Nov 28, 2017 11:53 am, edited 2 times in total.
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Hi NickCong
If you 'cd' into the examples folder, so your path looks something like this:
and the run the example:
What happens then?
If you 'cd' into the examples folder, so your path looks something like this:
Code: Select all
jenslee@jenslee-ThinkPad-T400:~/crazyflie/crazyflie-lib-python/examples$
Code: Select all
python basiclog.py
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Hi,Jens_LeeJens_Lee wrote: ↑Wed Nov 22, 2017 3:40 pm Hi NickCong
If you 'cd' into the examples folder, so your path looks something like this:and the run the example:Code: Select all
jenslee@jenslee-ThinkPad-T400:~/crazyflie/crazyflie-lib-python/examples$
What happens then?Code: Select all
python basiclog.py
i follow your say to do,but it occurs the same problem
Code: Select all
nickcong@nickcong-Inspiron-3537:~$ cd crazyflie-lib-python/examples/
nickcong@nickcong-Inspiron-3537:~/crazyflie-lib-python/examples$ python basiclog.py
Traceback (most recent call last):
File "basiclog.py", line 34, in <module>
import cflib.crtp # noqa
ImportError: No module named cflib.crtp
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Try and see if cflib is actually installed
or actually:
Code: Select all
pip search cflib
Code: Select all
pip freeze
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Hi,Jens_LeeJens_Lee wrote: ↑Wed Nov 22, 2017 4:39 pm Try and see if cflib is actually installedor actually:Code: Select all
pip search cflib
Code: Select all
pip freeze
I seem success,i may be konw what you mean,
first i
Code: Select all
nickcong@nickcong-Inspiron-3537:~/crazyflie-lib-python$ source venv/bin/activate
Code: Select all
(venv) nickcong@nickcong-Inspiron-3537:~$ pip install -e crazyflie-lib-python/
Code: Select all
(venv) nickcong@nickcong-Inspiron-3537:~$ pip install -e crazyflie-lib-python/
Obtaining file:///home/nickcong/crazyflie-lib-python
Requirement already satisfied: pyusb>=1.0.0b2 in ./crazyflie-lib-python/venv/lib/python3.5/site-packages (from cflib==0.1.3)
Installing collected packages: cflib
Running setup.py develop for cflib
Successfully installed cflib
Code: Select all
(venv) nickcong@nickcong-Inspiron-3537:~/crazyflie-lib-python$ python examples/basiclog.py
Scanning interfaces for Crazyflies...
Crazyflies found:
No Crazyflies found, cannot run example
Traceback (most recent call last):
File "examples/basiclog.py", line 143, in <module>
while le.is_connected:
NameError: name 'le' is not defined
Last edited by NickCong on Wed Nov 22, 2017 5:09 pm, edited 1 time in total.
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
It won't work if you are connected through the cfclient at the same time. Try disconnecting there, and then run the script again.it says Crazyflies no found,but i have connected the crazyfile2.0 via radio in the cfclient and it can work .
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Hi
it is also the same,the crazyflie can't be found and say name 'le' is not defined
Code: Select all
Scanning interfaces for Crazyflies...
Crazyflies found:
No Crazyflies found, cannot run example
Traceback (most recent call last):
File "examples/basiclog.py", line 143, in <module>
while le.is_connected:
NameError: name 'le' is not defined
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
That should work. Is the CF2 turned on? And you had no problem when connecting using the cfclient?how can i connect the crazyflie in the terminal?
This is my output:
Code: Select all
Scanning interfaces for Crazyflies...
Crazyflies found:
radio://0/110/2M
Connecting to radio://0/110/2M
Connected to radio://0/110/2M
[25453][Stabilizer]: {'stabilizer.roll': -5.625945091247559, 'stabilizer.yaw': 2.656627893447876, 'stabilizer.pitch': 1.7939248085021973}
[25463][Stabilizer]: {'stabilizer.roll': -5.567243576049805, 'stabilizer.yaw': 2.634549617767334, 'stabilizer.pitch': 1.777416467666626}
[25473][Stabilizer]: {'stabilizer.roll': -5.510120391845703, 'stabilizer.yaw': 2.723010540008545, 'stabilizer.pitch': 1.854751467704773}
...
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Hi,tobistobias wrote: ↑Thu Nov 23, 2017 8:10 amThat should work. Is the CF2 turned on? And you had no problem when connecting using the cfclient?how can i connect the crazyflie in the terminal?
This is my output:Code: Select all
Scanning interfaces for Crazyflies... Crazyflies found: radio://0/110/2M Connecting to radio://0/110/2M Connected to radio://0/110/2M [25453][Stabilizer]: {'stabilizer.roll': -5.625945091247559, 'stabilizer.yaw': 2.656627893447876, 'stabilizer.pitch': 1.7939248085021973} [25463][Stabilizer]: {'stabilizer.roll': -5.567243576049805, 'stabilizer.yaw': 2.634549617767334, 'stabilizer.pitch': 1.777416467666626} [25473][Stabilizer]: {'stabilizer.roll': -5.510120391845703, 'stabilizer.yaw': 2.723010540008545, 'stabilizer.pitch': 1.854751467704773} ...
i am very glad to you see the problem,and very thank you for your answer.
i try again and again,finally i find the problem,but i don't know why.now,it can work in the terminal.
i have no problem when connecting using the cfclient,but it needed sudo or it can't connect, so i guess it may be the same reason that can't connect the CF2 in the terminal ,so when i add sudo,it output like this
Code: Select all
(venv) nickcong@nickcong-Inspiron-3537:~/crazyflie-lib-python$ sudo python examples/basiclog.py
Traceback (most recent call last):
File "examples/basiclog.py", line 34, in <module>
import cflib.crtp # noqa
ImportError: No module named cflib.crtp
Code: Select all
(venv) nickcong@nickcong-Inspiron-3537:~/crazyflie-lib-python$ python examples/basiclog.py
Scanning interfaces for Crazyflies...
Crazyflies found:
No Crazyflies found, cannot run example
Traceback (most recent call last):
File "examples/basiclog.py", line 143, in <module>
while le.is_connected:
NameError: name 'le' is not defined
it out put like this
Code: Select all
(venv) root@nickcong-Inspiron-3537:/home/nickcong/crazyflie-lib-python# python examples/basiclog.py
Scanning interfaces for Crazyflies...
Crazyflies found:
usb://0
Connecting to usb://0
Connected to usb://0
[438809][Stabilizer]: {'stabilizer.yaw': -0.31768038868904114, 'stabilizer.pitch': -1.4990111589431763, 'stabilizer.roll': 1.2577241659164429}
[438819][Stabilizer]: {'stabilizer.yaw': -0.3178338408470154, 'stabilizer.pitch'
2.i have bought your loco position system ,because i want get my CF2 automatic flight.i have the question that do i modify directly the sequence coordinate in the "autonomousSequence.py" and then do "python examples/autonomousSequence.py" is ok?
and will the CF2 fly automatically according to my setup in this
Code: Select all
# Change the sequence according to your setup
# x y z YAW
sequence = [
(2.5, 2.5, 1.2, 0),
(1.5, 2.5, 1.2, 0),
(2.5, 2.0, 1.2, 0),
(3.5, 2.5, 1.2, 0),
(2.5, 3.0, 1.2, 0),
(2.5, 2.5, 1.2, 0),
(2.5, 2.5, 0.4, 0),
]
3.in the linux,how can i install the toobelt?i browse the instruction in the README.md,it only say install toolbelt in the windows,but it doesn't guide install the toolbelt in the linux.
Re: what is the specific meaning of "path" in the "pip install -e path/to/cflib"
Great that you got it to work. I will answer your nr 1 question but the 2,3 should be a new topic in the autonomous flight category. Can you please start the discussion there?
By adding udev rules to linux you don't have to be root as e.g. described here.1.so,later if i want to do like this does it means i always need the root mode?