Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7d152ea
wip: a new localization engine, navigation code refactor into util mo…
creeper5820 Apr 24, 2026
1c4a68d
feat(lua): add train-decision endpoint
gqsdjhh Apr 21, 2026
5a12283
feat(nav-map): add train_map occupancy map and metadata
gqsdjhh Apr 21, 2026
f607163
feat(lua): add train-specific road-crossing and start-cruise intents
gqsdjhh Apr 21, 2026
49c4288
refactor(lua): simplify cruise entry and rework crossing-road-zone flow
gqsdjhh Apr 21, 2026
b6687e2
feat(lua): add one-step descent stage before escape-to-home
gqsdjhh Apr 21, 2026
97910d6
feat(lua): add decision test endpoint and harden train-decision FSM
gqsdjhh Apr 21, 2026
c246349
feat(lua): add navigation history queue and improve escape-to-home ro…
gqsdjhh Apr 23, 2026
e66bd5f
refactor(lua): unify endpoint FSM retry flow, remove wait logic, and …
gqsdjhh Apr 23, 2026
a4e1131
feat(lua): route escape-to-home via fluctuant road and set traversal …
gqsdjhh Apr 24, 2026
f9da118
refactor(lua): navigation lua decision flow for fluctuant-road routing
gqsdjhh Apr 25, 2026
21fbcc3
feat(lua): reorganize navigation task modules and add forward-press t…
gqsdjhh Apr 25, 2026
f0c20d9
feat(lua): add start-cruise intent, supply-health task, and blackboar…
gqsdjhh Apr 25, 2026
b0ed278
feat(lua): add forward-press and guard-home flows with return-stage r…
gqsdjhh Apr 27, 2026
a90db44
feat(lua): add rmuc region map loader and region utilities
gqsdjhh Apr 28, 2026
509ea54
feat(lua): add region-aware competition intent FSM
gqsdjhh Apr 28, 2026
5287521
refactor(lua): refresh RMUC map data and simplify map lookup
gqsdjhh Apr 30, 2026
c2b4685
feat(navigation): split intent flows for competition and train
gqsdjhh Apr 30, 2026
86fcbea
fix(lua): align endpoint defaults with updated train map
gqsdjhh Apr 30, 2026
49a9981
feat: expand referee blackboard sync
gqsdjhh May 2, 2026
bc11852
refactor(lua): split RMUC region map module
gqsdjhh May 2, 2026
c084afd
feat(map): add train region map assets
gqsdjhh May 2, 2026
e823d6b
feat(train): route escape by train region
gqsdjhh May 2, 2026
fbc4920
fix(lua): launch sensors before motion
gqsdjhh May 2, 2026
cb427ad
build: disable localization engine source
gqsdjhh May 2, 2026
29e4c07
style(build): normalize disabled source indentation
gqsdjhh May 2, 2026
9224376
feat(map): update RMUC road regions
gqsdjhh May 3, 2026
4fe2259
fix(train): tune map origin and recovery rules
gqsdjhh May 3, 2026
efef7c0
test(lua): disable rswitch navigation restart
gqsdjhh May 3, 2026
2598c82
feat(lua): refine road and cruise navigation tasks
gqsdjhh May 3, 2026
e0a49a5
feat(competition): add attack outpost rule point
gqsdjhh May 3, 2026
bdc34e8
更新代码并在仿真中增添基地和前哨站血量
Spring-rains May 3, 2026
002c019
解决了一些开局会守家的bug
Spring-rains May 5, 2026
4e03029
使仿真可以正常运行
Spring-rains May 5, 2026
7b447b6
为仿真增加一点blackboard细节
Spring-rains May 7, 2026
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
52 changes: 44 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

find_package(Eigen3 REQUIRED)
find_package(Lua 5.4 REQUIRED)
find_package(PCL REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(pcl_conversions REQUIRED)

find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(nav2_msgs REQUIRED)
find_package(PCL REQUIRED)

find_package(rmcs_executor REQUIRED)

find_package(nav2_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(rmcs_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(ament_index_cpp REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(Lua 5.4 REQUIRED)

find_package(rmcs_executor REQUIRED)

include(FetchContent)
FetchContent_Declare(
Expand All @@ -49,14 +52,17 @@ target_compile_features(
target_sources(
${PROJECT_NAME}
PRIVATE
# src/cxx/util/localization/engine.cc
src/cxx/util/navigation/navigation.cc
src/cxx/context.cc
src/cxx/navigation.cc
src/cxx/component.cc
)
set(RMCS_CORE_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../rmcs_core/src")
target_include_directories(
${PROJECT_NAME}
PRIVATE
SYSTEM PRIVATE
${PROJECT_SOURCE_DIR}/src/
${RMCS_CORE_SOURCE_DIR}
${rmcs_executor_INCLUDE_DIRS}
${geometry_msgs_INCLUDE_DIRS}
${rmcs_msgs_INCLUDE_DIRS}
Expand All @@ -65,7 +71,10 @@ target_include_directories(
${tf2_ros_INCLUDE_DIRS}
${rclcpp_action_INCLUDE_DIRS}
${nav2_msgs_INCLUDE_DIRS}
${sensor_msgs_INCLUDE_DIRS}
${pcl_conversions_INCLUDE_DIRS}
${LUA_INCLUDE_DIR}
${PCL_INCLUDE_DIRS}
)
target_link_libraries(
${PROJECT_NAME}
Expand All @@ -84,6 +93,33 @@ target_link_libraries(
${tf2_ros_LIBRARIES}
${rclcpp_action_LIBRARIES}
${nav2_msgs_LIBRARIES}
${sensor_msgs_LIBRARIES}
${pcl_conversions_LIBRARIES}
)

add_executable(${PROJECT_NAME}-sim-sidecar src/cxx/sim_sidecar.cc)
target_compile_features(
${PROJECT_NAME}-sim-sidecar
PRIVATE
cxx_std_23
)
target_compile_definitions(
${PROJECT_NAME}-sim-sidecar
PRIVATE
RMCS_NAVIGATION_SOURCE_DIR="${PROJECT_SOURCE_DIR}"
)
target_include_directories(
${PROJECT_NAME}-sim-sidecar
PRIVATE
${PROJECT_SOURCE_DIR}/src/
${LUA_INCLUDE_DIR}
)
target_link_libraries(
${PROJECT_NAME}-sim-sidecar
PRIVATE
${LUA_LIBRARIES}
sol2::sol2
yaml-cpp::yaml-cpp
)

find_package(pluginlib REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion cmake/export.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
install(
TARGETS ${PROJECT_NAME}
TARGETS ${PROJECT_NAME} ${PROJECT_NAME}-sim-sidecar
DESTINATION lib/${PROJECT_NAME}/
)
install(
Expand Down
54 changes: 27 additions & 27 deletions config/motion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,32 +106,32 @@ controller_server:
"PathAlignCritic",
"PathFollowCritic",
]

ConstraintCritic.enabled: true
ConstraintCritic.cost_weight: 5.0

CostCritic.enabled: true
CostCritic.cost_weight: 16.0
CostCritic.critical_cost: 120.0
CostCritic.collision_cost: 8000000.0
CostCritic.near_collision_cost: 253
CostCritic.cost_power: 2
CostCritic.consider_footprint: true
CostCritic.near_goal_distance: 0.8
CostCritic.trajectory_point_step: 1

GoalCritic.enabled: true
GoalCritic.cost_weight: 4.5
GoalCritic.threshold_to_consider: 1.2

PathAlignCritic.enabled: true
PathAlignCritic.cost_weight: 0.8
PathAlignCritic.threshold_to_consider: 1.0
PathAlignCritic.trajectory_point_step: 3

PathFollowCritic.enabled: true
PathFollowCritic.cost_weight: 3.2
PathFollowCritic.threshold_to_consider: 1.5
ConstraintCritic:
enabled: true
cost_weight: 5.0
CostCritic:
enabled: true
cost_weight: 10.0
critical_cost: 120.0
collision_cost: 8000000.0
near_collision_cost: 230
cost_power: 2
consider_footprint: true
near_goal_distance: 1.0
trajectory_point_step: 1
GoalCritic:
enabled: true
cost_weight: 10.0
threshold_to_consider: 1.0
PathAlignCritic:
enabled: true
cost_weight: 0.8
threshold_to_consider: 1.0
trajectory_point_step: 3
PathFollowCritic:
enabled: true
cost_weight: 3.2
threshold_to_consider: 1.5

local_costmap:
local_costmap:
Expand Down Expand Up @@ -162,5 +162,5 @@ local_costmap:

inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
inflation_radius: 0.25
inflation_radius: 0.4
cost_scaling_factor: 0.5
4 changes: 4 additions & 0 deletions godot-mock/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root = true

[*]
charset = utf-8
2 changes: 2 additions & 0 deletions godot-mock/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
3 changes: 3 additions & 0 deletions godot-mock/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
/android/
Binary file added godot-mock/material/20260422-192911.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions godot-mock/material/20260422-192911.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dqtsgnct0ijl0"
path.s3tc="res://.godot/imported/20260422-192911.png-f31ee39485589f6eb4a8fd243ef62172.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://material/20260422-192911.png"
dest_files=["res://.godot/imported/20260422-192911.png-f31ee39485589f6eb4a8fd243ef62172.s3tc.ctex"]

[params]

compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
7 changes: 7 additions & 0 deletions godot-mock/material/Cn_Mat_U_LMSuit_21_body_BIANSE.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://bnfxtpyuftji1"]

[resource]
resource_name = "Cn_Mat_U_LMSuit_21_body_BIANSE"
cull_mode = 2
albedo_color = Color(0.9063318, 0.9063318, 0.9063318, 1)
roughness = 0.9090847
Binary file added godot-mock/material/white_wood.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions godot-mock/material/white_wood.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dodhbatwmlp07"
path.s3tc="res://.godot/imported/white_wood.png-a533a54625f96f5b178df59798e15a83.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://material/white_wood.png"
dest_files=["res://.godot/imported/white_wood.png-a533a54625f96f5b178df59798e15a83.s3tc.ctex"]

[params]

compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
7 changes: 7 additions & 0 deletions godot-mock/models/Cn_Mat_U_LMSuit_21_body_BIANSE.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://8d75nvfc3dnj"]

[resource]
resource_name = "Cn_Mat_U_LMSuit_21_body_BIANSE"
cull_mode = 2
albedo_color = Color(0.9063318, 0.9063318, 0.9063318, 1)
roughness = 0.9090847
Binary file added godot-mock/models/cube.glb
Binary file not shown.
50 changes: 50 additions & 0 deletions godot-mock/models/cube.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://iisq5ccb4jt1"
path="res://.godot/imported/cube.glb-c6bf6ebacd621473d1ca4ff4a368b9dc.scn"

[deps]

source_file="res://models/cube.glb"
dest_files=["res://.godot/imported/cube.glb-c6bf6ebacd621473d1ca4ff4a368b9dc.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Cube"
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=0
meshes/lightmap_texel_size=0.1
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=false
animation/fps=15
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"cube_material": {
"use_external/enabled": true,
"use_external/fallback_path": "res://models/cube_material.tres",
"use_external/path": "uid://cbwgleagikdfb"
}
}
}
gltf/naming_version=2
gltf/embedded_image_handling=1
Binary file added godot-mock/models/cube.mesh
Binary file not shown.
9 changes: 9 additions & 0 deletions godot-mock/models/cube_material.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cbwgleagikdfb"]

[ext_resource type="Texture2D" uid="uid://dodhbatwmlp07" path="res://material/white_wood.png" id="1"]

[resource]
resource_name = "Material"
albedo_color = Color(0, 0, 0, 1)
albedo_texture = ExtResource("1")
roughness = 0.75
Binary file not shown.
42 changes: 42 additions & 0 deletions godot-mock/models/d7a3f20de4e4486182806c40699d26d4.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bnx0kbsvbubto"
path="res://.godot/imported/d7a3f20de4e4486182806c40699d26d4.glb-dbd1b1a6503096bd82aa2dd7e4f4cc15.scn"

[deps]

source_file="res://models/d7a3f20de4e4486182806c40699d26d4.glb"
dest_files=["res://.godot/imported/d7a3f20de4e4486182806c40699d26d4.glb-dbd1b1a6503096bd82aa2dd7e4f4cc15.scn"]

[params]

nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=0
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=1
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1
1 change: 1 addition & 0 deletions godot-mock/models/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading