36 lines
1.6 KiB
PowerShell
36 lines
1.6 KiB
PowerShell
param(
|
|
[Parameter(Mandatory = $true)][string]$DataRoot,
|
|
[Parameter(Mandatory = $true)][string]$RtkCapture,
|
|
[Parameter(Mandatory = $true)][string]$ImuCapture,
|
|
[Parameter(Mandatory = $true)][string]$OutputRoot,
|
|
[string]$LidarObject = "frontlidar",
|
|
[string]$LidarCaptureName = "h32.rscap",
|
|
[Parameter(Mandatory = $true)][double]$RtkReferenceHeightAboveGroundM,
|
|
[string]$Timezone = "+08:00",
|
|
[ValidateSet("device_gnss", "host")][string]$TimeBasis = "device_gnss",
|
|
[int]$ExpectedStations = 34,
|
|
[int]$MinPairs = 20,
|
|
[int]$Bootstrap = 200
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$ExportRoot = Join-Path $OutputRoot "exported"
|
|
$PreparedRoot = Join-Path $OutputRoot "prepared_rtk_direct"
|
|
$CalibrationRoot = Join-Path $OutputRoot "calibration"
|
|
|
|
& (Join-Path $PSScriptRoot "export_multisensor_stations.ps1") `
|
|
-DataRoot $DataRoot -RtkCapture $RtkCapture -ImuCapture $ImuCapture `
|
|
-OutputRoot $ExportRoot -LidarObject $LidarObject -LidarCaptureName $LidarCaptureName `
|
|
-Timezone $Timezone -TimeBasis $TimeBasis
|
|
if ($LASTEXITCODE -ne 0) { throw "Raw-data export failed" }
|
|
|
|
& (Join-Path $PSScriptRoot "run_direct_rtk_lidar.ps1") `
|
|
-CombinedRoot (Join-Path $ExportRoot "combined") `
|
|
-WorkRoot $PreparedRoot -OutputRoot $CalibrationRoot `
|
|
-RtkReferenceHeightAboveGroundM $RtkReferenceHeightAboveGroundM `
|
|
-ExpectedStations $ExpectedStations -MinPairs $MinPairs -Bootstrap $Bootstrap
|
|
if ($LASTEXITCODE -ne 0) { throw "RTK-LiDAR calibration failed" }
|
|
|
|
Write-Host "Final result: $(Join-Path $CalibrationRoot 'final_T_RTK_lidar.json')"
|
|
Write-Host "Prepared frames: $(Join-Path $PreparedRoot 'frames_all')"
|