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

log_rigid3 does not support pytorch Tensor objects #1583

Closed
Tracked by #1753
roym899 opened this issue Mar 14, 2023 · 0 comments
Closed
Tracked by #1753

log_rigid3 does not support pytorch Tensor objects #1583

roym899 opened this issue Mar 14, 2023 · 0 comments
Assignees
Labels
🪳 bug Something isn't working 🐍 Python API Python logging API

Comments

@roym899
Copy link
Collaborator

roym899 commented Mar 14, 2023

Describe the bug
It seems like log_rigid3 does not support tensor objects.

WARNING:root:Ignoring rerun log call: Traceback (most recent call last):
  File "/home/leo/.pyenv/versions/rerun_playground/lib/python3.8/site-packages/rerun_sdk/rerun/log/log_decorator.py", line 35, in wrapper
    return func(*args, **kwargs)
  File "/home/leo/.pyenv/versions/rerun_playground/lib/python3.8/site-packages/rerun_sdk/rerun/log/transform.py", line 157, in log_rigid3
    bindings.log_rigid3(
TypeError: argument 'translation': 'Tensor' object cannot be converted to 'Sequence'

To Reproduce

import torch
import numpy as np
import rerun as rr

translation = torch.from_numpy(np.array([0,0,0]))
rotation = torch.from_numpy(np.array([0,0,0,1]))
rr.log_rigid3("camera", parent_from_child=(translation, rotation))

Same code works fine without the torch.from_numpy(...).

Expected behavior
Ideally it would work, or the docs should represent the fact that different types are expected from other functions that support PyTorch tensors (like log_tensor or log_line_segments). Currently all of these are annotated as npt.ArrayLike.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Additional context

  • Python 3.8, rerun-sdk 0.3.1, numpy 1.23.0, torch 1.13.1
@roym899 roym899 added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Mar 14, 2023
@nikolausWest nikolausWest added 🐍 Python API Python logging API and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Mar 14, 2023
@emilk emilk changed the title log_rigid3 does not support Tensor objects log_rigid3 does not support pytorch Tensor objects Apr 3, 2023
@jleibs jleibs self-assigned this Apr 4, 2023
@jleibs jleibs closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🐍 Python API Python logging API
Projects
None yet
Development

No branches or pull requests

3 participants