Temp Compensation Logging fails

I tried to follow the Instruction from the PX4 Dev Site to make a Thermal Sensor Calibration. I created a ULog file which I then tried to read.

The FC is a AUAV-X2.

Log File can be found here: Flight Review

I could not parse the File in order to generate the Params. It failed with (don’t be confused by the name, I renamed the script):
Traceback (most recent call last):
File “./generateParams.py”, line 709, in
baro_0_params[‘TC_B0_ID’] = int(np.median(sensor_baro_0[‘device_id’]))
NameError: name ‘sensor_baro_0’ is not defined

Also there are some strange Errors in the Log File:

@LorenzMeier Any Idea? Shall I open an Issue in Github?

I also had a subsequent MAG 0 TOT Failure with 1.6RC (Beta) I never had anything like this with FW < 1.6.

In the above log there is a mouting CPU LOAD toward the end as well as about 5secs of Dropouts in Logging ( Sensor Data?), this seems unrelated to the CPU Load as it also occurs during mid Load scenarios. Could anybody explaing how come, that there are Dropouts?

This was caused by a NuttX bug which we just found end of last week. Current master is patched, can you re-try again?

I’ll do. Thanks for the reply. I’ll post results in this Thread.

@LorenzMeier I have again the same Problem with an AUAV-X2.1 Board:

File “./process_sensor_caldata.py”, line 712, in
baro_0_params[‘TC_B0_ID’] = int(np.median(sensor_baro_0[‘device_id’]))
NameError: name ‘sensor_baro_0’ is not defined

Log File is available: https://logs.px4.io/plot_app?log=a7bd1799-c689-44fd-95cd-6f0878aa47f4

Some Strange things to note like sudden Power consumption, while the Boards single connection was Power to USB?

Documentation states to put SDLOG_MODE to 3 while current Master has 0, 1, 2 as Options, took 2 as it seemd plausible.

Any Idea?

@Andreas_Hoffmann I think you want to be setting SDLOG_PROFILE so that the raw sensor data (eg sensor_baro_0) is logged.

I see this should be set to “2 - Thermal Calibration”. Sadly this piece of Information is missing here : https://dev.px4.io/en/tutorials/sensor_thermal_calibration.html

As I want to make a PR for Documentation I’ll change this as well. (Just can’t get the DevTools installed on HighSierra :disappointed_relieved:)

@Dagar, somehow this got me a bit further, but in the end fails with a strange Error. I’m using the naked board and there was never any GPS/Baro attached to it.

found gyro 0 data
found gyro 1 data
found accel 0 data
found accel 1 data
found baro 0 data
Traceback (most recent call last):
File “./process_sensor_caldata.py”, line 765, in
baro_1_params[‘TC_B1_ID’] = int(np.median(sensor_baro_1[‘device_id’]))
NameError: name ‘sensor_baro_1’ is not defined

EDIT: I was able to get the Data created when setting the Condition on Line 765 to GE 3 instead of GE 2 (which is strange as the board has one Baro only).

Glad to hear you got it working. It would be great if you could open issues or PRs for the devguide or Firmware repos to save the next person some time.