From 29f8aeed033ca62f79413a1ac1a5b3051f7662cd Mon Sep 17 00:00:00 2001 From: beuchatp <beuchatp@control.ee.ethz.ch> Date: Thu, 21 May 2020 20:04:17 +0200 Subject: [PATCH] Minor corrections to the wiki --- wiki/README.md | 2 +- .../installation_on_ubuntu.md | 45 ++++++------------ wiki/{ => install_and_setup}/pics/LUT.png | Bin .../ros_pics/GraphicalRepresentations.png | Bin wiki/ros_structure/ros_structure.md | 6 ++- .../pics/client_config_yaml.png | Bin .../pics/custom_controller_src.png | Bin .../pics/custom_controller_yaml.png | Bin .../pics/rqt_window_subplots.png | Bin .../pics/student_gui.png | Bin .../workflow_for_students.md | 36 ++++++++++---- 11 files changed, 46 insertions(+), 43 deletions(-) rename wiki/{ => install_and_setup}/pics/LUT.png (100%) rename wiki/{ => ros_structure}/pics/ros_pics/GraphicalRepresentations.png (100%) rename wiki/{ => workflow_for_students}/pics/client_config_yaml.png (100%) rename wiki/{ => workflow_for_students}/pics/custom_controller_src.png (100%) rename wiki/{ => workflow_for_students}/pics/custom_controller_yaml.png (100%) rename wiki/{ => workflow_for_students}/pics/rqt_window_subplots.png (100%) rename wiki/{ => workflow_for_students}/pics/student_gui.png (100%) diff --git a/wiki/README.md b/wiki/README.md index 72e3d3b4..330d036f 100644 --- a/wiki/README.md +++ b/wiki/README.md @@ -1,4 +1,4 @@ -# 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) diff --git a/wiki/install_and_setup/installation_on_ubuntu.md b/wiki/install_and_setup/installation_on_ubuntu.md index 985e396b..3efd65cb 100644 --- a/wiki/install_and_setup/installation_on_ubuntu.md +++ b/wiki/install_and_setup/installation_on_ubuntu.md @@ -1,7 +1,7 @@ # 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> diff --git a/wiki/pics/LUT.png b/wiki/install_and_setup/pics/LUT.png similarity index 100% rename from wiki/pics/LUT.png rename to wiki/install_and_setup/pics/LUT.png diff --git a/wiki/pics/ros_pics/GraphicalRepresentations.png b/wiki/ros_structure/pics/ros_pics/GraphicalRepresentations.png similarity index 100% rename from wiki/pics/ros_pics/GraphicalRepresentations.png rename to wiki/ros_structure/pics/ros_pics/GraphicalRepresentations.png diff --git a/wiki/ros_structure/ros_structure.md b/wiki/ros_structure/ros_structure.md index aa4619a9..a6990fbd 100644 --- a/wiki/ros_structure/ros_structure.md +++ b/wiki/ros_structure/ros_structure.md @@ -1,5 +1,9 @@ # 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. diff --git a/wiki/pics/client_config_yaml.png b/wiki/workflow_for_students/pics/client_config_yaml.png similarity index 100% rename from wiki/pics/client_config_yaml.png rename to wiki/workflow_for_students/pics/client_config_yaml.png diff --git a/wiki/pics/custom_controller_src.png b/wiki/workflow_for_students/pics/custom_controller_src.png similarity index 100% rename from wiki/pics/custom_controller_src.png rename to wiki/workflow_for_students/pics/custom_controller_src.png diff --git a/wiki/pics/custom_controller_yaml.png b/wiki/workflow_for_students/pics/custom_controller_yaml.png similarity index 100% rename from wiki/pics/custom_controller_yaml.png rename to wiki/workflow_for_students/pics/custom_controller_yaml.png diff --git a/wiki/pics/rqt_window_subplots.png b/wiki/workflow_for_students/pics/rqt_window_subplots.png similarity index 100% rename from wiki/pics/rqt_window_subplots.png rename to wiki/workflow_for_students/pics/rqt_window_subplots.png diff --git a/wiki/pics/student_gui.png b/wiki/workflow_for_students/pics/student_gui.png similarity index 100% rename from wiki/pics/student_gui.png rename to wiki/workflow_for_students/pics/student_gui.png diff --git a/wiki/workflow_for_students/workflow_for_students.md b/wiki/workflow_for_students/workflow_for_students.md index c0b01ce4..f2d4ca92 100644 --- a/wiki/workflow_for_students/workflow_for_students.md +++ b/wiki/workflow_for_students/workflow_for_students.md @@ -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. -- GitLab