This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doc:lighthouse:setup [2019-03-07 16:42] arnaud |
doc:lighthouse:setup [2020-05-12 14:35] kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | ||
+ | </ | ||
+ | |||
====== Setting up the lighthouse deck ====== | ====== Setting up the lighthouse deck ====== | ||
Line 5: | Line 9: | ||
The lighthouse deck allows to use the HTC-Vive/ | The lighthouse deck allows to use the HTC-Vive/ | ||
- | The VR computer must have [[https:// | + | The VR computer must have [[https:// |
- | In order to setup the system you must also be able to compile a custom firmware for your Crazyflie and to program your Crazyflie 2.X. To do so youcan | + | In order to setup the system you must also be able to compile a custom firmware for your Crazyflie and to program your Crazyflie 2.X. To do so you can follow the [[https:// |
===== Setting up SteamVR without Head Mounted Display ===== | ===== Setting up SteamVR without Head Mounted Display ===== | ||
Line 13: | Line 17: | ||
If you already have a setup VR system jump to the next section. | If you already have a setup VR system jump to the next section. | ||
- | It is possible to setup the SteamVR without a Head Mounted Display (HDM). This allows to setup a minimal system with just two Base stations and one controller or tracker. It can be quite useful when a full VR system is not needed or to setup a system at fairs or conference. | + | It is possible to setup the SteamVR without a Head Mounted Display (HMD). This allows to setup a minimal system with just two Base stations and one controller or tracker. It can be quite useful when a full VR system is not needed or to setup a system at fairs or conference. |
- | Follow the guide from Triad: [[http:// | + | Follow the guide from Triad: [[http:// |
- | The only difference with an HDM setup is the orientation of the space: with an HDM the space will be oriented when you setup the room. Without an HDM the slave base station (the one in Mode A or C) will be at the origin of the space and the Z axis will be normal to the base station window. | + | <WRAP center round info> |
+ | **OSX** | ||
- | ===== Setting up the space origin and orientation with an HDM ===== | + | The osx implementation seems to be a bit shaky, but it is possible to make it work. I used the " |
+ | |||
+ | The paths in the triad instructions are for Windows. On Mac OSX you will find the files to update in | ||
+ | |||
+ | < | ||
+ | / | ||
+ | |||
+ | / | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | For the floor to be flat, it is good to start steamVR with the controller placed on the floor. The only difference with an HMD setup is the orientation of the space: with an HMD the space will be oriented when you setup the room. Without an HMD the master base station (the one in Mode B) will be at the origin of the space. The Z axis will be the vector normal to the base station window, pointing toward the inside of the base station and rotated around X to be parallel with the floor. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | <WRAP center round info> | ||
+ | **Troubleshooting** | ||
+ | |||
+ | If you get the following message when running the tracker_test.py script of the tutorial (step 16): | ||
+ | |||
+ | '' | ||
+ | |||
+ | Or this when running the script from the Crazyflie firmware repos: | ||
+ | |||
+ | < | ||
+ | $ python3 get_bs_position.py | ||
+ | Openning OpenVR | ||
+ | python3: Relink `/ | ||
+ | Segmentation fault (core dumped) | ||
+ | </ | ||
+ | |||
+ | Then you are maybe missing some essential packages for openvr: | ||
+ | |||
+ | * libudev-dev | ||
+ | * libvulkan-dev | ||
+ | * libsdl2-dev | ||
+ | |||
+ | On Ubuntu: | ||
+ | |||
+ | < | ||
+ | $ sudo apt-get install libudev-dev | ||
+ | $ python3 -m pip uninstall openvr | ||
+ | $ python3 -m pip install openvr | ||
+ | </ | ||
+ | |||
+ | if this still doesn' | ||
+ | [[https:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round info> | ||
+ | **Troubleshooting²** | ||
+ | |||
+ | When running SteamVR on Linux, by default the access right to USB device might not be configured right. If you have problem connecting the tracker/ | ||
+ | < | ||
+ | # cat > / | ||
+ | KERNEL==" | ||
+ | EOF | ||
+ | </ | ||
+ | |||
+ | You may need to restart SteamVR to see the connected devices. | ||
+ | </ | ||
+ | |||
+ | ===== Setting up the space origin and orientation with an HMD ===== | ||
When using a full VR setup, SteamVR has a developer menu that allows to quickly and accurately setup the system origin and orientation. By default the system origin is going to be placed in the center of the playground and the orientation will depend of the shape and of where the monitor is located. | When using a full VR setup, SteamVR has a developer menu that allows to quickly and accurately setup the system origin and orientation. By default the system origin is going to be placed in the center of the playground and the orientation will depend of the shape and of where the monitor is located. | ||
- | To set the orientation and origin yourself, you can go to the SteamVR settings, to the developer subscreen and you can display the room overview. Then you can place the HDM on the floor, with the front pointing at where you want the Crazyflie X axis to point, and then click 'Quick Calibrate': | + | To set the orientation and origin yourself, you can go to the SteamVR settings, to the developer subscreen and you can display the room overview. Then you can place the HMD on the floor, with the front pointing at where you want the Crazyflie X axis to point, and then click 'Quick Calibrate': |
{{: | {{: | ||
===== Getting the base station position and programming the Crazyflie ===== | ===== Getting the base station position and programming the Crazyflie ===== | ||
- | Launch SteamVR and make sure at least one controller or the HDM is tracking: | + | Launch SteamVR and make sure at least one controller or the HMD is tracking: |
{{: | {{: | ||
Line 34: | Line 105: | ||
Clone or download the latest version or the [[https:// | Clone or download the latest version or the [[https:// | ||
< | < | ||
- | pip install openvr | + | python3 -m pip install openvr |
cd tools\lighthouse | cd tools\lighthouse | ||
- | python | + | python3 |
</ | </ | ||
Line 51: | Line 122: | ||
</ | </ | ||
- | <WRAP center round info 80%> | + | <WRAP center round info> |
- | **Note**: If you have a setup without | + | **Note**: If you have a setup without |
</ | </ | ||
- | Copy the last two lines and, on the computer or virtual machine you use for Crazyflie development, | + | Copy the last two lines and, on the computer or virtual machine you use for Crazyflie development, |
{{: | {{: | ||
<code c> | <code c> | ||
- | // # | + | // #ifndef DISABLE_LIGHTHOUSE_DRIVER |
+ | // # | ||
+ | // #endif | ||
baseStationGeometry_t baseStationsGeometry[] = { | baseStationGeometry_t baseStationsGeometry[] = { | ||
Line 67: | Line 140: | ||
</ | </ | ||
- | Now that the Crazyflie firmware is modified | + | Now that the Crazyflie firmware is modified you can save, compile and program the Crazyflie. For example this can be done from command line with: |
< | < | ||
make | make | ||
Line 75: | Line 148: | ||
===== Space orientation, | ===== Space orientation, | ||
- | The orientation of the flying space will follow the orientation of the OpenVR | + | The OpenVR |
- | + | ||
- | The following | + | |
^ Crazyflie | ^ Crazyflie | ||
| | | | ||
Line 83: | Line 154: | ||
| | | | ||
- | This allows to easily orient the Crazyflie when setting up the system | + | The Lighthouse deck has 4 receivers and can recover its orientation. The Crazyflie |
+ | |||
+ | You can test if the positioning is working by starting the Crazyflie facing X and using the clients " | ||
+ | |||
+ | ===== The number of basestations and frame synchronization ===== | ||
- | While the Lighthouse deck has 4 receiver | + | The lighthouse deck works with one or two V1 basestations but the estimated position will be better |
- | {{: | + | |
- | The safest way to verify | + | The protocol for the lighthouse is composed |
+ | Due to the design of the lighthouse protocol, visibility | ||
- | {{: | + | ===== Position estimation methods ===== |
- | Once you have located X positive, you can test if the positioning is working by starting the Crazyflie facing X and using the clients " | + | There are currently two ways of calculating |
- | ===== Limitations ===== | + | The first method that was implemented calculates two vectors (or beams) from the basestations, |
+ | A more recent implementation pushes the sweep angles from the base stations into the estimator and lets the kalman filter calculate the position based on this information. This method is called the "sweep angle" method and also works if only one basestation is available. | ||
+ | It is possible to change positioning method "on the fly" by setting the lighthouse.method parameter. The sweep angle method is the default. | ||
- | The lighthouse deck is released in early access which means that there is a couple of limitation you should be aware of: | ||
- | * Even though it is technically possible to measure the Crazyflie orientation using the 4 receivers on the deck, this is not implemented yet. The Crazyflie estimate its orientation by having a good initial estimate (starting facing X) and then by tracking the flight dynamic using the IMU and the positioning system position measurement. | ||
- | * In similar subject, the Crazyflie should be able to estimate its position by seeing only one base-station. This is not implemented yet and so the Crazyflie needs constant line of sight with both base-station. The posisition estimator will accept holes of a couple of seconds quite well, though it is important that direct line of sigh is kept as much as possible with both base-station. | ||
- | * It is currently required to had-code the base station position in the firmware. This means that you need to re-flash your Crazyflies each time you move the basestations. This will be solved in the future by first allowing to upload the basestation position with the radio and then by estimating the base-station position directly from within the Crazyflie. | ||
- | * Since the deck only has horizontal sensors, the angle at which the base-stations are seen cannot be too shallow. This means that you should fly at least 40cm bellow the base-stations and that the base-stations should be placed above the flight space. This is a hardware limitation of the current deck. | ||
- | * The Crazyflie currently only supports Vive base station V1. Base station V1 are limited to two base-station per system. Base-station V2 does not have this limitation and so allows to cover much larger space. Support for the base station V2 is currently being worked-on and should be available in a future firmware update. | ||