Crazyflie 2 with GPS
-
- Member
- Posts: 75
- Joined: Mon Apr 06, 2015 6:47 pm
Re: Crazyflie 2 with GPS
Hi,
I made a provisional imu calibration tab in cfclient for the gyro, accelerometer, and magnetometer sensors.
The layout of this tab was for feasibility purposes only, unfinished and coded at the xml level. The function imu9Read() in module imu_cf2.c was modified to setup the log_groups for the sensors and the log_group in compass.c provides the data for displaying the compass calibration factors/parameters.
The sensor values are taken with the crazyflie in a stationary position on a level surface and the mod column is the rss value of the x,y,z components.
Typically, the mod value for the gyro should be within 0.0 and 1.5. If greater than this, it needs re-calibration. The mod value for the accelerometer is typically between 0.98 and 1.02. Outside of this a re-calibration might be in order. For the compass raw values, they typically should be between -500 and +500, and the mod value between 750 and 2250. This assumes the unit of measure is gauss for the magnetic flux density. All of the above ranges are what DJI uses in their flight controllers.
Sensor data provided by the crazyflie is collected in the cfclient using callbacks from the API through QT signal/slots. The amount of logconfig data requested in the calibration tab is bumping against the memory that is currently set aside or available for obtaining log blocks from the crazyflie on port[5].
Best regards,
Jack
I made a provisional imu calibration tab in cfclient for the gyro, accelerometer, and magnetometer sensors.
The layout of this tab was for feasibility purposes only, unfinished and coded at the xml level. The function imu9Read() in module imu_cf2.c was modified to setup the log_groups for the sensors and the log_group in compass.c provides the data for displaying the compass calibration factors/parameters.
The sensor values are taken with the crazyflie in a stationary position on a level surface and the mod column is the rss value of the x,y,z components.
Typically, the mod value for the gyro should be within 0.0 and 1.5. If greater than this, it needs re-calibration. The mod value for the accelerometer is typically between 0.98 and 1.02. Outside of this a re-calibration might be in order. For the compass raw values, they typically should be between -500 and +500, and the mod value between 750 and 2250. This assumes the unit of measure is gauss for the magnetic flux density. All of the above ranges are what DJI uses in their flight controllers.
Sensor data provided by the crazyflie is collected in the cfclient using callbacks from the API through QT signal/slots. The amount of logconfig data requested in the calibration tab is bumping against the memory that is currently set aside or available for obtaining log blocks from the crazyflie on port[5].
Best regards,
Jack
Re: Crazyflie 2 with GPS
That looks really great!
As for the logging getting filled up, it might be possible to trade for precision by using FP16 (16bit floating point).
As for the logging getting filled up, it might be possible to trade for precision by using FP16 (16bit floating point).
-
- Member
- Posts: 75
- Joined: Mon Apr 06, 2015 6:47 pm
Re: Crazyflie 2 with GPS
Hi,
Two new branches have been added to the repository http://Github.com/jackemoore/New-GPS-Additions that support the latest updates for the GPS deck drivers, Compass, Compass Calibration, AltHold Mode, PosHold Mode, Attitude Roll, Pitch & Yaw, PC Cflcient FlightTab, GPSTab, GPS OpenStreetMap & XBox-360 Controller.
Branch gtgps-9 (2016.09.17) is for the GlobalTop Titan-2 GNSS receiver with Ceramic Patch Antenna and Branch dkgps-9 (2016.09.18) is for the uBlox Max M8c Pico Breakout GPS receiver with Chip Antenna.
These latest updates are still a work-in-progress development.
Best regards,
Jack
Two new branches have been added to the repository http://Github.com/jackemoore/New-GPS-Additions that support the latest updates for the GPS deck drivers, Compass, Compass Calibration, AltHold Mode, PosHold Mode, Attitude Roll, Pitch & Yaw, PC Cflcient FlightTab, GPSTab, GPS OpenStreetMap & XBox-360 Controller.
Branch gtgps-9 (2016.09.17) is for the GlobalTop Titan-2 GNSS receiver with Ceramic Patch Antenna and Branch dkgps-9 (2016.09.18) is for the uBlox Max M8c Pico Breakout GPS receiver with Chip Antenna.
These latest updates are still a work-in-progress development.
Best regards,
Jack
Re: Crazyflie 2 with GPS
I think we are soon getting to the point were we could get the kalman filter working with the GPS. What about we slowly try to merge it all in to the main branch though pull request?
Re: Crazyflie 2 with GPS
Hello!
I tested the compiled firmware with the option heighthold+kalmann, as mentionned in the wiki. I did not see a real progress compared to the standard filter.
But it seems that I lost stability in the measured data. After a crash, artificial horizon continue to slightly move a little bit. Is it linked to the kalmann? I do not know.
In the version I use (2017-04), without kalmann I think, cf2 has a perfect attitude stability.
Jean-Claude
I tested the compiled firmware with the option heighthold+kalmann, as mentionned in the wiki. I did not see a real progress compared to the standard filter.
But it seems that I lost stability in the measured data. After a crash, artificial horizon continue to slightly move a little bit. Is it linked to the kalmann? I do not know.
In the version I use (2017-04), without kalmann I think, cf2 has a perfect attitude stability.
Jean-Claude
Re: Crazyflie 2 with GPS
Hi Jean-Claude,
Are you using a GPS in your test with the Kalman filter? Without any extra sensor the Kalman filter will not do much good since it does not use the pressure sensor (yet ...).
Are you using a GPS in your test with the Kalman filter? Without any extra sensor the Kalman filter will not do much good since it does not use the pressure sensor (yet ...).
Re: Crazyflie 2 with GPS
My GPS chip is out of service, so it is not to be considered. My configuration was cf2+buzzer deck+z-ranger deck. I tested with firmware compiled with Kalmann option and without. In case of Kalmann there is a slight and low drift around 0 position after the end of a large motion.
Jean-Claude
Jean-Claude
Re: Crazyflie 2 with GPS
Ok, without position information, the current implementation of the Kalman filter will not correct roll/pitch with other info than the gyro, it explains that you are seeing a wrong roll/pitch after a crash. Also be careful that the Kalman filter does not use the pressure sensor, this means that if you are over the detection range of the ZRanger VL53 sensor (about 1.2M if I remember well the settings), then you loose height tracking completely and the crazyflie height is going to drift.
[SOLVED] Re: Crazyflie 2 with GPS
Clear, thank you.
Jean-Claude
Jean-Claude