patch curriculum..

This commit is contained in:
2026-08-07 10:26:57 +09:00
parent 755546713c
commit c46c8df475
9 changed files with 408 additions and 73 deletions
+15 -5
View File
@@ -1148,12 +1148,19 @@ async function ensureArtifactFile(url?: string | null, fileName?: string | null,
if (!artifactUrl) return null
const targetPath = artifactCachePath(artifactUrl, fileName)
const expected = checksumSha256?.trim().toLowerCase()
if (!existsSync(targetPath)) await downloadArtifact(artifactUrl, targetPath)
if (checksumSha256?.trim()) {
const actual = createHash('sha256').update(await readFile(targetPath)).digest('hex')
if (actual.toLowerCase() !== checksumSha256.trim().toLowerCase()) {
await rm(targetPath, { force: true }).catch(() => undefined)
throw new Error(`artifact checksum mismatch: ${safeArtifactFileName(artifactUrl, fileName)}`)
if (expected) {
let actual = createHash('sha256').update(await readFile(targetPath)).digest('hex').toLowerCase()
if (actual !== expected) {
// Artifact URLs are stable, so an existing filename can be an older cached release.
await rm(targetPath, { force: true })
await downloadArtifact(artifactUrl, targetPath)
actual = createHash('sha256').update(await readFile(targetPath)).digest('hex').toLowerCase()
if (actual !== expected) {
await rm(targetPath, { force: true }).catch(() => undefined)
throw new Error(`artifact checksum mismatch: ${safeArtifactFileName(artifactUrl, fileName)}`)
}
}
}
return targetPath
@@ -3434,6 +3441,7 @@ function buildNav2ModuleEnvScript(): string {
' "[lms-nav2-gazebo-perception]nav2-perception_v1.0.0_ws"',
' "[lms-nav2-gazebo-perception3d]nav2-perception3d_v1.0.0_ws"',
' "[lms-nav2-gazebo-slam3d]nav2-slam3d_v1.0.0_ws"',
' "[lms-nav2-gazebo-gui]nav2-rviz2_v1.0.0_ws"',
')',
'',
'for module_dir in "${MODULES[@]}"; do',
@@ -3489,6 +3497,7 @@ function buildNav2DockerRunScript(): string {
' *lms-nav2-gazebo-planning*) PACKAGE=planning_pkg; LAUNCH=planning.launch.py ;;',
' *lms-nav2-gazebo-control*) PACKAGE=control_pkg; LAUNCH=control.launch.py ;;',
' *lms-nav2-gazebo-perception3d*) PACKAGE=perception3d_pkg; LAUNCH=perception.launch.py ;;',
' *lms-nav2-gazebo-gui*) PACKAGE=gui_pkg; LAUNCH=gui.launch.py ;;',
' *lms-nav2-gazebo-slam*) PACKAGE=slam_pkg; LAUNCH=slam.launch.py ;;',
' *lms-nav2-gazebo-perception*) PACKAGE=perception_pkg; LAUNCH=perception.launch.py ;;',
' *nav2-simulator*) PACKAGE=nav2_turtlebot_simulator; LAUNCH=simulator.launch.py ;;',
@@ -3580,6 +3589,7 @@ function buildNav2DockerBuildScript(): string {
' *lms-nav2-gazebo-planning*) TARGET=planning_pkg ;;',
' *lms-nav2-gazebo-control*) TARGET=control_pkg ;;',
' *lms-nav2-gazebo-perception3d*) TARGET=perception3d_pkg ;;',
' *lms-nav2-gazebo-gui*) TARGET=gui_pkg ;;',
' *lms-nav2-gazebo-slam*) TARGET=slam_pkg ;;',
' *lms-nav2-gazebo-perception*) TARGET=perception_pkg ;;',
' *nav2-simulator*) TARGET=nav2_turtlebot_simulator ;;',