|
@@ -2,6 +2,7 @@ package svc
|
|
|
|
|
|
import (
|
|
|
"cicv-data-closedloop/common/config/c_log"
|
|
|
+ commonUtil "cicv-data-closedloop/common/util"
|
|
|
commonConfig "cicv-data-closedloop/pji/common/cfg"
|
|
|
"cicv-data-closedloop/pji/common/global"
|
|
|
"cicv-data-closedloop/pji/common/util"
|
|
@@ -69,7 +70,7 @@ outLoop:
|
|
|
oldName := bag
|
|
|
newName := bag + "_filter"
|
|
|
filterCommand := []string{"filter", oldName, newName, "\"" + strings.Join(topicsFilterSlice, " or ") + "\""}
|
|
|
- _, output, err := util.Execute("rosbag", filterCommand...)
|
|
|
+ _, output, err := commonUtil.ExecuteWithEnvSync(os.Environ(), "rosbag", filterCommand...)
|
|
|
c_log.GlobalLogger.Info("正在过滤中,【FaultTime】=", currentTimeWindow.FaultTime, "【Label】=", currentTimeWindow.Labels, ",进度", i+1, "/", bagNumber, "。")
|
|
|
if err != nil {
|
|
|
c_log.GlobalLogger.Errorf("filter命令执行出错【命令】=%v,【输出】=%v,【err】=%v", filterCommand, output, err)
|
|
@@ -91,7 +92,7 @@ outLoop:
|
|
|
oldName := bag
|
|
|
compressCommand := []string{"compress", "--bz2", oldName}
|
|
|
c_log.GlobalLogger.Info("正在压缩中,【FaultTime】=", currentTimeWindow.FaultTime, "【Label】=", currentTimeWindow.Labels, ",进度", i+1, "/", bagNumber, "。")
|
|
|
- if _, output, err := util.Execute("rosbag", compressCommand...); err != nil {
|
|
|
+ if _, output, err := commonUtil.ExecuteWithEnvSync(os.Environ(), "rosbag", compressCommand...); err != nil {
|
|
|
c_log.GlobalLogger.Errorf("compress命令执行出错【命令】=%v,【输出】=%v,【err】=%v", compressCommand, output, err)
|
|
|
continue
|
|
|
}
|