To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 29f8aeed authored by beuchatp's avatar beuchatp

Minor corrections to the wiki

parent 51020d7a
# Table of Content
# Table of Contents
The wiki is split into the following sections
- [Installation and Setup](install_and_setup/README.md)
- [ROS structure](ros_structure/README.md)
......
# Installation
On this page:
- [For student and teacher](#for-stuent-and-teacher)
- [For student and teacher](#for-student-and-teacher)
- [Vicon Datastream SDK installation](#vicon-datastream-sdk-installation)
- [Additional steps for teacher](#additional-steps-for-teacher)
- [Steps for adding a Crazyflie to the system](#steps-for-adding-a-crazyflie-to-the-system)
......@@ -22,83 +22,62 @@ The ``<agent id>`` needs to be a unique number that is used as identication for
### Manual Installation
The installation process consists of the following steps:
- Installation of ROS: <br />
The detailed instructions for the installation of ROS can be found [here](http://wiki.ros.org/kinetic/Installation/Ubuntu).
- Clone this repository: <br />
Clone this repository into the desired location on your computer, we use the location ``~/dfall``:
- **Installation of ROS:** The detailed instructions for the installation of ROS can be found [here](http://wiki.ros.org/kinetic/Installation/Ubuntu).
- **Clone this repository:** Clone this repository into the desired location on your computer, we use the location ``~/dfall``:
```
mkdir -p ~/dfall
```
```
cd ~/dfall
```
```
git clone https://gitlab.ethz.ch/dfall/dfall-system.git
```
- USB Crazyradio and Python USB package: <br />
To set up the crazyradio USB dongle just copy the rule files ``99-crazyflie.rules`` and ``99-crazyradio.rules`` from directory ``install`` to the directory ``/etc/udev/rules.d``:
- **USB Crazyradio and Python USB package:** To set up the crazyradio USB dongle just copy the rule files ``99-crazyflie.rules`` and ``99-crazyradio.rules`` from directory ``install`` to the directory ``/etc/udev/rules.d``:
```
sudo cp ~/dfall/dfall-system/install/99-crazyflie.rules /etc/udev/rules.d
```
```
sudo cp ~/dfall/dfall-system/install/99-crazyradio.rules /etc/udev/rules.d
```
You also have to install the library ``pyusb``:
- **Install the library ``pyusb``:**
```
sudo apt-get update
```
```
sudo apt-get install python-pip
```
```
sudo pip install pyusb
```
The second command installs the python package management system ``python-pip``. The third command installs the python USB package ``pyusb``
- Environment Setup: <br />
Add a new line in the ``/etc/hosts`` file that links the teacher's IP with the domain name ``dfallmaster``, create a file called ``/etc/dfall_default_agent_id`` that contains the agent id, and create a file called ``/etc/dfall_default_coord_id`` that contains the coordinator id.
- **Environment Setup:** Add a new line in the ``/etc/hosts`` file that links the teacher's IP with the domain name ``dfallmaster``, create a file called ``/etc/dfall_default_agent_id`` that contains the agent id, and create a file called ``/etc/dfall_default_coord_id`` that contains the coordinator id.
```
sudo sh -c "echo '10.42.0.10 dfallmaster' >> /etc/hosts"
```
```
sudo sh -c "echo $1 >> /etc/dfall_default_agent_id"
```
```
sudo sh -c "echo 1 >> /etc/dfall_default_coord_id"
```
- Build the D-FaLL ROS Package: <br />
To do this you need to first change direction to the ``dfall_ws`` directory, where ``ws`` stands for workspace:
- **Build the D-FaLL ROS Package:** To do this you need to first change direction to the ``dfall_ws`` directory, where ``ws`` stands for workspace:
```
cd ~/dfall/dfall-system/dfall_ws
```
And then you build the D-FaLL ROS Package using the ``catkin_make`` command:
```
catkin_make -j4
```
- Source scripts in ``.bashrc``: <br />
Add following lines to the bottom of the file ``~/.bashrc`` (replace ``<catkin workspace>`` with correct directory)
- **Source scripts in ``.bashrc``:** Add following lines to the bottom of the file ``~/.bashrc`` (replace ``<catkin workspace>`` with correct directory)
```
source /opt/ros/kinetic/setup.bash
source <catkin workspace>/devel/setup.bash
......@@ -167,8 +146,12 @@ doing so are these:
3. Go to the file channelLUT.cpp (path:
`dfall_ws/src/dfall_pkg/GUI_Qt/CrazyFlyGUI/src/channelLUT.cpp`) and add an
entry with the name of the crazyflie and the radio address. Follow the
formatting that the other entries have.<br><br>
<img src="./pics/LUT.png" style="width: 450px;"/> <br><br>
formatting that the other entries have.
<p align="center">
<img src="./pics/LUT.png" style="width: 500px;"/>
</p>
4. Go to pps\_ws folder, and in a terminal write `catkin_make`<br><br>
5. Run the teacher's GUI, and if you registered correctly your crazyflie with the proper name in Vicon (and enabled it by ticking it in Vicon PC), in the crazyflies dropdown box, after pressing "refresh crazyflies" button you should be able to see the name you assigned.<br><br>
6. When you select it, you should see in the field "Radio address" in the radio address that you assigned to that name in channelLUT.cpp<br><br>
......
# ROS structure
<br><img src="./pics/ros_pics/GraphicalRepresentations.png"/> <br>
<p align="center">
<img src="./pics/ros_pics/GraphicalRepresentations.png" style="width: 500px;"/>
</p>
## Teacher Nodes
The following are the ros nodes that run on the teacher's computer. They are located in the root namespace.
......
......@@ -28,7 +28,9 @@ gyrosensor needs to initialize.
* Once started, you will see something like this:<br>
<img src="./pics/student_gui.png" style="width: 800px;"/> <br><br>
<p align="center">
<img src="./pics/student_gui.png" style="width: 500px;"/>
</p>
* Connect to/Disconnect from Crazyflie: this connects/disconnects your computer to the assigned Crazyflie using the Crazyradio USB dongle.<br>
* Crazyradio status: can take the values "Connected!", "Disconnected" or
......@@ -75,8 +77,12 @@ important files that should be taken into account.
* In `dfall_pkg/param`
* _ClientConfig.yaml_ <br><br>
<img src="./pics/client_config_yaml.png" style="width: 400px;"/> <br><br>
* _ClientConfig.yaml_
<p align="center">
<img src="./pics/client_config_yaml.png" style="width: 400px;"/>
</p>
This file needs to be changed to define names for the student controller. **The safeController property should not be changed!** <br>
*Usage:*
......@@ -143,14 +149,21 @@ important files that should be taken into account.
controller that is offered as a template for the student to start developing
their own controller. Change the file as you wish with your own controller
algorithm. The function partially shown below is the most important part of
our this file:<br><br>
<img src="./pics/custom_controller_src.png" style="width: 700px;"/> <br><br>
our this file:
<p align="center">
<img src="./pics/custom_controller_src.png" style="width: 500px;"/>
</p>
In the template you can also see an example of how to use the
`StudentController.yaml` to load parameters that you may want to change
without having to compile or restart the system. Here, as an example, we
pass some parameters that can be seen below:<br><br>
<img src="./pics/custom_controller_yaml.png" style="width: 400px;"/> <br><br>
pass some parameters that can be seen below:
<p align="center">
<img src="./pics/custom_controller_yaml.png" style="width: 500px;"/>
</p>
2. Go to `cd ~/work/D-FaLL-System/dfall_ws` and write `catkin_make`.
3. Once everything has compiled without errors, run the next launch file:
......@@ -196,9 +209,12 @@ to it*
3. Open another terminal and type `rqt`. Then, in the top bar, go to
Plugins->Visualization->Plot. A new plot will be added to the screen. If you
want more than one plot, just add several ones doing the same thing. You will
be seeing something like this:<br><br>
be seeing something like this:
<p align="center">
<img src="./pics/rqt_window_subplots.png" style="width: 400px;"/>
</p>
<img src="./pics/rqt_window_subplots.png" style="width: 400px;"/> <br><br>
4. In each subplot, to add data to plot, write the name of the topic you want to
plot in the field "Topic", e.g., if we want to plot the Z position of our
crazyflie, we would have to write here
......@@ -207,4 +223,4 @@ to it*
list of all the topics available when you start typing in the field "Topic". <br><br>
5. Start the Student node following the steps mentioned before (`roslaunch dfall_pkg Student.launch`) and enable the Student Controller.<br><br>
6. Once we are using the Student Controller, we will be seeing how the data
selected gets plotted in the rqt plots.
\ No newline at end of file
selected gets plotted in the rqt plots.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment