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

Missing pose when drawing camera lens #136

Open
ManuelZ opened this issue Sep 26, 2024 · 1 comment
Open

Missing pose when drawing camera lens #136

ManuelZ opened this issue Sep 26, 2024 · 1 comment
Assignees

Comments

@ManuelZ
Copy link

ManuelZ commented Sep 26, 2024

The following code shows cameras with parts of their lenses drawn on incorrect positions (using spatialmath 1.1.11):

import numpy as np
from machinevisiontoolbox.Camera import CentralCamera

R = np.eye(3)
for i in range(2):
    t = np.array([i, 1, 0])
    pose = SE3.Rt(R, t)
    CentralCamera.plot(pose=pose, scale=0.5)

image

I think the problem is here:

1216        handles = []
1217        handles.append(_render3D(ax, X, Y, Z, filled=filled, **kwargs))
1218        handles.append(
1219            _render3D(ax, X, (2 * centre[1] - Y), Z, filled=filled, pose=pose, **kwargs)
1220        )

There seems to be a missing pose=pose in line 1217. When I add that, I get correctly drawn lenses:

image

@jcao-bdai
Copy link
Collaborator

thank you for digging into this, @ManuelZ, we very much appreciated it!

the suggested fix has been tested and implemented in #138

thanks to your report we also fixed several similar bugs.

@jcao-bdai jcao-bdai self-assigned this Sep 27, 2024
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