Commit ecd67e21 authored by beuchatp's avatar beuchatp
Browse files

Updated wiki and install folders for the change from pps_ws to dfall_ws, and...

Updated wiki and install folders for the change from pps_ws to dfall_ws, and from d_fall_pps to dfall_pkg
parent aae13fef
......@@ -24,8 +24,8 @@ rosdep update
#untar catkin workspace
#needs to run after ros installation because of symbolic link to CMakeLists.txt
mkdir -p ~/pps_ws/src
tar -xf package.tar.gz -C ~/pps_ws/src
mkdir -p ~/dfall_ws/src
tar -xf package.tar.gz -C ~/dfall_ws/src
#environment setup
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
......@@ -39,10 +39,10 @@ sudo cp ./99-crazyflie.rules /etc/udev/rules.d
sudo cp ./99-crazyradio.rules /etc/udev/rules.d
#build workspace
cd ~/pps_ws
cd ~/dfall_ws
catkin_make -j4
echo "source ~/pps_ws/devel/setup.bash" >> ~/.bashrc
source ~/pps_ws/devel/setup.bash
echo "source ~/pps_ws/src/d_fall_pps/launch/Config.sh" >> ~/.bashrc
source ~/pps_ws/src/d_fall_pps/launch/Config.sh
echo "source ~/dfall_ws/devel/setup.bash" >> ~/.bashrc
source ~/dfall_ws/devel/setup.bash
echo "source ~/dfall_ws/src/dfall_pkg/launch/Config.sh" >> ~/.bashrc
source ~/dfall_ws/src/dfall_pkg/launch/Config.sh
......@@ -35,9 +35,9 @@ git pull
The ``Student GUI`` can be launched from a terminal window with the following command:
```
roslaunch d_fall_pps Student.launch
roslaunch dfall_pkg Student.launch
```
This can be run from any directory because ``d_fall_pps`` is defined as an environment variable that points to the absolute foler location ``~/work/D-FaLL-System/pps_ws/src/d_fall_pps/launch/``
This can be run from any directory because ``dfall_pkg`` is defined as an environment variable that points to the absolute foler location ``~/work/D-FaLL-System/dfall_ws/src/dfall_pkg/launch/``
### How do I make changes to a ``*.cpp`` file take effect?
......@@ -45,9 +45,9 @@ In essence you need to re-compile the code and re-launch all ROS nodes.
<b>Step 1)</b> Kill all ROS processes that are running nodes from the ``D-FaLL-System`` repository, i.e., you must kill the ``Student GUI`` node but you do not need to kill an ``rqt`` plotting node. To kill a process press ``Ctrl+c`` from the terminal window that is running the process.
<b>Step 2)</b> In a terminal window, change to the ``pps_ws`` folder of the repository (where ``ws`` stands for workspace. On a machine setup as per the instructions this is:
<b>Step 2)</b> In a terminal window, change to the ``dfall_ws`` folder of the repository (where ``ws`` stands for workspace. On a machine setup as per the instructions this is:
```
cd ~work/D-FaLL-System/pps_ws/
cd ~work/D-FaLL-System/dfall_ws/
```
<b>Step 3)</b> Compile the repository, which includes your changes, using the command:
```
......@@ -79,7 +79,7 @@ This can happen for a variety of reasons, and generally relates to the local com
To understand how Step 5) could actually fix the problem, consider that ``~/.bashrc`` is run when a new terminal window is opened, and as part of installing the ``D-FaLL-System`` the following line is added to the ``.bashrc``:
``
source <catkin workspace>/src/d_fall_pps/launch/Config.sh
source <catkin workspace>/src/dfall_pkg/launch/Config.sh
``
And if you look at the ``Config.sh`` file in the repository you see that it defines environment variable relating to the ``ROS_MASTER_URI``, ``ROS_IP``, and ``ROS_NAMESPACE``. On occassion these are not properly defined on start up or are changed, hence closing and re-launching Terminal can resolve the problem.
......@@ -91,9 +91,9 @@ The Vicon motion capture system provides position and attitude information via a
To check whether the Vicon Datastream software is properly added to the local computer, goto the [Installation](installation.md) wiki page and follow the instructions under the title "Vicon Datastream SDK Installation".
The main requirements are that:
- The ``DataStreamClient.h`` header file needs to be located in ``~/pps_ws/src/d_fall_pps/lib/vicon/``,
- The ``libViconDataStreamSDK_CPP.so`` shared object needs to be located in ``~/pps_ws/src/d_fall_pps/lib/vicon/``, and
- A number of files of the form ``libboost_*`` should also be located in ``~/pps_ws/src/d_fall_pps/lib/vicon/``.
- The ``DataStreamClient.h`` header file needs to be located in ``~/dfall_ws/src/dfall_pkg/lib/vicon/``,
- The ``libViconDataStreamSDK_CPP.so`` shared object needs to be located in ``~/dfall_ws/src/dfall_pkg/lib/vicon/``, and
- A number of files of the form ``libboost_*`` should also be located in ``~/dfall_ws/src/dfall_pkg/lib/vicon/``.
......@@ -131,7 +131,7 @@ my_current_xyz_yaw_publisher = nodeHandle.advertise<Setpoint>("/<ID>/my_current_
```
where ``<ID>`` should be replaced by the ID of your computer, for example the number 7, ``my_current_xyz_yaw_topic`` is the name of the message topic that will be published, and ``Setpoint`` specifies the stucture of the message as defined in the file ``/msg/Setpoint.msg`` and included with:
```
#include "d_fall_pps/Setpoint.h"
#include "dfall_pkg/Setpoint.h"
```
added at the top of your ``StudentControllerService.cpp`` file.
......
......@@ -5,7 +5,7 @@
### Install Script
Installation with the install script is the easiest. You will need:
- the install script
- the ``d_fall_pps`` package compressed in a file called ``package.tar.gz``
- the ``dfall_pkg`` package compressed in a file called ``package.tar.gz``
- the rule files for the USB connection to the crazyradio, called ``99-crazyflie.rules`` and ``99-crazyradio.rules``
These files all need to be in the same directory. To run the installation, move to the containing directory (pps\ install) and call it with
......@@ -21,7 +21,7 @@ The installation process consists of the following steps:
The detailed instructions for the installation of ROS can be found [here](http://wiki.ros.org/kinetic/Installation/Ubuntu).
- Workspace: <br />
Create a new catkin workspace and copy the ``d_fall_pps`` package into the ``src`` folder of the workspace. Then build the package with ``catkin_make`` called from the workspace root.
Create a new catkin workspace and copy the ``dfall_pkg`` package into the ``src`` folder of the workspace. Then build the package with ``catkin_make`` called from the workspace root.
- Environment Setup: <br />
Add a new line in the ``/etc/hosts`` file that links the teacher's IP with the domain name ``teacher`` and create a file called ``/etc/StudentID`` that contains the student id. Only write digits without any other symbols or whitespace characters.
......@@ -47,7 +47,7 @@ Add following lines to the bottom of the file ``~/.bashrc`` (replace ``<catkin w
```
source /opt/ros/kinetic/setup.bash
source <catkin workspace>/devel/setup.bash
source <catkin workspace>/src/d_fall_pps/launch/Config.sh
source <catkin workspace>/src/dfall_pkg/launch/Config.sh
```
The workspace setup script will only appear after the first compilation of the catkin workspace.
......@@ -63,11 +63,11 @@ A Vicon motion capture system can be used to provide position and attitude measu
- De-compress the downloaded file and open the folder that corresponds to the latest ``Linux64-boost-1.xx.x`` version, when tested this was ``1.58.0``
- From the files found in this folder, copy the file ``DataStreamClient.h`` into the following folder:
```
~/pps_ws/src/d_fall_pps/include/
~/dfall_ws/src/dfall_pkg/include/
```
- Copy the file ``libViconDataStreamSDK_CPP.so`` into the following folder (noting that the folder ``lib`` and ``vicon`` may need to be created):
```
~/pps_ws/src/d_fall_pps/lib/vicon/
~/dfall_ws/src/dfall_pkg/lib/vicon/
```
- Copy all the files of the form ``libboost_*`` into the same ``/lib/vicon/`` folder
- Note that the ``DataStreamClient.h`` header file and the ``/lib/vicon/`` folder are in the ``.gitignore`` and hence will not be tracked or removed by the git repository (though some more advanced git commands may still remove them anyway).
......@@ -78,7 +78,7 @@ A Vicon motion capture system can be used to provide position and attitude measu
### Removing Config.sh and replacing
As the teacher must not source the script ``Config.sh``, the ``.bashrc`` must be edited and the last line
```
source ~/pps_ws/src/d_fall_pps/launch/Config.sh
source ~/dfall_ws/src/dfall_pkg/launch/Config.sh
```
must be replaced with
```
......@@ -109,7 +109,7 @@ doing so are these:
changes to take effect) <br><br>
2. After having put some reflective markers in the crazyflie, register it in the Vicon system with the name that you want. (in the PPS case, we call them PPS_CFXX)<br><br>
3. Go to the file channelLUT.cpp (path:
`pps_ws/src/d_fall_pps/GUI_Qt/CrazyFlyGUI/src/channelLUT.cpp`) and add an
`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>
......
......@@ -13,7 +13,7 @@ echo $ROS_NAMESPACE
This environment vairable is set in the file:
```
pps_ws/src/d_fall_pps/launch/Config.sh
dfall_ws/src/dfall_pkg/launch/Config.sh
```
The environemnt variable is set by the following line in that file:
```
......
......@@ -95,7 +95,7 @@ Then go to the _IPv4 Settings_ and choose **Manual** as the _Method_ and then ad
### Vicon, teacher and students
During installation process is the IP address of the teacher set to 10.42.0.10. (This value is written to the /etc/hosts file such that this IP address is accessible through the keyword _teacher_) <br>
Have a look at `Config.sh` in `~/pps_ws/src/d_fall_pps/launch/`
Have a look at `Config.sh` in `~/dfall_ws/src/dfall_pkg/launch/`
<br><img src="./pics/setup_pics/configsh2.png" style="width: 500px;"/> <br>
Here you see, that the ROS Master URI is set to be the teacher. This means that _roscore_ runs only on the teacher's computer. Your own IP address (_ROS IP_) is also set and taken from your Ethernet settings as defined in the section _Setting up the Vicon network_.
<br>
......
......@@ -11,7 +11,7 @@ gyrosensor needs to initialize.
* In the software side, everything has already been set up for the course, but
it would be helpful to check if the repository is in the last version, and
if the source code has been properly compiled. To do this, follow the next steps:
1. Go to the next folder: `cd ~/work/D-FaLL-System/pps_ws`
1. Go to the next folder: `cd ~/work/D-FaLL-System/dfall_ws`
2. Checkout master branch of the repository and pull:<br />
``git checkout master``<br />
``git pull origin master``<br />
......@@ -26,7 +26,7 @@ gyrosensor needs to initialize.
* Once all the prerequisites have been fulfilled, we can start the student's
GUI by going to a terminal and typing:
`roslaunch d_fall_pps Student.launch`
`roslaunch dfall_pkg Student.launch`
*Note: for this to work, the teacher's computer has to be connected to the
network and the teacher's GUI has to be started before. Please wait until
......@@ -69,7 +69,7 @@ gyrosensor needs to initialize.
safe controller to get familiar with the system.
*Note: there are different parameters in the file called
`SafeController.yaml`, in the folder param (use `roscd d_fall_pps/param` in a
`SafeController.yaml`, in the folder param (use `roscd dfall_pkg/param` in a
terminal to go there).* **These are the safe controller parameters and should NOT be
changed.** *Take a look at the file and get familiar with the format used,
since may have to write your own for the student controller.*
......@@ -81,12 +81,12 @@ important files that should be taken into account.
#### Files of interest:
* In `d_fall_pps/src`
* In `dfall_pkg/src`
* _StudentControllerService.cpp_ <br>
The file where students can implement their own controller. It provides already the ros service with the teacher. It can be used as a template.
* In `d_fall_pps/param`
* In `dfall_pkg/param`
* _ClientConfig.yaml_ <br><br>
<img src="./pics/client_config_yaml.png" style="width: 400px;"/> <br><br>
......@@ -119,7 +119,7 @@ important files that should be taken into account.
*Sets the low battery thresholds at which the crazyflie will automatically
land. **Do not change these values.***
* In `d_fall_pps/`
* In `dfall_pkg/`
* CMakeLists.txt
......@@ -131,7 +131,7 @@ important files that should be taken into account.
<!-- ##### -- Useful files: -->
<!-- in `pps_ws/src/d_fall_pps/scripts` -->
<!-- in `dfall_ws/src/dfall_pkg/scripts` -->
<!-- -\-> call scripts in terminal by going to the above path and then typing -->
<!-- ./SCRIPTNAME, e.g.: `./enable_crazyflie` -->
......@@ -144,11 +144,11 @@ important files that should be taken into account.
<!-- ##### -- Files to look at: -->
<!-- in `pps_ws/src/d_fall_pps/param` -->
<!-- in `dfall_ws/src/dfall_pkg/param` -->
<!-- * _SafeController.yaml_ <br> -->
<!-- This file contains the control parameters that the SafeControllerService uses. The SafeControllerService loads this file when it starts. You might want to use a similar approach and can try to copy some functionality from SafeControllerService.cpp. -->
<!-- in `pps_ws/scr/d_fall_pps/launch` <br> -->
<!-- in `dfall_ws/scr/dfall_pkg/launch` <br> -->
<!-- The launch files contained in this directory are used to launch several nodes and some parameter files to be launched simultaneously. It is best, that you take a look at them yourself, but here is a brief explanation what the different launch files are for.<br> -->
<!-- To start the whole thing type the following in a terminal whilst being in the launch directory.<br> -->
<!-- `roslaunch filename.launch` -->
......@@ -177,10 +177,10 @@ important files that should be taken into account.
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>
2. Go to `cd ~/work/D-FaLL-System/pps_ws` and write `catkin_make`.
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:
`roslaunch d_fall_pps Student.launch`. This will run the student's GUI.
`roslaunch dfall_pkg Student.launch`. This will run the student's GUI.
4. Make sure that your Crazyflie is turned ON and connect to it. Choose the tab
called *Student Controller* and click on the button *Enable Student Controller*
......@@ -218,7 +218,7 @@ to it*
vicon\_y,...). Additionally, there are up to 10 general purpose variables
that can be filled with any data we may be interested in plotting (value\_1,
value\_2,...., value\_10). <br><br>
2. Once chosen the variables, save the file and go to `cd ~/work/D-FaLL-System/pps_ws` and write `catkin_make`.<br><br>
2. Once chosen the variables, save the file and go to `cd ~/work/D-FaLL-System/dfall_ws` and write `catkin_make`.<br><br>
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
......@@ -231,7 +231,7 @@ to it*
`/<student_id>/StudentControllerService/DebugTopic/vicon_z`. You can see an
autocompletion of the
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 d_fall_pps Student.launch`) and enable the Student Controller.<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.
......@@ -242,12 +242,12 @@ to it*
<!-- **Setup** -->
<!-- 1. Teacher must run his part, that publishes ViconData for students and hosts the roscore. -->
<!-- 2. Each student/group has a CrazyFlie and a laptop. -->
<!-- 3. Use `roscd d_fall_pps/launch` in a terminal as well as `roscd d_fall_pps/scripts` in another terminal -->
<!-- 3. Use `roscd dfall_pkg/launch` in a terminal as well as `roscd dfall_pkg/scripts` in another terminal -->
<!-- <br> -->
<!-- **Working** -->
<!-- 1. Adjust your custom controller -->
<!-- 2. Use `catkin_make` in the pps_ws directory to compile your controller implementation -->
<!-- 2. Use `catkin_make` in the dfall_ws directory to compile your controller implementation -->
<!-- 3. Start your crazyflie -->
<!-- 4. Launch the correct file in the launch directory as described above. ClientConfig.yaml has to be correct. -->
<!-- 5. Use the scripts to change from the safe to your custom controller. -->
......
Supports Markdown
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