1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

px4のログをcsvにする

Posted at

px4のログ(.ulg)を表計算ソフトで編集したい

  • QGroundControlなどからログを吸い出すか、SDカードから直接とりだしたあと、データを表計算ソフトで操作したい。
  • 調べると、「pyulog」というpythonのツールが存在するらしい。pipでインストールできるようで、お手軽。

導入

  • ここの手順通り。
  • インストールは以下の1行
python3 -m pip install pyulog

試しに何かをcsvに変換

  • 例えば、次のコマンドで全てのログがcsvに変換できます
$ ulog2csv (変換したいログ).ulg -o (出力先ディレクトリ)
  • 実際の例
tomiyuichi@tyxps:~$ cd ./sample/
tomiyuichi@tyxps:~/sample$ ls
testlog.ulg
tomiyuichi@tyxps:~/sample$ mkdir csv
tomiyuichi@tyxps:~/sample$ ulog2csv testlog.ulg -o ./csv
tomiyuichi@tyxps:~/sample$ ls ./csv/
testlog_actuator_armed_0.csv
testlog_actuator_controls_0_0.csv
testlog_actuator_outputs_0.csv
testlog_battery_status_0.csv
testlog_battery_status_1.csv
testlog_commander_state_0.csv
testlog_cpuload_0.csv
testlog_ekf2_timestamps_0.csv
testlog_ekf_gps_drift_0.csv
testlog_estimator_innovations_0.csv
testlog_estimator_innovation_test_ratios_0.csv
testlog_estimator_innovation_variances_0.csv
testlog_estimator_sensor_bias_0.csv
testlog_estimator_status_0.csv
testlog_hover_thrust_estimate_0.csv
testlog_logger_status_0.csv
testlog_manual_control_setpoint_0.csv
testlog_multirotor_motor_limits_0.csv
testlog_radio_status_0.csv
testlog_rate_ctrl_status_0.csv
testlog_safety_0.csv
testlog_sensor_accel_0.csv
testlog_sensor_accel_1.csv
testlog_sensor_accel_2.csv
testlog_sensor_baro_0.csv
testlog_sensor_combined_0.csv
testlog_sensor_gyro_0.csv
testlog_sensor_gyro_1.csv
testlog_sensor_gyro_2.csv
testlog_sensor_mag_0.csv
testlog_sensor_mag_1.csv
testlog_sensor_preflight_imu_0.csv
testlog_sensor_preflight_mag_0.csv
testlog_system_power_0.csv
testlog_telemetry_status_0.csv
testlog_trajectory_setpoint_0.csv
testlog_vehicle_acceleration_0.csv
testlog_vehicle_air_data_0.csv
testlog_vehicle_angular_acceleration_0.csv
testlog_vehicle_angular_velocity_0.csv
testlog_vehicle_attitude_0.csv
testlog_vehicle_attitude_setpoint_0.csv
testlog_vehicle_command_0.csv
testlog_vehicle_control_mode_0.csv
testlog_vehicle_gps_position_0.csv
testlog_vehicle_imu_0.csv
testlog_vehicle_imu_1.csv
testlog_vehicle_imu_2.csv
testlog_vehicle_imu_status_0.csv
testlog_vehicle_imu_status_1.csv
testlog_vehicle_imu_status_2.csv
testlog_vehicle_land_detected_0.csv
testlog_vehicle_local_position_0.csv
testlog_vehicle_local_position_setpoint_0.csv
testlog_vehicle_magnetometer_0.csv
testlog_vehicle_rates_setpoint_0.csv
testlog_vehicle_status_0.csv
testlog_vehicle_status_flags_0.csv
testlog_yaw_estimator_status_0.csv
tomiyuichi@tyxps:~/sample$
  • 以上

偵察気球って作ってるエンジニアからすれば楽しいんだろうなあ

2023年2月21日

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?