Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transform3d_simple and reenable roundtrip test #3401

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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]))
teh-cmc marked this conversation as resolved.
Show resolved Hide resolved

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.