Browse Source

uorb_to_ros_rtps_ids: add an header with a notice regarding the autogneration of the 'px4_ros_com' urtps_bridge_topics.yaml file

Although it can be modified manually, we are going to recommend the developer to generate it from the PX4-Autopilot side instead
master
TSC21 4 years ago committed by Nuno Marques
parent
commit
695e1fa574
  1. 9
      msg/tools/uorb_to_ros_rtps_ids.py

9
msg/tools/uorb_to_ros_rtps_ids.py

@ -14,7 +14,7 @@ __author__ = 'PX4 Development Team' @@ -14,7 +14,7 @@ __author__ = 'PX4 Development Team'
__copyright__ = \
'''
'
' Copyright (c) 2018-2019 PX4 Development Team. All rights reserved.
' Copyright (c) 2018-2021 PX4 Development Team. All rights reserved.
'
' Redistribution and use in source and binary forms, or without
' modification, permitted provided that the following conditions
@ -114,6 +114,10 @@ def update_yaml_file(list, file): @@ -114,6 +114,10 @@ def update_yaml_file(list, file):
"""
try:
with open(file, 'w') as f:
f.write("# AUTOGENERATED-FILE! DO NOT MODIFY IT DIRECTLY.\n#"
" Edit instead the same file under PX4-Autopilot/msg/tools and"
" use the \n# PX4-Autopilot/msg/tools/uorb_to_ros_rtps_ids.py"
" to regenerate this file.\n")
yaml.dump(list, f, Dumper=IndenterDumper, default_flow_style=False)
if verbose:
if in_file == out_file:
@ -144,7 +148,8 @@ if __name__ == "__main__": @@ -144,7 +148,8 @@ if __name__ == "__main__":
args = parser.parse_args()
verbose = args.verbose
in_file = args.input_file
out_file = args.output_file if (args.output_file != in_file and args.output_file != "") else in_file
out_file = args.output_file if (
args.output_file != in_file and args.output_file != "") else in_file
if verbose:
print("-- PX4 to ROS RTPS Ids --")

Loading…
Cancel
Save