|
@@ -4,6 +4,7 @@ import (
|
|
|
commonConfig "cicv-data-closedloop/aarch64/pjisuv/common/config"
|
|
|
"cicv-data-closedloop/common/config/c_log"
|
|
|
"cicv-data-closedloop/common/util"
|
|
|
+ "os"
|
|
|
"strings"
|
|
|
"time"
|
|
|
)
|
|
@@ -22,9 +23,10 @@ func ForCompetition() {
|
|
|
util.CreateDir(dir)
|
|
|
// 1 打包
|
|
|
var commandArgs = []string{"record", "--split", "--duration=" + timeInterval, "/pji_gps", "/data_read"}
|
|
|
- _, err := util.ExecuteWithEnvAndDirAsync(commonConfig.RosbagEnvs, dir, commonConfig.RosbagPath, commandArgs...)
|
|
|
+ command, err := util.ExecuteWithEnvAndDirAsync(commonConfig.RosbagEnvs, dir, commonConfig.RosbagPath, commandArgs...)
|
|
|
if err != nil {
|
|
|
- c_log.GlobalLogger.Error("执行record命令报错,", commandArgs)
|
|
|
+ c_log.GlobalLogger.Error("程序崩溃。执行record命令", command, "出错:", err)
|
|
|
+ os.Exit(-1)
|
|
|
}
|
|
|
// 2 扫描目录文件
|
|
|
for {
|