The Lighthouse positioning system uses the SteamVR Base stations of Valve Inc. and the Lighthouse deck on the Crazyflie. With this system, the Crazyflie can estimate its own X, Y and Z in a global coordinate system.
Make sure that you have the following available:
- The latest version of the Crazyflie client
The first thing to do is to make sure the firmware in the Crazyflie and Lighthouse deck is up to date.
For mounting the Lighthouse deck on a Crazyflie check out the Getting started with expansion decks tutorial.
Note1: The firmware of the Lighthouse deck is updated together with the Crazyflie firmware when flashed from the client, the deck must be mounted when flashing.
Note2: The flashing procedure in the client has changed lately, if you are used to the old procedure please check out the documentation.
Please follow the the firmware upgrade instructions.
Before setting up the system you need to set the basestations in the right mode.
Choose the Lighthouse Positioning tab.
You may have to check it in the menu View->Tabs->Lighthouse Positioning Tab to make it visible.
Power the Basestation with its powerblock and connect it with a micro-usb cable to the computer.
Open up the basestation configuration tool by pressing ‘Set BS Channel’.
Scan for the basestation and check the current ID. If the basestation is never used, this value is probably 0.
Put the wanted channel (1 or 2) in ‘Change Channel’ and press the ‘Set Channel’ button.
Wait until you see the ‘success!’ before disconnecting and reconnecting another basestation.
You can change the basestation mode with a small button in the back. The modes should be changed to ‘b’ and ‘c’ for without a sync cable and ‘A’ and ‘b’ if you are using a sync cable.
After the base station’s channels are correctly set, you can mount them in your flight area by a wall mount or a camera-stand. The maximum flight area for two basestations is about 4 x 4 x 2.0, but long as the Crazyflie is not further away than 6 meters from at least one basestation, it should work out. Note that the lighthouse sensors are mounted on the top of the lighthouse deck and that the base stations must be above the Crazyflie to be received.
Make sure that you have the following conditions in your flight area:
- The basestations should be about at least 0.5 meters higher than the flight area of the Crazyflie due to the placement of the sensors on the Lighthouse deck.
- Make sure that there are no mirrors or big large reflective items in the area.
- Make sure that you do not have direct sunlight.
This will explain how to get calibration and geometry data and setup up your Crazyflie to fly in the Lighthouse positioning system.
Place the Crazyflie with the Lighthouse deck on the ground of where you want the origin to be of your global coordinate system. Check out The Coordinate System of the Crazyflie 2.X.
Open the CF client and connect to the Crazyflie 2.X.
If not already done, configure the Crazyflie 2.X in 2Mbit radio mode.
Make sure that the Crazyflie is receiving the sweep angels of both basestations and has received the calibration data.
For the calibration data you might need to wait for 20 seconds.
Once you have received the calibration data, it is time for the next step:
Open up the basestation geometry management dialog by pressing ‘Manage Geometry’.
In the dialog, press ‘Estimate Geometry’. You will see then the estimated geometry of the basestations.
If the geometry makes sense, press ‘Write to Crazyflie’, or else move your Crazyflie and press ‘Estimate Geometry’ again.
The Lighthouse deck’s LED should now be full green and you should be able to see the visualizations of the basestations with their channels and the Crazyflie itself as a blue dot.
Make sure to test the Crazyflie position in your hand first before flying!