Skip to content

Missing pose when drawing camera lens #136

Closed

Description

@ManuelZ

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

Activity

  1. jcao-bdai commented on Sep 27, 2024

    @jcao-bdai
    Contributor

    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.

  2. self-assigned this
    on Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions