Understanding csv file obtained from ulog2csv from pixhawk data

Hi guys,

I am new to the drone hobby and I kindly need some help. I build a custom drone, put a pixhawk on it, and I currently have it flying indoors using PX4Flow only for state estimation. I would like to perform system identification. I have the data from the sdcard and I have converted from ulog to csv, but I am still a bit confused about what the csv files mean, their columns etc.

Moreover, I know I would need to choose sampling rates etc. but I have very little idea of how to proceed. Please help if you can.

Thank you.

Best wishes,
Dan.

Take a look here for logging configuration https://dev.px4.io/v1.9.0/en/log/logging.html

Each CSV file holds the data for a given uORB topic. You can read about uORB here https://dev.px4.io/v1.9.0/en/middleware/uorb.html

You may also want to take a look at the message definitions for each topic https://github.com/PX4/Firmware/tree/master/msg

2 Likes

@dakejahl so this means if I define my custom uORB Messages I can create my personal specified uLOG entries?
Also do you know, if thereā€™s a possibility to recieve the uORBs on a companion computer via mavros?

@dakejahl Thank you very much for your response. I have gone through the links you gave. The last one (the defs for each topic) was most helpful. I have another question. I want to perform system id and I guess I would need to use the ā€˜actuator_controlsā€™ topic. however, I can see there are several topics under this definition. And no further information is given as to what is what. I am flying from a radio, so I donā€™t know which input is actuator_controls_0 or ā€¦_1 or ā€¦_2 etc. Do you have any ideas on that?

For the sensor_combined messages I can see that there is some description about the different topics. For instance,
gyro_rad # average angular rate measured in the XYZ body frame in rad/s over the last gyro sampling period

Thanks for your help. Iā€™m grateful.

If you want to understand acuator_controls, take a look at
https://dev.px4.io/v1.9.0/en/concept/mixing.html

If you simply want to understand what each of your sticks on your RC map to, see https://github.com/PX4/Firmware/blob/master/msg/manual_control_setpoint.msg

1 Like

yes

In theory yes, I personally have never done it. It would be better if you opened a separate issue to ask this question.

1 Like

@dakejahl and @hsu-ret Thank you once again. One other confusion. Which signals are logged by The actuator_controls_0, and actuator_outputs topics?

The mixer takes in Torques(roll,pitch,yaw) and Thrust, and converts it to actuator outputs (pwm) values which sets the speed of the motors.

From this, my understanding is that, the ā€˜actuator_controls_0ā€™ topic records the control_input commands going into the mixer, while the ā€˜actuator_outputsā€™ topic records the setpoint pwm values going out of the mixer into the motors. I just want to confirm that I am right.

Or if Iā€™m missing something because, I am unsure if the ā€˜actuator_controls_0ā€™ are the ones going out of the mixer into the motors and the ā€˜actuator_outputsā€™ are the signals measured from the motors.

I am currently trying to plot the signals and compare them with the log analysis from flight review but it would be helpful if someone can comment on this.

Thank you.

Please help clear my confusion.

Update:

So after a chat with @RicardoM17 I understand that the ā€˜actuator_controls_oā€™ topic indeed records the controller commands going into the mixer which then computes the individual PWM values for each actuator recorded in ā€˜actuator_outputs_0ā€™. Incase anyone else in future, has similar confusion.
Thanks guys.

Thank you for leaving the update about what you found out. Iā€™m logging in SDLOG_PROFILE=3 and I have 3 topics in the log file:
actuator_controls_0
actuator_controls_3
actuator_outputs

Iā€™m trying to figure out what each one is. After flying my quadrotor, the logged actuator_controls_0 and actuator_outputs signals are identical, but actuator_controls_3 is different and varies from +1 to -1. This is true in manual mode, position mode, altitude mode.

Could anyone shed light on what signal actuator_controls_3 is actually logging, as it relates to the control block diagram? ie, is it the ā€œRC inputsā€ from the hand controller, before going into the PID controller? Or is it the signal coming out of the PID controller into the mixer (seems unlikely since that is actuator_controls_0 according to this thread).

Also I would have expected to see a difference between actuator_controls_0 and actuator_outputs depending on autopilot mode

thank you very much