Skip to content

Commit

Permalink
Fix transform3d_simple and reenable roundtrip test (#3401)
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc authored Sep 22, 2023
1 parent b3578f1 commit 25843e7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 27 deletions.
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/re_types/src/archetypes/transform3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions docs/code-examples/roundtrips.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
"point3d_random": ["cpp", "py", "rust"], # TODO(#3206): need to align everything to use PCG64 in the same order etc... don't have time for that.
"tensor_one_dim": ["cpp", "py", "rust"], # TODO(#3206): need to align everything to use PCG64 in the same order etc... don't have time for that.
"tensor_simple": ["cpp", "py", "rust"], # TODO(#3206): need to align everything to use PCG64 in the same order etc... don't have time for that.
# TODO(#3207): two issues:
# - cpp sends an identity transform for no reason
# - python has a crazy indicator component out of nowhere
"transform3d_simple": ["cpp", "py", "rust"],
}

# fmt: on
Expand Down
13 changes: 4 additions & 9 deletions docs/code-examples/transform3d_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@

rr.init("rerun_example_transform3d", spawn=True)

origin = [0, 0, 0]
base_vector = [0, 1, 0]
rr2.log("base", rr2.Arrows3D([0, 1, 0]))

rr.log_arrow("base", origin=origin, vector=base_vector)

rr2.log("base/translated", rrd.TranslationRotationScale3D(translation=[1, 0, 0]))

rr.log_arrow("base/translated", origin=origin, vector=base_vector)
rr2.log("base/translated", rrd.TranslationAndMat3x3(translation=[1, 0, 0]))
rr2.log("base/translated", rr2.Arrows3D([0, 1, 0]))

rr2.log(
"base/rotated_scaled",
Expand All @@ -23,5 +19,4 @@
scale=2,
),
)

rr.log_arrow("base/rotated_scaled", origin=origin, vector=base_vector)
rr2.log("base/rotated_scaled", rr2.Arrows3D([0, 1, 0]))
4 changes: 2 additions & 2 deletions docs/code-examples/transform3d_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use rerun::{
archetypes::{Arrows3D, Transform3D},
datatypes::{
Angle, Mat3x3, RotationAxisAngle, Scale3D, TranslationAndMat3x3, TranslationRotationScale3D,
Angle, RotationAxisAngle, Scale3D, TranslationAndMat3x3, TranslationRotationScale3D,
},
RecordingStreamBuilder,
};
Expand All @@ -16,7 +16,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

rec.log(
"base/translated",
&Transform3D::new(TranslationAndMat3x3::new([1.0, 0.0, 0.0], Mat3x3::IDENTITY)),
&Transform3D::new(TranslationAndMat3x3::translation([1.0, 0.0, 0.0])),
)?;

rec.log("base/translated", &Arrows3D::new([(0.0, 1.0, 0.0)]))?;
Expand Down
13 changes: 4 additions & 9 deletions rerun_py/rerun_sdk/rerun/archetypes/transform3d.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 25843e7

Please sign in to comment.