mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
uorb_to_ros_msgs: delete all messages on the out dir first, so it can also consider message deletions on the input dir
This commit is contained in:
parent
5c17a0b205
commit
de917bae6d
@ -54,6 +54,12 @@ output_dir = sys.argv[2]
|
||||
|
||||
if not os.path.exists(os.path.abspath(output_dir)):
|
||||
os.mkdir(os.path.abspath(output_dir))
|
||||
else:
|
||||
ros_msg_dir = os.path.abspath(output_dir)
|
||||
msg_files = os.listdir(ros_msg_dir)
|
||||
for msg in msg_files:
|
||||
if msg.endswith(".msg"):
|
||||
os.remove(os.path.join(ros_msg_dir, msg))
|
||||
|
||||
msg_list = list()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user