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

ModelCamera ignores x and y components of its pose #60

Open
sloretz opened this issue Apr 25, 2016 · 4 comments
Open

ModelCamera ignores x and y components of its pose #60

sloretz opened this issue Apr 25, 2016 · 4 comments

Comments

@sloretz
Copy link

sloretz commented Apr 25, 2016

In Stage-4.1.1 the camera model does not take into account the x and y parts of it's pose. Camera images appear to come from the perspective of the middle of the ModelPosition the camera is on. They should instead be coming from the center of the ModelCamera itself.

The camera below should not be able to see the robot body, but it does.
stage_camera_bug

Here's a stage world that reproduces the issue

interval_sim 50
quit_time 0
resolution 0.02
show_clock 0
show_clock_interval 100
threads 2

window
(
    size [ 600.0 700.0 ]
    center [ 0.0 0.0 ]
    rotate [ 0.0 0.0 ]
    scale 60
)

define o3d3o3 camera
(
    size [ 0.09 0.06 0.06 ]
    color "gray20"
    range [ 0.2 8.0 ]
    resolution [ 176 132 ]
    fov [ 60 40 ]
    pantilt [ 0 65 ]
    alwayson 1
)

define robot_body position
(
    #position properties
    drive "omni"
    localization "gps"
    localization_origin [0 0 0 0]
    watchdog_timeout 0.5

    # Model properties
    size [0.5 0.5 0.5]
    origin [0 0 0 0]
    velocity [0 0 0 0]
    gui_nose 1
    gui_grid 1
    gui_boundary 1
    obstacle_return 1
    ranger_return 1
    color "red"

    o3d3o3
    (
        pose [0.5 0 1.0 0]
    )
)

robot_body
(
    pose [0 0 0 -90]
)

@AravindaDP
Copy link

I think following line is where the problem occurs.
https://github.com/rtv/Stage/blob/master/libstage/model_camera.cc#L204
If we can agree to use model pose instead parent pose I think it could be resolved.

@AravindaDP
Copy link

@rtv Any insight on this?

@doisyg
Copy link
Contributor

doisyg commented Dec 26, 2019

I observe the same issue

@doisyg doisyg mentioned this issue Dec 26, 2019
@doisyg
Copy link
Contributor

doisyg commented Dec 26, 2019

If we can agree to use model pose instead parent pose I think it could be resolved.

That's indeed the solution, see #97

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

3 participants