|
@@ -11,6 +11,7 @@ key1 = 'pjibot_delivery/'
|
|
path1 = '/scenarios3/'
|
|
path1 = '/scenarios3/'
|
|
path2 = '/mnt/disk001/dcl_data_process/src/python2/pjibot_delivery/'
|
|
path2 = '/mnt/disk001/dcl_data_process/src/python2/pjibot_delivery/'
|
|
path3 = '/mnt/disk001/dcl_data_process/src/python2/pjibot_delivery/resource/'
|
|
path3 = '/mnt/disk001/dcl_data_process/src/python2/pjibot_delivery/resource/'
|
|
|
|
+vehicle_name = 'PuJin_distribution' # 配送 PuJin_distribution 巡检 PuJin_patrol_robot
|
|
|
|
|
|
logging.basicConfig(filename=path2 + 'log/simulation.log', level=logging.INFO,
|
|
logging.basicConfig(filename=path2 + 'log/simulation.log', level=logging.INFO,
|
|
format='%(asctime)s - %(levelname)s - %(message)s')
|
|
format='%(asctime)s - %(levelname)s - %(message)s')
|
|
@@ -62,7 +63,7 @@ def move_xosc_before_simulation(root_path):
|
|
if node1.get("name") == 'Ego':
|
|
if node1.get("name") == 'Ego':
|
|
for node2 in node1:
|
|
for node2 in node1:
|
|
if node2.tag == 'Vehicle':
|
|
if node2.tag == 'Vehicle':
|
|
- node2.set('name', 'Pji_Utility_Vehicle')
|
|
|
|
|
|
+ node2.set('name', vehicle_name)
|
|
tree1.write(root_path + 'openx0.xosc')
|
|
tree1.write(root_path + 'openx0.xosc')
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
@@ -73,7 +74,7 @@ def upload_simulation(parse_prefix, mp41):
|
|
try:
|
|
try:
|
|
bucket.put_object_from_file(parse_prefix + 'scenario_orig.mp4', mp41)
|
|
bucket.put_object_from_file(parse_prefix + 'scenario_orig.mp4', mp41)
|
|
logging.info('上传仿真视频到 %s' % parse_prefix + 'scenario_orig.mp4')
|
|
logging.info('上传仿真视频到 %s' % parse_prefix + 'scenario_orig.mp4')
|
|
- shutil.rmtree(path1) # 仿真完就删除
|
|
|
|
|
|
+ shutil.rmtree(path1) # 仿真完就删除
|
|
except Exception as e:
|
|
except Exception as e:
|
|
logging.exception("上传视频报错 %s" % str(e))
|
|
logging.exception("上传视频报错 %s" % str(e))
|
|
|
|
|