Skip to content

Commit

Permalink
add horizontal aperture property to vision sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
cremebrule committed Sep 22, 2023
1 parent 54eadc7 commit accce04
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions omnigibson/sensors/vision_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,29 @@ def clipping_range(self, limits):
render()
self.visible = True

@property
def horizontal_aperture(self):
"""
Returns:
float: horizontal aperture of this sensor, in mm
"""
return self.get_attribute("horizontalAperture")

@horizontal_aperture.setter
def horizontal_aperture(self, length):
"""
Sets the focal length @length for this sensor
Args:
length (float): horizontal aperture of this sensor, in meters
"""
self.set_attribute("horizontalAperture", length)

@property
def focal_length(self):
"""
Returns:
float: focal length of this sensor, in meters
float: focal length of this sensor, in mm
"""
return self.get_attribute("focalLength")

Expand All @@ -363,7 +381,7 @@ def focal_length(self, length):
Sets the focal length @length for this sensor
Args:
length (float): focal length of this sensor, in meters
length (float): focal length of this sensor, in mm
"""
self.set_attribute("focalLength", length)

Expand Down

0 comments on commit accce04

Please sign in to comment.