Skip to content

Commit

Permalink
yaml_to_camera_info: support yaml format writen by opencv
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Jun 4, 2024
1 parent 86f91f3 commit a8cefa9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rtabmap_util/scripts/yaml_to_camera_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

def yaml_to_CameraInfo(yaml_fname):
with open(yaml_fname, "r") as file_handle:
first_line = file_handle.readline()
if "%YAML:" not in first_line:
file_handle.seek(0)
calib_data = yaml.load(file_handle, Loader=yaml.FullLoader)

camera_info_msg = CameraInfo()
Expand Down

0 comments on commit a8cefa9

Please sign in to comment.