Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
425 changes: 425 additions & 0 deletions chrono/code/PythonAPI/IMU_collection.py

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions chrono/code/PythonAPI/plot_imu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import pandas as pd
import matplotlib.pyplot as plt
import os
import glob

# 自动找最新录制的 IMU 文件
csv_files = glob.glob("imu_records/imu_recording_*.csv")
latest_csv = max(csv_files, key=os.path.getctime)
print("正在绘图:" + latest_csv)

# 读取数据
df = pd.read_csv(latest_csv)

# 时间归一化(从0开始)
t = df['timestamp'] - df['timestamp'].iloc[0]

# 画图
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
plt.figure(figsize=(14, 10))

# 1. 三轴加速度
plt.subplot(3,1,1)
plt.plot(t, df['accel_x'], label='X 加速度', linewidth=1.2)
plt.plot(t, df['accel_y'], label='Y 加速度', linewidth=1.2)
plt.plot(t, df['accel_z'], label='Z 加速度', linewidth=1.2)
plt.title('IMU 三轴加速度', fontsize=14)
plt.ylabel('m/s²')
plt.legend()
plt.grid(True, alpha=0.3)

# 2. 三轴角速度
plt.subplot(3,1,2)
plt.plot(t, df['gyro_x'], label='X 角速度', linewidth=1.2)
plt.plot(t, df['gyro_y'], label='Y 角速度', linewidth=1.2)
plt.plot(t, df['gyro_z'], label='Z 角速度', linewidth=1.2)
plt.title('IMU 三轴角速度', fontsize=14)
plt.ylabel('rad/s')
plt.legend()
plt.grid(True, alpha=0.3)

# 3. 航向角
plt.subplot(3,1,3)
plt.plot(t, df['compass'], label='航向角 Compass', linewidth=1.2, color='orange')
plt.title('IMU 航向角', fontsize=14)
plt.xlabel('时间 (s)')
plt.ylabel('度 (°)')
plt.legend()
plt.grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig("imu_result.png", dpi=300)
plt.show()
print("✅ 折线图已保存:imu_result.png")
77 changes: 0 additions & 77 deletions chrono/content/chapter1.tex

This file was deleted.

86 changes: 0 additions & 86 deletions chrono/content/论文提纲.tex

This file was deleted.

7 changes: 3 additions & 4 deletions chrono/undergraduate/content/abstracten.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
\keywordsen{Multi-body physical simulation model; CarlaUE4 simulation platform; Chrono simulation algorithm}
\begin{abstracten}

Multi-body system simulation has been widely applied in intelligent transportation and mechanical engineering, creating a strong demand for high-precision and high-efficiency physical simulation. However, traditional models suffer from low scene fidelity, insufficient dynamic solution accuracy, inaccurate constraint handling, and weak virtual-scene coupling, which fail to support complex systems such as vehicles and robotic arms.
Many-body system simulation has been applied to intelligent transportation and mechanical engineering, and thus there is a demand for high-precision, high-efficiency physical simulation. The previous model is a low-fidelity scene with poor dynamic behaviour, incorrect constraint handling, weak coupling with the virtual scene, etc., so it cannot be used for complex systems such as vehicles and robot arms.

This study constructs and optimizes a multi-body physical simulation model using the CarlaUE4 platform, Chrono algorithm, and PyCharm. After model development, algorithm tuning, and platform integration, comparative experiments show that the optimized model greatly improves motion trajectory accuracy and dynamic response speed, delivering more realistic and reliable results for complex scenarios.

Finally, this paper summarizes the achievements and limitations of the proposed model. Future research will further refine simulation accuracy, constraint processing, and multi-platform collaboration to extend the application of multi-body simulation in engineering.
Modification of Study Constructs and Optimisation of a Multi-body Physical Simulation Model based on the Car-laUE4 Platform, Chrono Algorithm and PyCharm. After building the model, algorithms and platforms have been optimised, and through comparison experiments, it has been determined that the optimised model performs well in terms of the accuracy of motion trajectory and the speed of dynamic response; thus, more realistic and reliable results can be obtained in complex scenarios.

Finally, this paper presents the results and problems of the above model. In the future, more improvements will be made to the accuracy of the simulation, constraints and multi-platform cooperation in order to expand the applications of multi-body simulation in engineering.


\end{abstracten}
7 changes: 3 additions & 4 deletions chrono/undergraduate/content/abstractzh.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
%\categorycn{TP391}
\begin{abstractzh}

随着多体系统仿真技术在智慧交通、机械工程等领域的深度应用,对多体物理行为的高精度、高实时性仿真需求日益迫切。在实际工程场景中,传统多体物理仿真模型存在场景还原度不足、动力学求解精度偏低、多体约束处理不精准以及与虚拟场景耦合性差等问题,难以满足复杂多体系统(如车辆、机械臂)的仿真需求
随着多体系统仿真的技术越来越广泛的应用到智慧交通、机械工程等各种各样的领域当中,对于一些要求非常高精度以及高效实时度的问题也变得越发突出起来。在现实中的实际工程应用当中,传统的多体物理仿真的模型有着不能完全还原场景的情况出现、求解的动力学精确程度不高、对多个体之间关系的处理不够到位、无法和虚拟环境建立起良好的联动等方面的问题,很难满足对于复杂多体系统的仿真要求

本文主要基于CarlaUE4仿真平台、Chrono仿真算法及PyCharm软件进行实验设计与模型构建,为了实现多体物理仿真模型的高精度与高可靠性,在完成多体物理仿真模型的搭建、Chrono算法优化及平台耦合调试后,本文通过开展优化前后对照实验验证优化后仿真模型的性能提升——对比优化前后模型在多体运动轨迹、动力学响应速度等指标的差异,证明优化后的模型能够有效提升多体物理仿真的精度与真实性,满足复杂场景下的多体仿真需求。

最终,本文在完成基于CarlaUE4与Chrono的多体物理仿真模型构建与优化后,总结了研究过程中取得的成果与存在的不足,展望未来,希望在未来的研究生求学生涯中,继续深入研究多体物理仿真的精度优化、复杂约束处理及多平台协同仿真技术,进一步完善多体物理仿真模型的性能,拓展其在更多工程领域的应用场景。
本文主要根据 CarlaUE4 仿真平台、Chrono 仿真算法以及 PyCharm 软件来进行实验的设计和模型的创建,并且为了得到高精度并且可靠的多体物理仿真模型,对多体物理仿真模型进行了搭建并完成了 Chrono 算法的优化和平台耦合调试之后,本文便开展了优化前后的对比实验来考察优化后的仿真实现的效果——分析优化前后模型的多体运动轨迹、动力学响应速度等方面的差别,从而证实经过优化以后所建立的仿真模型可以提高很多方面的准确性与真实性,符合复杂的多体环境应用的需求。

最后本文对在CarlaUE4和Chrono基础上所构建的多体物理仿真模型进行系统的建模、参数调整等,总结得到研究结果并指出目前的研究中存在的问题,在此基础上展望未来研究生职业生涯的发展方向,致力于通过不断的积累来提高多体物理仿真的精度、复杂约束的处理以及跨平台的协同仿真技术,并探索它在其他工程领域中的应用前景。



Expand Down
Loading