Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b36e527
更改了文件结构,使目录更清晰
manayume Dec 18, 2025
6a5d1b2
Merge branch 'OpenHUTB:main' into main
manayume Dec 18, 2025
a06e6c6
Merge branch 'OpenHUTB:main' into main
manayume Dec 18, 2025
b65d3c1
修改概述:
manayume Dec 18, 2025
01c0362
删除了错误的模型文件,优化了目录结构,更新了README文件中的启动流程和文件目录
manayume Dec 18, 2025
073c89a
Merge branch 'OpenHUTB:main' into main
manayume Dec 18, 2025
a989876
Merge branch 'OpenHUTB:main' into main
manayume Dec 18, 2025
436db46
Merge branch 'OpenHUTB:main' into main
manayume Dec 18, 2025
2bc6795
Merge branch 'OpenHUTB:main' into main
manayume Dec 18, 2025
66065b8
修复了视角卡顿的问题,调整了视角跟随高度角度
manayume Dec 18, 2025
fa06246
Merge branch 'OpenHUTB:main' into main
manayume Dec 19, 2025
856e574
新增了可调参数,可以改变路径显示的颜色和亮度,减少“光污染”
manayume Dec 19, 2025
1a9a29b
修复了更换起点后车辆朝向错误的问题
manayume Dec 19, 2025
4e94a0d
Merge branch 'OpenHUTB:main' into main
manayume Dec 19, 2025
d4519a9
Finish merging manually
manayume Dec 19, 2025
879bf5d
Merge branch 'OpenHUTB:main' into main
manayume Dec 19, 2025
deab24c
使用ros封装项目,将原python文件放入python文件夹
manayume Dec 19, 2025
0ac0daa
Revert "使用ros封装项目,将原python文件放入python文件夹"
manayume Dec 20, 2025
4ba61c5
Merge branch 'OpenHUTB:main' into main
manayume Dec 20, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def reset(self):

self.transform = Transform(
Location(x=self.initial_pos[0], y=self.initial_pos[1], z=self.initial_pos[2]),
Rotation(yaw=-correct_yaw) # 使用路径的朝向
Rotation(yaw=correct_yaw) # 使用路径的朝向
)

# 生成车辆
Expand All @@ -195,7 +195,7 @@ def reset(self):
offset_y = random.uniform(-2.0, 2.0)
temp_transform = Transform(
Location(x=self.initial_pos[0] + offset_x, y=self.initial_pos[1] + offset_y, z=self.initial_pos[2]),
Rotation(yaw=-correct_yaw)
Rotation(yaw=correct_yaw)
)
self.vehicle = self.world.try_spawn_actor(self.model_3, temp_transform)
if self.vehicle is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
# ==================== 轨迹配置 ====================
TRAJECTORIES = {
"custom_trajectory": {
"start": [-8.77956485748291, 140.2951202392578, 2.0014660358428955, 0],
"end": [74.17852020263672, -56.52183151245117, 0.18172569572925568],
"start": [108.91605377197266,101.3561782836914,0.6136533617973328, 0],
"end": [74.64781951904297,-56.014076232910156,0.40768954157829285],
"description": "自定义轨迹 - 城镇道路"
},
"test_trajectory": {
"start": [0.0, 0.0, 2.0, 0],
"end": [100.0, 0.0, 2.0],
"start": [98.25761413574219,99.15800476074219,0.4944169223308563, 0],
"end": [74.64781951904297,-56.014076232910156,0.40768954157829285],
"description": "测试轨迹 - 直线道路"
}
}

# 当前使用的轨迹
CURRENT_TRAJECTORY = "custom_trajectory"
CURRENT_TRAJECTORY = "test_trajectory"

def get_current_trajectory():
"""获取当前轨迹配置"""
Expand Down Expand Up @@ -49,7 +49,7 @@ def get_current_trajectory():
EPISODE_INTERVAL = 2.0 # episode之间的间隔秒数

# ==================== 交通配置 ====================
ENABLE_TRAFFIC = True # 是否启用交通流(暂时关闭,避免干扰)
ENABLE_TRAFFIC = False # 是否启用交通流(暂时关闭,避免干扰)
TRAFFIC_VEHICLES = 30 # 交通车辆数量
TRAFFIC_WALKERS = 50 # 交通行人数量
TRAFFIC_SAFE_MODE = True # 交通安全模式
Expand Down Expand Up @@ -161,4 +161,4 @@ def print_config():
print(f" 固定时间步长: {FIXED_DELTA_SECONDS}s")
print(f" 同步模式: {'开启' if SYNCHRONOUS_MODE else '关闭'}")

print("="*60)
print("="*60)
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,4 @@ def get_current_settings(self):
'fps': 1.0 / settings.fixed_delta_seconds if settings.fixed_delta_seconds else 0,
'tile_stream_distance': settings.tile_stream_distance,
'actor_active_distance': settings.actor_active_distance
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ def get_model_info(self):
'braking_model_path': cfg.MODEL_PATHS['braking'] if self.braking_model else None,
'driving_model_path': cfg.MODEL_PATHS['driving'] if self.driving_model else None
}
return info
return info
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ def cleanup(self):
all_actors[i].stop()

# 销毁所有行人相关actor
self.client.apply_batch([carla.command.DestroyActor(x) for x in self.all_id])
self.client.apply_batch([carla.command.DestroyActor(x) for x in self.all_id])
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import carla
import math
import config as cfg

class TrajectoryManager:
"""轨迹管理器"""
Expand Down Expand Up @@ -104,4 +103,4 @@ def get_route_info(self):
'has_route': True,
'start_point': self.route_points[0] if self.route_points else None,
'end_point': self.route_points[-1] if self.route_points else None
}
}
Loading