|
@@ -96,13 +96,14 @@ public class VideoService {
|
|
|
//3 生成 xosc 文件
|
|
|
String xoscPath = generateXosc(rootDirectoryPathOfLinux, xodrPathOfLinux, osgbPathOfLinux, projectId, projectType);
|
|
|
// 启动虚拟窗口
|
|
|
+ log.info("生成xosc文件路径-----"+xoscPath);
|
|
|
//4 生成图片
|
|
|
String pictureDirectoryPath = rootDirectoryPathOfLinux + "picture";
|
|
|
FileUtil.createDirectory(pictureDirectoryPath);
|
|
|
String esminiCommandTemp = esminiCommand + " " + xoscPath + " " + pictureDirectoryPath + "/screenshot " + StringUtil.doubleToString(Double.parseDouble(maxSimulationTime), 2);
|
|
|
LinuxUtil.execute2(XvfbCommand, esminiCommandTemp);
|
|
|
// String esminiResult = LinuxUtil.execute(esminiCommandTemp);
|
|
|
- int num=15;
|
|
|
+ int num=10;
|
|
|
for (int i=0;i<num;i++ ) {
|
|
|
String remove="rm -f "+ pictureDirectoryPath + "/screenshot_0000"+i+".tga";
|
|
|
log.info("删除图片=="+remove);
|
|
@@ -127,7 +128,7 @@ public class VideoService {
|
|
|
log.info("上传成功:" + videoTargetPathOfMinio);
|
|
|
//删除生成的临时文件
|
|
|
String removeAll="rm -rf "+ pictureDirectoryPath ;
|
|
|
- log.info("删除图片=="+removeAll);
|
|
|
+ log.info("删除全部图片=="+removeAll);
|
|
|
LinuxUtil.execute( removeAll);
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS);
|
|
|
}
|
|
@@ -154,6 +155,7 @@ public class VideoService {
|
|
|
String newXoscPath = oldXoscPath.replace(oldXoscName, newXoscName);
|
|
|
//获取三维自车对象
|
|
|
VehicleTypePO po = vehicleById(projectId, projectType);
|
|
|
+ log.info("修改 xosc 文件----=="+po.getModel3d());
|
|
|
|
|
|
//1 创建Reader对象
|
|
|
SAXReader reader = new SAXReader();
|
|
@@ -294,7 +296,7 @@ public class VideoService {
|
|
|
|
|
|
//获取三维自车对象
|
|
|
@SneakyThrows
|
|
|
- private VehicleTypePO vehicleById(String projectId, String projectType) {
|
|
|
+ public VehicleTypePO vehicleById(String projectId, String projectType) {
|
|
|
VehicleTypePO po = new VehicleTypePO();
|
|
|
//项目类型 1.手动;2.自动
|
|
|
String vehicle = "";
|