Commit 95c3ae13 authored by phfriedlHome's avatar phfriedlHome
Browse files

wiki page for workflow finished

parent 49eedf0e
......@@ -21,6 +21,9 @@ Usage: <br>
`customController: "SERVICENAME/TOPICNAME"` <br>
where SERVICENAME is the name of the cpp-file that contains the custom controller (e.g. the provided template CustomControllerService) and <br>
where TOPICNAME is the defined name for the topic which is defined insided the controller's code.
<br><br>
There are two additional values. By setting _strictSafety_ to true you limit your custom controller from assuming certain angles before the safe controller takes over. Set it to false and the safe controller only takes over when the crazyflie flies out of its defined range. <br>
The _angleMargin_ value can be used to change the acceptable angles for pitch and roll. angleMargin=1 means that your crazyflie could flip 90°. The safe controller might not recover from such angles. Therefore you should use values in the range of 0.4 to 0.7.
##### -- Useful files:
in `pps_ws/src/d_fall_pps/scripts`
......@@ -29,7 +32,8 @@ in `pps_ws/src/d_fall_pps/scripts`
* *enable_crazyflie*
* *load_custom_controller*
* *load_safe_controller*
* *safe_controller_setpoint*
* *safe_controller_setpoint* <br>
this one needs 4 parameters for x,y,z and yaw. The setpoint of the crazyflie is then set to those values.
##### -- Files to look at:
......@@ -37,26 +41,43 @@ in `pps_ws/src/d_fall_pps/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>
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`
* _Teacher.launch_<br>
This doesn't concern the students. This launches the GUI for the teacher and the services he needs.
* _Student.launch_ !!!<br>
This launches the nodes for the CrazyRadio, the PPSClient, SafeController and CustomController. Make sure that __ClientConfig__ is correctly set up.
<br><br>
* _StudentCirlce.launch_ : as an example<br>
This launches CircleControllerService instead of the normal CustomControllerService. Therefore the ClientConfig has to be adjusted. This should show a way of how to work with the CustomControllerService.
* _StudentFollow.launch_ : as an example<br>
As the circle launcher, this starts another service that enables one crazyflie to _copy_ the behavior of another crazyflie. For this to work, two student groups have to collaborate because some things have to manipulated manually in the cpp files of the Circle and Follow code.
---
## Workflow:
**Setup**
1. Teacher must run his part, that publishes ViconData for students and hosts the roscore.
2. Each student/group has a CrazyFlie
3.
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
<br>
**Working**
1. Adjust your custom controller
2. Use `make CustomController.cpp` to compile your controller implementation
3. Start your crazyflie
4. Go to
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.
6. When your done, you can turn of your crazyflie by using the script `disable_crazyflie`.
7. Repeat
<br><br>
---
**Troubleshooting**
- _SafeController is not working_ <br>
Was the antenna of the crazyflie facing in the *opposite* direction of the defined Vicon x-axis? --> Define it again! <br>
The crazyflie has to lie on the table when you turn it on because the gyro sensor is initialized upon start-up. <br>
Is the crazyflie still properly showing in the ViconTracker software? --> Define it again and check that the markers don't move!
- Config.sh sourced? <br>
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