mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +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:
@@ -54,6 +54,12 @@ output_dir = sys.argv[2]
|
|||||||
|
|
||||||
if not os.path.exists(os.path.abspath(output_dir)):
|
if not os.path.exists(os.path.abspath(output_dir)):
|
||||||
os.mkdir(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()
|
msg_list = list()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user