{"id":20164821,"url":"https://github.com/px4/pyulog","last_synced_at":"2025-05-15T03:02:52.527Z","repository":{"id":9573540,"uuid":"62636420","full_name":"PX4/pyulog","owner":"PX4","description":"Python module \u0026 scripts for ULog files","archived":false,"fork":false,"pushed_at":"2025-02-20T08:17:37.000Z","size":5591,"stargazers_count":141,"open_issues_count":9,"forks_count":141,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-04-14T00:59:30.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PX4.png","metadata":{"files":{"readme":"README.ko-KR.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-05T12:50:14.000Z","updated_at":"2025-03-25T05:39:31.000Z","dependencies_parsed_at":"2024-03-20T11:42:48.188Z","dependency_job_id":"6337f96f-798d-45bd-bb05-bc673df4909c","html_url":"https://github.com/PX4/pyulog","commit_stats":{"total_commits":159,"total_committers":26,"mean_commits":6.115384615384615,"dds":0.3459119496855346,"last_synced_commit":"4efd6edafda916d722fca884c976893362a52964"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fpyulog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fpyulog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fpyulog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fpyulog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PX4","download_url":"https://codeload.github.com/PX4/pyulog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804790,"owners_count":21164132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T00:35:46.938Z","updated_at":"2025-04-14T00:59:41.028Z","avatar_url":"https://github.com/PX4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyulog\n\n 이 레포지토리에는 ULog 파일 및 스크립트를 파싱하는 python 패키지가 포함되어 있습니다.\n ULog는 self-describing 형식을 따르며, 해당 관련 문서는 다음과 같습니다(https://docs.px4.io/main/en/dev_log/ulog_file_format.html).\n\n제공되는 명령어 스크립트는(command line scripts)는 아래와 같습니다:\n- `ulog_info`: ULog 파일의 정보를 나타냅니다.\n- `ulog_messages`: ULog 파일에 기록된 로그 메시지(logged messages)를 출력합니다.\n- `ulog_params`: ULog 파일에 저장된 파라미터들을 추출합니다.\n- `ulog2csv`: ULog 파일을 CSV 파일로 변환합니다.\n- `ulog2kml`: ULog 파일을 KML 파일로 변환합니다.\n\n\n## 설치\n\n패키지 설치:\n```bash\npip install pyulog\n```\n\n소스코드를 통한 설치:\n```bash\npython setup.py build install\n```\n\n## 추가 개발\n\n코드를 쉽게 변경 및 편집할 수 있는 형식으로 설치하려면 다음 명령 사용(해당 명령은 패키지를 Repo에 대한 링크로 설치합니다):\n\n```bash\npip install -e .\n```\n\n## 테스트\n\n```bash\npytest test\n```\n\n또는,\n\n```bash\npython setup.py test\n```\n\n## 코드 검사(Code Checking)\n\n```bash\npylint pyulog/*.py\n```\n\n\u003cspan id=\"scripts\"\u003e\u003c/span\u003e\n## 명령어 스크립트\n\n\n모든 스크립트는 시스템 전체 어플리케이션단에서 설치되며(Python 또는 시스템 경로를 지정하지 않고\n커맨드 라인에서 호출), `-h` 플래그를 통해 각 스크립트의 사용법을 확인할 수 있습니다.\n\n아래 섹션에서는 사용 구문 및 샘플 출력을 나타냅니다. (from [test/sample.ulg](test/sample.ulg)):\n\n###  ULog 파일로부터 정보 출력 (ulog_info)\n\n사용:\n```bash\nusage: ulog_info [-h] [-v] file.ulg\n\nDisplay information from an ULog file\n\npositional arguments:\n  file.ulg       ULog input file\n\noptional arguments:\n  -h, --help     show this help message and exit\n  -v, --verbose  Verbose output\n```\n\n결과 예시:\n```bash\n$ ulog_info sample.ulg\nLogging start time: 0:01:52, duration: 0:01:08\nDropouts: count: 4, total duration: 0.1 s, max: 62 ms, mean: 29 ms\nInfo Messages:\n sys_name: PX4\n time_ref_utc: 0\n ver_hw: AUAV_X21\n ver_sw: fd483321a5cf50ead91164356d15aa474643aa73\n\nName (multi id, message size in bytes)    number of data points, total bytes\n actuator_controls_0 (0, 48)                 3269     156912\n actuator_outputs (0, 76)                    1311      99636\n commander_state (0, 9)                       678       6102\n control_state (0, 122)                      3268     398696\n cpuload (0, 16)                               69       1104\n ekf2_innovations (0, 140)                   3271     457940\n estimator_status (0, 309)                   1311     405099\n sensor_combined (0, 72)                    17070    1229040\n sensor_preflight (0, 16)                   17072     273152\n telemetry_status (0, 36)                      70       2520\n vehicle_attitude (0, 36)                    6461     232596\n vehicle_attitude_setpoint (0, 55)           3272     179960\n vehicle_local_position (0, 123)              678      83394\n vehicle_rates_setpoint (0, 24)              6448     154752\n vehicle_status (0, 45)                       294      13230\n```\n\n### ULog 파일에 기록된 로그 메시지 출력 (ulog_messages)\n\n사용:\n```\nusage: ulog_messages [-h] file.ulg\n\nDisplay logged messages from an ULog file\n\npositional arguments:\n  file.ulg    ULog input file\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\n결과 예시:\n```\nubuntu@ubuntu:~/github/pyulog/test$ ulog_messages sample.ulg\n0:02:38 ERROR: [sensors] no barometer found on /dev/baro0 (2)\n0:02:42 ERROR: [sensors] no barometer found on /dev/baro0 (2)\n0:02:51 ERROR: [sensors] no barometer found on /dev/baro0 (2)\n0:02:56 ERROR: [sensors] no barometer found on /dev/baro0 (2)\n```\n\n### ULog 파일에 저장된 파라미터 추출 (ulog_params)\n\n사용:\n```\nusage: ulog_params [-h] [-d DELIMITER] [-i] [-o] file.ulg [params.txt]\n\nExtract parameters from an ULog file\n\npositional arguments:\n  file.ulg              ULog input file\n  params.txt            Output filename (default=stdout)\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d DELIMITER, --delimiter DELIMITER\n                        Use delimiter in CSV (default is ',')\n  -i, --initial         Only extract initial parameters\n  -o, --octave          Use Octave format\n```\n\n결과 예시 (콘솔 출력):\n```\nubuntu@ubuntu:~/github/pyulog/test$ ulog_params sample.ulg\nATT_ACC_COMP,1\nATT_BIAS_MAX,0.0500000007451\nATT_EXT_HDG_M,0\n...\nVT_OPT_RECOV_EN,0\nVT_TYPE,0\nVT_WV_LND_EN,0\nVT_WV_LTR_EN,0\nVT_WV_YAWR_SCL,0.15000000596\n```\n\n### ULog 파일을 CSV 파일로 변환 (ulog2csv)\n\n사용:\n```\nusage: ulog2csv [-h] [-m MESSAGES] [-d DELIMITER] [-o DIR] file.ulg\n\nConvert ULog to CSV\n\npositional arguments:\n  file.ulg              ULog input file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -m MESSAGES, --messages MESSAGES\n                        Only consider given messages. Must be a comma-\n                        separated list of names, like\n                        'sensor_combined,vehicle_gps_position'\n  -d DELIMITER, --delimiter DELIMITER\n                        Use delimiter in CSV (default is ',')\n  -o DIR, --output DIR  Output directory (default is same as input file)\n```\n\n\n### ULog 파일을 KML 파일로 변환 (ulog2kml)\n\n\u003e **Note** 모듈 `simplekml` 이 사용자의 PC에 설치되어 있어야 합니다. 만약 설치되어 있지 않다면, 아래 명령어를 통해 설치하십시오.\n  ```\n  pip install simplekml\n  ```\n\n사용:\n```\nusage: ulog2kml [-h] [-o OUTPUT_FILENAME] [--topic TOPIC_NAME]\n                [--camera-trigger CAMERA_TRIGGER]\n                file.ulg\n\nConvert ULog to KML\n\npositional arguments:\n  file.ulg              ULog input file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -o OUTPUT_FILENAME, --output OUTPUT_FILENAME\n                        output filename\n  --topic TOPIC_NAME    topic name with position data\n                        (default=vehicle_gps_position)\n  --camera-trigger CAMERA_TRIGGER\n                        Camera trigger topic name (e.g. camera_capture)\n```\n\n### ULog 파일을 rosbag 파일로 변환 (ulog2rosbag)\n\n\u003e **Note** `px4_msgs`가 설치된 ROS 환경이 필요합니다.\n\n사용:\n```\nusage: ulog2rosbag [-h] [-m MESSAGES] file.ulg result.bag\n\nConvert ULog to rosbag\n\npositional arguments:\n  file.ulg              ULog input file\n  result.ulg            rosbag output file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -m MESSAGES, --messages MESSAGES\n                        Only consider given messages. Must be a comma-\n                        separated list of names, like\n                        'sensor_combined,vehicle_gps_position'\n```\n### Migrate/setup the database for use with the DatabaseULog class (ulog_migratedb)\n\n사용:\n```\nusage: ulog_migratedb [-h] [-d DB_PATH] [-n] [-s SQL_DIR] [-f]\n\nSetup the database for DatabaseULog\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d DB_PATH, --database DB_PATH\n                        Path to the database file\n  -n, --noop            Only print results, do not execute migration scripts.\n  -s SQL_DIR, --sql SQL_DIR\n                        Directory with migration SQL files\n  -f, --force           Run the migration script even if the database is not\n                        created with this script.\n\n```\n결과 예시 (콘솔 출력):\n```\nubuntu@ubuntu:~/github/pyulog$ ulog_migratedb\nUsing migration files in /home/ubuntu/github/pyulog/pyulog/sql.\nDatabase file pyulog.sqlite3 not found, creating it from scratch.\nCurrent schema version: 0 (database) and 1 (code).\nExecuting /home/ubuntu/github/pyulog/pyulog/sql/pyulog.1.sql.\nMigration done.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpx4%2Fpyulog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpx4%2Fpyulog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpx4%2Fpyulog/lists"}