Lighthouse deck with only one Basestation?
Posted: Thu Sep 17, 2020 12:23 pm
Hi,
i can not figure out how to setup the crazyflie 2.0 with the light house deck & one basestation V1.
According to the website one basestation is enough for the lighthouse deck to work.
I want to get the position of the crazyflie, so that the crazyflie can interact with the vr system.
I followed the wiki setup guide and did this:
1. I ran get_bs_position.py to get this:
Opening OpenVR
OpenVR Opened
Origin: {} [0, 0, 0]
-------------------------------
{.origin = {1.484661, -0.578013, 2.189887, }, .mat = {{-0.820973, -0.388698, -0.418232, }, {0.298286, -0.916569, 0.266321, }, {-0.486857, 0.093889, 0.868421, }, }},
2. Then i make an edit in lighthouse_position_est.c:
baseStationGeometry_t lighthouseBaseStationsGeometry[PULSE_PROCESSOR_N_BASE_STATIONS] = {
{.origin = {1.484661, -0.578013, 2.189887, }, .mat = {{-0.820973, -0.388698, -0.418232, }, {0.298286, -0.916569, 0.266321, }, {-0.486857, 0.093889, 0.868421, }, }},
};
is that the correct declaration with one basestation ??
3. Then i created config.mk with:
CFLAGS += -DDISABLE_LIGHTHOUSE_DRIVER=0
4. After building and flashing the firmware on the crazyflie, i end up with this console log from the cfclient:
SYS: ----------------------------
SYS: Crazyflie 2.0 is up and running!
SYS: Build 0:12cf59a535a8 (2020.09) MODIFIED
SYS: I am 0x3335303035364711003A002E and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_CORE: 1 deck(s) found
DECK_CORE: Calling INIT on driver bcLighthouse4 for deck 0
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
STAB: Wait for sensor calibration...
SYS: FreLHFL: Lighthouse bootloader version: 2
e heap: 11912 bytes
STAB: Ready to fly.
LHFL: Firmware version 5 verified, booting deck!
LH: Locking to V1 system
Got calibration from F82489D4
phase0: -0.014328
phase1: 0.015136
Sometimes i get this message:
ESTKALMAN: State out of bounds, resett
I logged values lighthouse.x,y,z & kalman.stateX,stateY,stateZ, these values jumping around making no sense.
How do i get the x,y,z position with the help of one basestation and the lighthouse deck ?
Thanks for the reply in advance.
i can not figure out how to setup the crazyflie 2.0 with the light house deck & one basestation V1.
According to the website one basestation is enough for the lighthouse deck to work.
I want to get the position of the crazyflie, so that the crazyflie can interact with the vr system.
I followed the wiki setup guide and did this:
1. I ran get_bs_position.py to get this:
Opening OpenVR
OpenVR Opened
Origin: {} [0, 0, 0]
-------------------------------
{.origin = {1.484661, -0.578013, 2.189887, }, .mat = {{-0.820973, -0.388698, -0.418232, }, {0.298286, -0.916569, 0.266321, }, {-0.486857, 0.093889, 0.868421, }, }},
2. Then i make an edit in lighthouse_position_est.c:
baseStationGeometry_t lighthouseBaseStationsGeometry[PULSE_PROCESSOR_N_BASE_STATIONS] = {
{.origin = {1.484661, -0.578013, 2.189887, }, .mat = {{-0.820973, -0.388698, -0.418232, }, {0.298286, -0.916569, 0.266321, }, {-0.486857, 0.093889, 0.868421, }, }},
};
is that the correct declaration with one basestation ??
3. Then i created config.mk with:
CFLAGS += -DDISABLE_LIGHTHOUSE_DRIVER=0
4. After building and flashing the firmware on the crazyflie, i end up with this console log from the cfclient:
SYS: ----------------------------
SYS: Crazyflie 2.0 is up and running!
SYS: Build 0:12cf59a535a8 (2020.09) MODIFIED
SYS: I am 0x3335303035364711003A002E and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_CORE: 1 deck(s) found
DECK_CORE: Calling INIT on driver bcLighthouse4 for deck 0
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
STAB: Wait for sensor calibration...
SYS: FreLHFL: Lighthouse bootloader version: 2
e heap: 11912 bytes
STAB: Ready to fly.
LHFL: Firmware version 5 verified, booting deck!
LH: Locking to V1 system
Got calibration from F82489D4
phase0: -0.014328
phase1: 0.015136
Sometimes i get this message:
ESTKALMAN: State out of bounds, resett
I logged values lighthouse.x,y,z & kalman.stateX,stateY,stateZ, these values jumping around making no sense.
How do i get the x,y,z position with the help of one basestation and the lighthouse deck ?
Thanks for the reply in advance.