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

optas.Visualize.sphere throwing TypeError in Python 3.12 #156

Open
hello-binit opened this issue Mar 30, 2024 · 1 comment
Open

optas.Visualize.sphere throwing TypeError in Python 3.12 #156

hello-binit opened this issue Mar 30, 2024 · 1 comment

Comments

@hello-binit
Copy link

Hello, thanks for creating this library! I ran into a bug trying to visualize a sphere in Python 3.12. I know 3.12 isn't listed as an supported platform (https://github.com/cmower/optas#support), but I thought this might be helpful if you're intending to support 3.12 in the future.

Steps to reproduce:

  1. Create a 3.12 environment (e.g. mamba create -n optas python=3.12)
  2. Copy the following into a script and run it:
from optas.visualize import Visualizer

vis = Visualizer(camera_position=[3, 3, 3])
vis.sphere(position=[0.0, 0.0, 0.0], radius=0.01, rgb=[1, 0, 0])
vis.grid_floor()
vis.start()

You'll see an exception like the following:

Traceback (most recent call last):
  File "/home/path/visualize_error.py", line 4, in <module>
    vis.sphere(position=[0.0, 0.0, 0.0], radius=0.01, rgb=[1, 0, 0])
  File "/home/path/miniforge3/envs/optas/lib/python3.12/site-packages/optas/spatialmath.py", line 68, in wrap
    return fun(*args_use, **kwargs_use)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/path/miniforge3/envs/optas/lib/python3.12/site-packages/optas/visualize.py", line 318, in sphere
    sphere.SetThetaResolution(theta_resolution)
TypeError: SetThetaResolution argument 1:
@cmower
Copy link
Owner

cmower commented Mar 31, 2024

Hi @hello-binit, thanks for your interest in optas and also pointing this out! 😄

Eventually, I and the other developers intend to provide support for recent python versions and also develop optas (new features, etc). However, currently, we do not have the bandwidth.

If you are able to fix this error and add the support for Python 3.12 (show that all test scripts go green) I would be happy to review a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants