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

Logging TranslationAndMat3x3 / TranslationRotationScale3D fails #3710

Closed
roym899 opened this issue Oct 5, 2023 · 3 comments · Fixed by #3727
Closed

Logging TranslationAndMat3x3 / TranslationRotationScale3D fails #3710

roym899 opened this issue Oct 5, 2023 · 3 comments · Fixed by #3727
Assignees
Labels
🪳 bug Something isn't working
Milestone

Comments

@roym899
Copy link
Collaborator

roym899 commented Oct 5, 2023

Describe the bug
Logging a TranslationAndMat3x3 fails with the following warning

<stdin>:1: RerunWarning: log: TypeError('TranslationAndMat3x3' object is not iterable)

Workaround is to just log a Transform3D which I guess is preferable any way.

To Reproduce

import rerun as rr
rr.init("translation", spawn=True)
rr.log("parent/child", rr.TranslationAndMat3x3(translation=[1,0,0]))

Rerun version

rerun_py 0.9.0 [rustc 1.72.1 (d5c2e9c34 2023-09-13), LLVM 16.0.5] x86_64-unknown-linux-gnu 4f56b02, built 2023-10-05T15:37:48Z
@roym899 roym899 added 🪳 bug Something isn't working 👀 needs triage This issue needs to be triaged by the Rerun team labels Oct 5, 2023
@roym899
Copy link
Collaborator Author

roym899 commented Oct 5, 2023

Same for rr.TranslationRotationScale3D

@roym899
Copy link
Collaborator Author

roym899 commented Oct 5, 2023

Upon reading this, I'm guessing this is not actually a bug, but it's not possible to log datatypes directly.

If that's right, maybe the error message could be improved?

@roym899 roym899 changed the title TranslationAndMat3x3 object is not iterable Logging TranslationAndMat3x3 / TranslationRotationScale3D fails Oct 5, 2023
@jleibs jleibs removed the 👀 needs triage This issue needs to be triaged by the Rerun team label Oct 5, 2023
@jleibs jleibs added this to the 0.9.1 milestone Oct 5, 2023
@jleibs
Copy link
Member

jleibs commented Oct 5, 2023

Agreed -- we can definitely make that warning better.

@jleibs jleibs self-assigned this Oct 6, 2023
emilk pushed a commit that referenced this issue Oct 7, 2023
### What
- Resolves: #3710

Before:
```
transform3d_simple.py:11: RerunWarning: log: TypeError('TranslationAndMat3x3' object is not iterable)
  rr.log("base/translated", rr.TranslationAndMat3x3(translation=[1, 0, 0]))
```

After:
```
transform3d_simple.py:11: RerunWarning: log: TypeError(Expected an object implementing rerun.AsComponents or an iterable of rerun.ComponentBatchLike, but got <class 'rerun.datatypes.translation_and_mat3x3.TranslationAndMat3x3'> instead.)
  rr.log("base/translated", rr.TranslationAndMat3x3(translation=[1, 0, 0]))
```

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3727) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/3727)
- [Docs
preview](https://rerun.io/preview/379b347a96593ecf6a7efc5bf7b98d3e248e5489/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/379b347a96593ecf6a7efc5bf7b98d3e248e5489/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants