mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 04:23:34 +08:00
micrortps_bridge: pass absolute path for yaml file and urtps templates
This commit is contained in:
@@ -117,8 +117,8 @@ if __name__ == "__main__":
|
||||
parser.add_argument("-m", "--topic-msg-dir", dest='msgdir', type=str,
|
||||
help="Topics message dir, by default msg/", default="msg")
|
||||
parser.add_argument("-y", "--rtps-ids-file", dest='yaml_file', type=str,
|
||||
help="RTPS msg IDs definition file, relative to the msg_dir, by default tools/uorb_rtps_message_ids.yaml",
|
||||
default="tools/uorb_rtps_message_ids.yaml")
|
||||
help="RTPS msg IDs definition file absolute path, by default use relative path to msg, tools/uorb_rtps_message_ids.yaml",
|
||||
default='tools/uorb_rtps_message_ids.yaml')
|
||||
|
||||
# Parse arguments
|
||||
args = parser.parse_args()
|
||||
@@ -126,8 +126,11 @@ if __name__ == "__main__":
|
||||
msg_folder = args.msgdir
|
||||
if args.msgdir == 'msg':
|
||||
msg_folder = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
classifier = Classifier(os.path.join(
|
||||
msg_folder, args.yaml_file), msg_folder)
|
||||
if args.yaml_file != 'tools/uorb_rtps_message_ids.yaml':
|
||||
classifier = Classifier(os.path.abspath(args.yaml_file), msg_folder)
|
||||
else:
|
||||
classifier = Classifier(os.path.join(
|
||||
msg_folder, args.yaml_file), msg_folder)
|
||||
|
||||
if args.send:
|
||||
if args.path:
|
||||
|
||||
Reference in New Issue
Block a user