From 2089f248debe1ab1a2d6244bf201dd273d0b19c4 Mon Sep 17 00:00:00 2001 From: beuchatp <beuchatp@control.ee.ethz.ch> Date: Wed, 20 May 2020 11:21:08 +0200 Subject: [PATCH] Re-arranged the installing and setup section of the wiki --- wiki/install_and_setup/README.md | 11 +- wiki/install_and_setup/setup.md | 127 ----------------------- wiki/install_and_setup/setup_firmware.md | 38 +++++++ wiki/install_and_setup/setup_network.md | 44 ++++++++ wiki/install_and_setup/setup_vicon.md | 76 ++++++++++++++ 5 files changed, 166 insertions(+), 130 deletions(-) delete mode 100644 wiki/install_and_setup/setup.md create mode 100644 wiki/install_and_setup/setup_firmware.md create mode 100644 wiki/install_and_setup/setup_network.md create mode 100644 wiki/install_and_setup/setup_vicon.md diff --git a/wiki/install_and_setup/README.md b/wiki/install_and_setup/README.md index 10a7e6a4..bde854b2 100644 --- a/wiki/install_and_setup/README.md +++ b/wiki/install_and_setup/README.md @@ -1,4 +1,9 @@ -# Installation and Setup Table of Content -This section of the wiki contains the following information: -- [Setup](setup.md) +# Installation ToC: + - [Installation](installation.md) + +# Setup ToC: + +- [Crazyflie Firmeware Setup](setup_firmware.md) +- [Vicon Motion Capture Setup](setup_vicon.md) +- [Network Setup](setup_network.md) diff --git a/wiki/install_and_setup/setup.md b/wiki/install_and_setup/setup.md deleted file mode 100644 index f349581a..00000000 --- a/wiki/install_and_setup/setup.md +++ /dev/null @@ -1,127 +0,0 @@ -# Setup -Contents: -- [Vicon](#vicon) -- [Firmware and channel](#firmware-and-channel) -- [Network](#network) - -## Vicon -### What is Vicon -Vicon is the tracking system for this project. The four cameras in each corner of the room can track the gray markers. One can define objects in the ViconTracker software. Those are then visible in the software or their location data can be shared over a network with others. - -### Our Vicon Setup -<img src="./pics/setup_pics/differentlayouts.jpg" style="width: 250px;float: right;"/> -For the PPS we have a separate computer that runs the ViconTracker software. There we define the crazyflie objects that need three markers in slightly different layouts to be distinguishable from another. (see right side) - -ViconTracker sends ViconData over the network to the teacher's computer. The teacher computer distributes the data to the students. - -### Instructions -#### Calibrating Vicon -1. For calibrating Vicon go to *CALIBRATE* where you should choose *Camera-PixelView* as the *view type*. -<img src="./pics/setup_pics/calibration1.png" style="width: 500px"/> <br><br> - -2. Click on *START* in the *Calibrate Cameras* section. Now you have to walk around the room with the L-wand and swing it in every direction. You can stop when the program is finished. -<img src="./pics/setup_pics/calibration2.png" style="width: 500px"/> <br><br> - -3. Then you have to lay the wand down somewhere in the room, where you want the origin of the coordinate system to be. How the wand defines the x- and y-axis is shown below. (The handle defines the y-axis, where positive is in direction of orange part. The x-axis is positive in the direction of the longer arm)<br> -Click on *SET ORIGIN* and you're set.<br> -<img src="./pics/setup_pics/calibration3.png" style="width: 300px;"/> <img src="./pics/setup_pics/wand.jpg" style="width: 220px;"/> <br><br> - - -#### Defining a CrazyFlie in ViconTracker -1. Go to *OBJECTS* and choose *Camera-3D* as the *view type* <br> There you should see some markers. -<br><img src="./pics/setup_pics/defining1.png" style="width: 500px;"/> <br><br> - -2. Make sure that the crazyflie antenna is facing in the positive x-axis when you define the crazyflie, because the controller relies on this configuration. -<br> <img src="./pics/setup_pics/cforientation.jpg" style="width: 350px;"/> <br><br> - -3. Define an object by `ctrl-rightclick` on the markers and name it in the down left corner. Finish by clicking *CREATE* and saving with `ctrl-s`. Vicon doesn't share the object's data if you don't save. <br> -<br><img src="./pics/setup_pics/defining2.png" style="width: 500px;"/> <br><br> - -4. That's how it looks afterwards <br> -<br><img src="./pics/setup_pics/defining3.png" style="width: 500px;"/> <br><br> - - -## Firmware and channel -The firmware of a crazyflie is updated by the teacher. Additionally, the teacher can set the channel of the crazyflies to prevent interference.<br> - -### Firmware -Instructions for flashing the firmware with the Crazyflie client can be found either here: -<br> -https://wiki.bitcraze.io/doc:crazyflie:client:pycfclient:index#firmware_upgrade -<br> -or here: -<br> -https://www.bitcraze.io/getting-started-with-the-crazyflie-2-0/#update-fw -<br> -The compiled versions of the Crazyflie firmware that are compatible with the `D-FaLL-System` can be found in the `crazyflie-firmware` folder of the repository. -<br> -<br> -If you have installed the Crazyflie Client properly, as described in the installation section, it can be started via a terminal window by typing `cfclient`. -<br> -<br> -Flashing is done wirelessly over the CrazyRadio link, both for the STM32 main processor chip and the NRF bluetooth chip. You need to specify the correct address in the Crazyflie Client prior to following the steps below, i.e., the 0xE7E7E7E701 type address. For powering the Crazyflie during flashing, it is convenient to connect the Crazyflie to the computer using a USB cable. -<br> -<br> -The steps to flash the crazyflie are: -1. Start the Crazyflie Client from terminal using the command `cfclient`<br> -2. Turn the Crazyflie off<br> -3. Start the Crazyflie in bootloader mode by pressing the ON/OFF button for 3 second. Two blue LEDs will start blinking to indicate the the Crazyflie has powered on into bootloader mode<br> -4. In the Crazyflie Client, select `Connect -> Bootloader` from the top menu. This causes a window titled `Crazyflie Service` to appear<br> -5. In the `Crazyflie Service` window, press the `Initiate bootloader cold boot` button<br> -6. Once the status says `Connected to bootloader`, click the `Browse` button and select the file you wish to flash on the Crazyflie. Typically this file will be something like `cf2.bin` for flashing only the STM32 main processor, or `crazyflie-firmware.zip` for flashing both the NRF and STM32 processors<br> -7. Click the `Program` button. The progress bar will go from 0% to 100% one time for each of the processors to be flashed<br> -8. Wait until the uploading and writing of the new firmware is complete<br> -9. Click the `Restart in firmware mode` button. This causes the Crazyflie to reboot and the new firmware is now running<br> -10. Turn off the Crazyflie<br> -11. Either click the `Cancel bootloading` button or simply close the `Crazyflie Service` window<br><br> - -### Channel changing -This is also described on the page linked above. Use the following format: 0/__xx__/2M where __xx__ stands for the radio channel.<br> -The crazyflie has to be restared for the changes to take effect.<br> - - - -## Network -### Setting up the Vicon network -Inseret the Ethernet cable from Vicon into your computer and go to network settings in the top right corner. Click on _Edit Connections..._ <br> -Choose the Ethernet connection (probably named _wired connection 1_) and click on _edit_. -<br><img src="./pics/setup_pics/viconNetwork1.png" style="width: 500px;"/> <br> -Change the connection name to _Vicon_. -<br><img src="./pics/setup_pics/viconNetwork2.png" style="width: 500px;"/> <br> -Then go to the _IPv4 Settings_ and choose **Manual** as the _Method_ and then add your IP address provided by your teacher (Form 10.42.0.xx). Click tab twice and _save_. -<br><img src="./pics/setup_pics/viconNetwork3.png" style="width: 500px;"/> <br> -**Don't forget to choose the Vicon network manually if you choose to enable WiFi and Ethernet simultaneously as described below!** - -<br> - -### 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 _dfallmaster_) <br> -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> - -### IP-Addresses -Currently the teacher's IP is ``10.42.0.10`` and the student's IP are of the format ``10.42.0.xx``, where xx is an unused address. - -### Using WLAN and Vicon simultaneously -Without some adjustments it is not possible to use an Ethernet and a wireless network at the same time. Vicon is connected via cable and therefore wouldn't allow a connection to the Internet. Because it's tedious to always unplug the cable just to be able to look something up on Google, we provide an explanation on how to enable simultaneous usage of WLAN and Vicon. <br> -**But careful: If you enable this setting you have to choose the Vicon network manually. This is a common mistake! You will get an error if the cable is inserted but not manually chosen as shown in the picture below.** -<br><img src="./pics/setup_pics/chooseVicon.jpg" style="width: 500px;"/> <br> -#### Step by Step: -Ubuntu allows multiple connections by default, but sometimes, we need to specify which one to use. Here we use LAN for the Intranet and WiFi for the Internet. - -So, firstly search for Network Connections in the unity dash. Then, under the Ethernet section, click 'Add' button. -<br><img src="./pics/setup_pics/internetethernet1.png" style="width: 500px;"/> <br> - -Then, we need to create a new Ethernet connection which we are going to enable manually. Uncheck the option of connecting automatically since this is your Intranet connection. **Choose _Vicon_ as a name instead of Intranet** -<br><img src="./pics/setup_pics/internetethernet2.png" style="width: 500px;"/> <br> - -Then go to the IPv4/IPv6 settings (depending on your network) and then click on the Routes button. Check the 'Use this connection only for resources on its network' option. Click Save. -<br><img src="./pics/setup_pics/internetethernet3.png" style="width: 500px;"/> <br> -Now you can use both the LAN and WiFi simultaneously. - -<br> -Source: <br> https://askubuntu.com/questions/639100/how-to-get-connection-to-both-wifi-as-well-as-lan-in-ubuntu-14-04-lts#639425 -<br> -Some additional informations: <br> http://aleksz-programming.blogspot.ch/2013/01/using-wifi-and-network-cable-at-same.html diff --git a/wiki/install_and_setup/setup_firmware.md b/wiki/install_and_setup/setup_firmware.md new file mode 100644 index 00000000..93746fb9 --- /dev/null +++ b/wiki/install_and_setup/setup_firmware.md @@ -0,0 +1,38 @@ +# Firmware and channel +The firmware of a crazyflie is updated by the teacher. Additionally, the teacher can set the channel of the crazyflies to prevent interference.<br> + +## Firmware +Instructions for flashing the firmware with the Crazyflie client can be found either here: +<br> +https://wiki.bitcraze.io/doc:crazyflie:client:pycfclient:index#firmware_upgrade +<br> +or here: +<br> +https://www.bitcraze.io/getting-started-with-the-crazyflie-2-0/#update-fw +<br> +The compiled versions of the Crazyflie firmware that are compatible with the `D-FaLL-System` can be found in the `crazyflie-firmware` folder of the repository. +<br> +<br> +If you have installed the Crazyflie Client properly, as described in the installation section, it can be started via a terminal window by typing `cfclient`. +<br> +<br> +Flashing is done wirelessly over the CrazyRadio link, both for the STM32 main processor chip and the NRF bluetooth chip. You need to specify the correct address in the Crazyflie Client prior to following the steps below, i.e., the 0xE7E7E7E701 type address. For powering the Crazyflie during flashing, it is convenient to connect the Crazyflie to the computer using a USB cable. +<br> +<br> +The steps to flash the crazyflie are: +1. Start the Crazyflie Client from terminal using the command `cfclient`<br> +2. Turn the Crazyflie off<br> +3. Start the Crazyflie in bootloader mode by pressing the ON/OFF button for 3 second. Two blue LEDs will start blinking to indicate the the Crazyflie has powered on into bootloader mode<br> +4. In the Crazyflie Client, select `Connect -> Bootloader` from the top menu. This causes a window titled `Crazyflie Service` to appear<br> +5. In the `Crazyflie Service` window, press the `Initiate bootloader cold boot` button<br> +6. Once the status says `Connected to bootloader`, click the `Browse` button and select the file you wish to flash on the Crazyflie. Typically this file will be something like `cf2.bin` for flashing only the STM32 main processor, or `crazyflie-firmware.zip` for flashing both the NRF and STM32 processors<br> +7. Click the `Program` button. The progress bar will go from 0% to 100% one time for each of the processors to be flashed<br> +8. Wait until the uploading and writing of the new firmware is complete<br> +9. Click the `Restart in firmware mode` button. This causes the Crazyflie to reboot and the new firmware is now running<br> +10. Turn off the Crazyflie<br> +11. Either click the `Cancel bootloading` button or simply close the `Crazyflie Service` window<br><br> + +## Channel changing +This is also described on the page linked above. Use the following format: 0/__xx__/2M where __xx__ stands for the radio channel.<br> +The crazyflie has to be restared for the changes to take effect.<br> + diff --git a/wiki/install_and_setup/setup_network.md b/wiki/install_and_setup/setup_network.md new file mode 100644 index 00000000..176ea75b --- /dev/null +++ b/wiki/install_and_setup/setup_network.md @@ -0,0 +1,44 @@ +# Network Setup +## Setting up the Vicon network +Inseret the Ethernet cable from Vicon into your computer and go to network settings in the top right corner. Click on _Edit Connections..._ <br> +Choose the Ethernet connection (probably named _wired connection 1_) and click on _edit_. +<br><img src="./pics/setup_pics/viconNetwork1.png" style="width: 500px;"/> <br> +Change the connection name to _Vicon_. +<br><img src="./pics/setup_pics/viconNetwork2.png" style="width: 500px;"/> <br> +Then go to the _IPv4 Settings_ and choose **Manual** as the _Method_ and then add your IP address provided by your teacher (Form 10.42.0.xx). Click tab twice and _save_. +<br><img src="./pics/setup_pics/viconNetwork3.png" style="width: 500px;"/> <br> +**Don't forget to choose the Vicon network manually if you choose to enable WiFi and Ethernet simultaneously as described below!** + +<br> + +## 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 _dfallmaster_) <br> +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> + +## IP-Addresses +Currently the teacher's IP is ``10.42.0.10`` and the student's IP are of the format ``10.42.0.xx``, where xx is an unused address. + +## Using WLAN and Vicon simultaneously +Without some adjustments it is not possible to use an Ethernet and a wireless network at the same time. Vicon is connected via cable and therefore wouldn't allow a connection to the Internet. Because it's tedious to always unplug the cable just to be able to look something up on Google, we provide an explanation on how to enable simultaneous usage of WLAN and Vicon. <br> +**But careful: If you enable this setting you have to choose the Vicon network manually. This is a common mistake! You will get an error if the cable is inserted but not manually chosen as shown in the picture below.** +<br><img src="./pics/setup_pics/chooseVicon.jpg" style="width: 500px;"/> <br> +### Step by Step: +Ubuntu allows multiple connections by default, but sometimes, we need to specify which one to use. Here we use LAN for the Intranet and WiFi for the Internet. + +So, firstly search for Network Connections in the unity dash. Then, under the Ethernet section, click 'Add' button. +<br><img src="./pics/setup_pics/internetethernet1.png" style="width: 500px;"/> <br> + +Then, we need to create a new Ethernet connection which we are going to enable manually. Uncheck the option of connecting automatically since this is your Intranet connection. **Choose _Vicon_ as a name instead of Intranet** +<br><img src="./pics/setup_pics/internetethernet2.png" style="width: 500px;"/> <br> + +Then go to the IPv4/IPv6 settings (depending on your network) and then click on the Routes button. Check the 'Use this connection only for resources on its network' option. Click Save. +<br><img src="./pics/setup_pics/internetethernet3.png" style="width: 500px;"/> <br> +Now you can use both the LAN and WiFi simultaneously. + +<br> +Source: <br> https://askubuntu.com/questions/639100/how-to-get-connection-to-both-wifi-as-well-as-lan-in-ubuntu-14-04-lts#639425 +<br> +Some additional informations: <br> http://aleksz-programming.blogspot.ch/2013/01/using-wifi-and-network-cable-at-same.html diff --git a/wiki/install_and_setup/setup_vicon.md b/wiki/install_and_setup/setup_vicon.md new file mode 100644 index 00000000..9d44b4d2 --- /dev/null +++ b/wiki/install_and_setup/setup_vicon.md @@ -0,0 +1,76 @@ +# Vicon +## What is Vicon +Vicon is the tracking system for this project. The four cameras in each corner of the room can track the gray markers. One can define objects in the ViconTracker software. Those are then visible in the software or their location data can be shared over a network with others. + + + +## Our Vicon Setup + +For the D-FaLL space we have a separate computer that runs the Vicon Tracker software. Using that software we define the Crazyflie objects that utilise three markers in differing configurations so as to be distinguishable from one another, see picture. + +<p align="center"> +<img src="./pics/setup_pics/differentlayouts.jpg" style="width: 500px;"/> +</p> + +The Vicon Tracker software sends motion capture localisation data over the network to the `ViconDataPublisher` node, and this node then publishes the data onto the ROS network. We typically run the `ViconDataPublisher` node on a separate computer used by the teacher, and each student recieves the data on their computer via the ROS network. + + + +## Instructions +### Calibrating Vicon + +1. For calibrating Vicon go to *CALIBRATE* where you should choose *Camera-PixelView* as the *view type*. + +<p align="center"> +<img src="./pics/setup_pics/calibration1.png" style="width: 500px;"/> +</p> + +<br><br> + +2. Click on *START* in the *Calibrate Cameras* section. Now you have to walk around the room with the L-wand and swing it in every direction. You can stop when the program is finished. + +<p align="center"> +<img src="./pics/setup_pics/calibration2.png" style="width: 500px"/> +</p> + +<br><br> + +3. Then you have to lay the wand down somewhere in the room, where you want the origin of the coordinate system to be. How the wand defines the x- and y-axis is shown below. (The handle defines the y-axis, where positive is in direction of orange part. The x-axis is positive in the direction of the longer arm) + +<p align="center"> +<img src="./pics/setup_pics/wand.jpg" style="width: 500px;"/> <br><br> +</p> + +4. Click on *START* under the set volume origin section. This cause the button label to change to *SET ORIGIN*, click on this and you're done. + +<p align="center"> +<img src="./pics/setup_pics/calibration3.png" style="width: 500px;"/> +</p> + + + +### Defining a CrazyFlie in ViconTracker + +1. Go to *OBJECTS* and choose *Camera-3D* as the *view type*. There you should see some markers. + +<p align="center"> +<img src="./pics/setup_pics/defining1.png" style="width: 500px;"/> +</p> + +2. Make sure that the Crazyflie antenna is facing in the positive x-axis when you define the Crazyflie, because the controller relies on this configuration. + +<p align="center"> +<img src="./pics/setup_pics/cforientation.jpg" style="width: 500px;"/> +</p> + +3. Define an object by holding `ctrl` while you click on the markers that are to define the Crazyflie. Then type the name of this object in the box circled in the lower left corner. Finish by clicking *CREATE* and saving with `ctrl-s`. The Vicon Tracker software does not share the object's data if until you have saved the addition of this new object. + +<p align="center"> +<br><img src="./pics/setup_pics/defining2.png" style="width: 500px;"/> <br><br> +</p> + +4. After successfully defining the object, it should look like this: + +<p align="center"> +<img src="./pics/setup_pics/defining3.png" style="width: 500px;"/> +</p> -- GitLab