From 3a30939258d4f97b0ecbdfd6eda66b8f5df736eb Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 19 Apr 2023 20:40:32 +0200 Subject: [PATCH 1/2] Fix backslashes in arkitscene rigid transformation path Should be fixed properly by https://github.com/rerun-io/rerun/issues/1937 --- examples/python/arkitscenes/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/arkitscenes/main.py b/examples/python/arkitscenes/main.py index 9b9e00632539..afb2e88d921d 100755 --- a/examples/python/arkitscenes/main.py +++ b/examples/python/arkitscenes/main.py @@ -251,7 +251,7 @@ def log_camera( rr.log_rigid3( # pathlib makes it easy to get the parent, but log_rigid requires a string - str(Path(entity_id).parent), + str(Path(entity_id).parent).replace("\\", "/"), child_from_parent=camera_from_world, xyz="RDF", # X=Right, Y=Down, Z=Forward ) From ff2835911cdb150bc3d1918e49dc469832c2f0b9 Mon Sep 17 00:00:00 2001 From: Nikolaus West Date: Wed, 19 Apr 2023 21:43:56 +0200 Subject: [PATCH 2/2] Use PosixPath instead of .replace("\\", "/") --- examples/python/arkitscenes/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/python/arkitscenes/main.py b/examples/python/arkitscenes/main.py index afb2e88d921d..b90ec3e0c70a 100755 --- a/examples/python/arkitscenes/main.py +++ b/examples/python/arkitscenes/main.py @@ -2,7 +2,7 @@ import argparse import json import os -from pathlib import Path +from pathlib import Path, PosixPath from typing import Any, Dict, List, Tuple import cv2 @@ -251,7 +251,7 @@ def log_camera( rr.log_rigid3( # pathlib makes it easy to get the parent, but log_rigid requires a string - str(Path(entity_id).parent).replace("\\", "/"), + str(PosixPath(entity_id).parent), child_from_parent=camera_from_world, xyz="RDF", # X=Right, Y=Down, Z=Forward )