Skip to content

改进避障逻辑,避免过度转向#3297

Merged
donghaiwang merged 50 commits into
OpenHUTB:mainfrom
cljrobot:main
Dec 16, 2025
Merged

改进避障逻辑,避免过度转向#3297
donghaiwang merged 50 commits into
OpenHUTB:mainfrom
cljrobot:main

Conversation

@cljrobot

Copy link
Copy Markdown
Contributor

1.分级避障:近距急刹,中距减速转向

2.速度自适应:根据距离计算安全目标速度

3.转向平滑:避免过度转向,保持控制稳定性

4.角度阈值:正前方

Uploading 屏幕录制 2025-12-01 093506.mp4…

±15°内才触发避障转向

@donghaiwang
donghaiwang merged commit 656fc55 into OpenHUTB:main Dec 16, 2025
1 check passed


# 在 ImprovedNeuralController 类的 apply_obstacle_avoidance 方法中,修改以下部分:
def apply_obstacle_avoidance(self, throttle, brake, steer, obstacle_info, speed):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和下面296行代码重复了

if distance < self.emergency_brake_distance:
print(f"紧急刹车!距离障碍物: {distance:.1f}m")

return 0.0, 1.0, 0.0 # 紧急情况下保持直行,只刹车

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和下面代码重复了

@donghaiwang

Copy link
Copy Markdown
Member

需要贴运行效果

donghaiwang added a commit that referenced this pull request Dec 16, 2025
donghaiwang pushed a commit that referenced this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants