Skip to content

Commit 719b165

Browse files
committed
(#143) copied content of readme into install.md and replace with link
1 parent 887981d commit 719b165

File tree

3 files changed

+78
-108
lines changed

3 files changed

+78
-108
lines changed

README.md

Lines changed: 6 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -2,114 +2,18 @@
22

33
cflib is an API written in Python that is used to communicate with the Crazyflie
44
and Crazyflie 2.0 quadcopters. It is intended to be used by client software to
5-
communicate with and control a Crazyflie quadcopter. For instance the [cfclient][cfclient] Crazyflie PC client uses the cflib.
5+
communicate with and control a Crazyflie quadcopter. For instance the [Crazyflie PC client](https://www.github.com/bitcraze/crazyflie-clients-python) uses the cflib.
66

77
See [below](#platform-notes) for platform specific instruction.
88
For more info see our [documentation](https://www.bitcraze.io/documentation/repository/crazyflie-lib-python/master/).
99

10+
## Installation
11+
See the [installation instructions](docs/installation/install.md) in the github docs folder.
1012

11-
## Development
12-
### Developing for the cfclient
13-
* [Fork the cflib](https://help.github.com/articles/fork-a-repo/)
14-
* [Clone the cflib](https://help.github.com/articles/cloning-a-repository/), `git clone git@github.com:YOUR-USERNAME/crazyflie-lib-python.git`
15-
* [Install the cflib in editable mode](http://pip-python3.readthedocs.org/en/latest/reference/pip_install.html?highlight=editable#editable-installs), `pip install -e path/to/cflib`
16-
17-
18-
* [Uninstall the cflib if you don't want it any more](http://pip-python3.readthedocs.org/en/latest/reference/pip_uninstall.html), `pip uninstall cflib`
19-
20-
Note: If you are developing for the [cfclient][cfclient] you must use python3. On Ubuntu (16.04, 18.08) use `pip3` instead of `pip`.
21-
22-
### Linux, OSX, Windows
23-
24-
The following should be executed in the root of the crazyflie-lib-python file tree.
25-
26-
#### Virtualenv
27-
This section contains a very short description of how to use [virtualenv (local python environment)](https://virtualenv.pypa.io/en/latest/)
28-
with package dependencies. If you don't want to use virualenv and don't mind installing cflib dependencies system-wide
29-
you can skip this section.
30-
31-
* Install virtualenv: `pip install virtualenv`
32-
* create an environment: `virtualenv venv`
33-
* Activate the environment: `source venv/bin/activate`
34-
35-
36-
* To deactivate the virtualenv when you are done using it `deactivate`
37-
38-
Note: For systems that support [make](https://www.gnu.org/software/make/manual/html_node/Simple-Makefile.html), you can use `make venv` to
39-
create an environment, activate it and install dependencies.
40-
41-
#### Install cflib dependencies
42-
Install dependencies required by the lib: `pip install -r requirements.txt`. If you are planning on developing on the lib you should also run: `pip install -r requirements-dev.txt`.
43-
44-
To verify the installation, connect the crazyflie and run an example: `python examples/basiclog`
45-
46-
### Pre commit hooks
47-
If you want some extra help with keeping to the mandated python coding style you can install hooks that verify your style at commit time. This is done by running:
48-
```
49-
$ pre-commit install
50-
```
51-
This will run the lint checkers defined in `.pre-commit-config-yaml` on your proposed changes and alert you if you need to change anything.
52-
53-
## Testing
54-
### With docker and the toolbelt
55-
56-
For information and installation of the
57-
[toolbelt.](https://wiki.bitcraze.io/projects:dockerbuilderimage:index)
58-
59-
* Check to see if you pass tests: `tb test`
60-
* Check to see if you pass style guidelines: `tb verify`
61-
62-
Note: Docker and the toolbelt is an optional way of running tests and reduces the
63-
work needed to maintain your python environment.
64-
65-
### Native python on Linux, OSX, Windows
66-
[Tox](http://tox.readthedocs.org/en/latest/) is used for native testing: `pip install tox`
67-
* If test fails after installing tox with `pip install tox`, installing with `sudo apt-get install tox`result a successful test run
68-
69-
* Test package in python3.4 `TOXENV=py34 tox`
70-
* Test package in python3.6 `TOXENV=py36 tox`
71-
72-
Note: You must have the specific python versions on your machine or tests will fail. (ie. without specifying the TOXENV, `tox` runs tests for python 3.3, 3.4 and would require all python versions to be installed on the machine.)
73-
74-
75-
## Platform notes
76-
77-
### Linux
78-
79-
#### Setting udev permissions
80-
81-
The following steps make it possible to use the USB Radio without being root.
82-
83-
```
84-
sudo groupadd plugdev
85-
sudo usermod -a -G plugdev $USER
86-
```
87-
88-
You will need to log out and log in again in order to be a member of the plugdev group.
89-
90-
Create a file named ```/etc/udev/rules.d/99-crazyradio.rules``` and add the
91-
following:
92-
```
93-
# Crazyradio (normal operation)
94-
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
95-
# Bootloader
96-
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="0101", MODE="0664", GROUP="plugdev"
97-
```
98-
99-
To connect Crazyflie 2.0 via usb, create a file name ```/etc/udev/rules.d/99-crazyflie.rules``` and add the following:
100-
```
101-
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev"
102-
```
103-
104-
You can reload the udev-rules using the following:
105-
```
106-
sudo udevadm control --reload-rules
107-
sudo udevadm trigger
108-
```
109-
110-
[cfclient]: https://www.github.com/bitcraze/crazyflie-clients-python
13+
## Official Documentation
11114

15+
Check out the [Bitcraze crazyflie-lib-python documentation](https://www.bitcraze.io/documentation/repository/crazyflie-lib-python/master/) on our website.
11216

11317
## Contribute
11418

115-
Everyone is encouraged to contribute to the CrazyFlie library by forking the Github repository and making a pull request or opening an issue.
19+
Everyone is encouraged to contribute to the CrazyFlie library by forking the Github repository and making a pull request or opening an issue.

docs/_data/menu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- page_id: home
22
- title: Installation
33
subs:
4-
- {page_id: install_from_source}
4+
- {page_id: install}
55
- {page_id: usd_permissions}
66
- title: User guides
77
subs:

docs/installation/install.md

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
title: Installing from source
3-
page_id: install_from_source
2+
title: Installation
3+
page_id: install
44
---
5+
6+
## Development
57
### Developing for the cfclient
68
* [Fork the cflib](https://help.github.com/articles/fork-a-repo/)
79
* [Clone the cflib](https://help.github.com/articles/cloning-a-repository/), `git clone git@github.com:YOUR-USERNAME/crazyflie-lib-python.git`
@@ -32,10 +34,74 @@ Note: For systems that support [make](https://www.gnu.org/software/make/manual/h
3234
create an environment, activate it and install dependencies.
3335

3436
#### Install cflib dependencies
35-
Install dependencies required by the lib: `pip install -r requirements.txt`
37+
Install dependencies required by the lib: `pip install -r requirements.txt`. If you are planning on developing on the lib you should also run: `pip install -r requirements-dev.txt`.
3638

3739
To verify the installation, connect the crazyflie and run an example: `python examples/basiclog`
3840

39-
#### Install serial driver dependencies
41+
### Pre commit hooks
42+
If you want some extra help with keeping to the mandated python coding style you can install hooks that verify your style at commit time. This is done by running:
43+
```
44+
$ pre-commit install
45+
```
46+
This will run the lint checkers defined in `.pre-commit-config-yaml` on your proposed changes and alert you if you need to change anything.
47+
48+
## Testing
49+
### With docker and the toolbelt
50+
51+
For information and installation of the
52+
[toolbelt.](https://wiki.bitcraze.io/projects:dockerbuilderimage:index)
53+
54+
* Check to see if you pass tests: `tb test`
55+
* Check to see if you pass style guidelines: `tb verify`
56+
57+
Note: Docker and the toolbelt is an optional way of running tests and reduces the
58+
work needed to maintain your python environment.
59+
60+
### Native python on Linux, OSX, Windows
61+
[Tox](http://tox.readthedocs.org/en/latest/) is used for native testing: `pip install tox`
62+
* If test fails after installing tox with `pip install tox`, installing with `sudo apt-get install tox`result a successful test run
63+
64+
* Test package in python3.4 `TOXENV=py34 tox`
65+
* Test package in python3.6 `TOXENV=py36 tox`
66+
67+
Note: You must have the specific python versions on your machine or tests will fail. (ie. without specifying the TOXENV, `tox` runs tests for python 3.3, 3.4 and would require all python versions to be installed on the machine.)
68+
69+
70+
## Platform notes
71+
72+
### Linux
73+
74+
#### Setting udev permissions
75+
76+
The following steps make it possible to use the USB Radio without being root.
77+
78+
```
79+
sudo groupadd plugdev
80+
sudo usermod -a -G plugdev $USER
81+
```
82+
83+
You will need to log out and log in again in order to be a member of the plugdev group.
84+
85+
Create a file named ```/etc/udev/rules.d/99-crazyradio.rules``` and add the
86+
following:
87+
```
88+
# Crazyradio (normal operation)
89+
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
90+
# Bootloader
91+
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="0101", MODE="0664", GROUP="plugdev"
92+
```
93+
94+
To connect Crazyflie 2.0 via usb, create a file name ```/etc/udev/rules.d/99-crazyflie.rules``` and add the following:
95+
```
96+
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev"
97+
```
98+
99+
You can reload the udev-rules using the following:
100+
```
101+
sudo udevadm control --reload-rules
102+
sudo udevadm trigger
103+
```
104+
105+
[cfclient]: https://www.github.com/bitcraze/crazyflie-clients-python
106+
40107

41-
To use the serial driver, pyserial must be installed: `pip install pyserial`

0 commit comments

Comments
 (0)