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

Camera visual fov doesn't match horizontal_fov value of the sensor. #3306

Open
InigoMoreno opened this issue Mar 17, 2023 · 0 comments · May be fixed by #3307
Open

Camera visual fov doesn't match horizontal_fov value of the sensor. #3306

InigoMoreno opened this issue Mar 17, 2023 · 0 comments · May be fixed by #3307
Labels
bug Something isn't working

Comments

@InigoMoreno
Copy link

Environment

  • OS Version: Ubuntu 20.04
  • Source or binary build?
    Binary noetic

Description

  • Expected behavior: Have a the frustum change when the horizontal_fov is changed
  • Actual behavior: Always set to same angle.

Steps to reproduce

Click to see world file
<?xml version="1.0"?>
<sdf version="1.5">
  <world name="default">
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <model name="camera">
      <pose>0 0.5 0.05 0 0 0</pose>
      <link name="link">
        <inertial>
          <mass>0.1</mass>
          <inertia>
            <ixx>0.000166667</ixx>
            <iyy>0.000166667</iyy>
            <izz>0.000166667</izz>
          </inertia>
        </inertial>
        <collision name="collision">
          <geometry>
            <box>
              <size>0.1 0.1 0.1</size>
            </box>
          </geometry>
        </collision>
        <visual name="visual">
          <geometry>
            <box>
              <size>0.1 0.1 0.1</size>
            </box>
          </geometry>
        </visual>
        <sensor name="camera" type="camera">
          <camera>
            <horizontal_fov>1.047</horizontal_fov>
            <image>
              <width>320</width>
              <height>240</height>
            </image>
            <clip>
              <near>0.1</near>
              <far>100</far>
            </clip>
          </camera>
          <always_on>1</always_on>
          <update_rate>30</update_rate>
          <visualize>true</visualize>
        </sensor>
      </link>
    </model>
    <model name="camera2">
      <pose>1.0 0.5 1.0 0.0 0.0 0.0</pose>
      <link name="link2">
        <inertial>
          <mass>0.1</mass>
          <inertia>
            <ixx>0.000166667</ixx>
            <iyy>0.000166667</iyy>
            <izz>0.000166667</izz>
          </inertia>
        </inertial>
        <collision name="collision2">
          <geometry>
            <box>
              <size>0.1 0.1 0.1</size>
            </box>
          </geometry>
        </collision>
        <visual name="visual2">
          <geometry>
            <box>
              <size>0.1 0.1 0.1</size>
            </box>
          </geometry>
        </visual>
        <sensor name="camera2" type="camera">
          <camera>
            <horizontal_fov>2.047</horizontal_fov>
            <image>
              <width>320</width>
              <height>240</height>
            </image>
            <clip>
              <near>0.1</near>
              <far>100</far>
            </clip>
          </camera>
          <always_on>1</always_on>
          <update_rate>30</update_rate>
          <visualize>true</visualize>
        </sensor>
      </link>
    </model>
  </world>
</sdf>

Output

Both cameras have same visual FOV despite one having the double than the other,
image

@InigoMoreno InigoMoreno added the bug Something isn't working label Mar 17, 2023
@InigoMoreno InigoMoreno linked a pull request Mar 17, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant