Three types of Sensor are provided in Simulate:
( width: int = 256 height: int = 256 camera_type: str = 'perspective' znear: float = 0.3 yfov: typing.Union[float, numpy.ndarray, NoneType] = 60 aspect_ratio: typing.Optional[float] = None zfar: typing.Optional[float] = None xmag: typing.Optional[float] = None ymag: typing.Optional[float] = None name: typing.Optional[str] = None sensor_tag: str = 'CameraSensor' position: typing.Optional[typing.List[float]] = None rotation: typing.Optional[typing.List[float]] = None scaling: typing.Union[float, typing.List[float], NoneType] = None is_actor: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Optional[typing.List[ForwardRef('Asset')]] = None )
Parameters
int, optional, defaults to 256) —
The width of the Camera. Default: 256
int, optional, defaults to 256) —
The height of the Camera. Default: 256
str, optional, defaults to perspective) —
The type of camera. Can be one of:
[
“perspective”,
“orthographic”
]
float, optional, defaults to 0.3) —
The near clipping plane of the Camera.
float or np.ndarray, optional, defaults to 60) —
The vertical field of view of the Camera in degrees.
float, optional, defaults to None) —
The aspect ratio of the Camera if needed
float, optional, defaults to None) —
The far clipping plane of the Camera.
float, optional, defaults to None) —
The x magnification of the Camera.
float, optional, defaults to None) —
The y magnification of the Camera.
str, optional, defaults to None) —
The name of the Camera.
str, optional, defaults to CameraSensor) —
The tag of the Camera.
List[float], optional, defaults to [0.0, 0.0, 0.0]) —
The position of the Camera.
List[float], optional, defaults to [0.0, 0.0, 0.0]) —
The rotation of the Camera.
float or List[float], optional, defaults to 1.0) —
The scaling of the Camera.
bool, optional, defaults to False) —
Whether the Camera is an actor.
Asset, optional, defaults to None) —
The parent of the Camera.
List[Asset], optional, defaults to None) —
The children of the Camera.
A Camera asset. This Camera is located at the origin by default and has no rotation.
( with_children: bool = True **kwargs: typing.Any )
Make a copy of the Camera with copy of the children attached to the copy.
( target_entity: typing.Optional[typing.Any] = None reference_entity: typing.Optional[typing.Any] = None properties: typing.Union[str, typing.List[str], NoneType] = None sensor_tag: str = 'StateSensor' name: dataclasses.InitVar[typing.Optional[str]] = None position: dataclasses.InitVar[typing.Optional[typing.List[float]]] = <property object at 0x7fc6f7034e50> rotation: dataclasses.InitVar[typing.Optional[typing.List[float]]] = <property object at 0x7fc6f7034cc0> scaling: dataclasses.InitVar[typing.Union[float, typing.List[float], NoneType]] = <property object at 0x7fc6f7034d10> transformation_matrix: dataclasses.InitVar[typing.Optional[typing.List[float]]] = <property object at 0x7fc6f7034d60> parent: dataclasses.InitVar[typing.Optional[ForwardRef('Asset')]] = None children: dataclasses.InitVar[typing.Optional[typing.List[ForwardRef('Asset')]]] = None created_from_file: dataclasses.InitVar[typing.Optional[str]] = None )
Parameters
Asset or str, optional, defaults to None) —
Reference or name of the target Asset in the scene.
Asset or str, optional, defaults to None) —
Reference or name of the reference Asset in the scene.
If no reference is provided we use the world as a reference.
str or List[str], optional, defaults to ["distance"]) —
List of properties to extract from the sensor. Allowed properties are:
[
“position”, “position.x”, “position.y”, “position.z”,
“velocity”, “velocity.x”, “velocity.y”, “velocity.z”,
“rotation”, “rotation.x”, “rotation.y”, “rotation.z”,
“angular_velocity”, “angular_velocity.x”, “angular_velocity.y”, “angular_velocity.z”,
“distance”
]
str, optional, defaults to "StateSensor") —
Type of sensor. Allowed values are: “position”, “velocity”, “rotation”, “angular_velocity”, “distance”.
str, optional, defaults to None) —
Name of the sensor.
List[float], optional, defaults to [0, 0, 0]) —
Position of the sensor in the scene.
List[float], optional, defaults to [0, 0, 0]) —
Rotation of the sensor in the scene.
List[float], optional, defaults to [1, 1, 1]) —
Scaling of the sensor in the scene.
List[float], optional, defaults to None) —
Transformation matrix of the sensor in the scene.
Asset, optional, defaults to None) —
Parent of the sensor in the scene.
List[Asset], optional, defaults to None) —
Children of the sensor in the scene.
str, optional, defaults to None) —
The path to the file from which the sensor was created.
A State sensor: pointer to two assets whose positions/rotations are used to compute an observation
( n_horizontal_rays: int = 1 n_vertical_rays: int = 1 horizontal_fov: float = 0.0 vertical_fov: float = 0.0 ray_length: float = 100.0 sensor_tag: str = 'RaycastSensor' name: dataclasses.InitVar[typing.Optional[str]] = None position: dataclasses.InitVar[typing.Optional[typing.List[float]]] = <property object at 0x7fc6f7022590> rotation: dataclasses.InitVar[typing.Optional[typing.List[float]]] = <property object at 0x7fc6f7022860> scaling: dataclasses.InitVar[typing.Union[float, typing.List[float], NoneType]] = <property object at 0x7fc6f7022680> transformation_matrix: dataclasses.InitVar[typing.Optional[typing.List[float]]] = <property object at 0x7fc6f7022630> parent: dataclasses.InitVar[typing.Optional[ForwardRef('Asset')]] = None children: dataclasses.InitVar[typing.Optional[typing.List[ForwardRef('Asset')]]] = None created_from_file: dataclasses.InitVar[typing.Optional[str]] = None )
Parameters
int, optional, defaults to 1) —
The number of horizontal rays to cast.
int, optional, defaults to 1) —
The number of vertical rays to cast.
float, optional, defaults to 0.0) —
The horizontal field of view of the sensor.
float, optional, defaults to 0.0) —
The vertical field of view of the sensor.
float, optional, defaults to 100.0) —
The length of the ray to cast.
str, optional, defaults to "RaycastSensor") —
The tag of the sensor.
str, optional, defaults to None) —
The name of the sensor.
List[float], optional, defaults to None) —
The position of the sensor in the scene.
List[float], optional, defaults to None) —
The rotation of the sensor in the scene.
List[float], optional, defaults to None) —
The scaling of the sensor in the scene.
List[float], optional, defaults to None) —
The transformation matrix of the sensor in the scene.
Asset, optional, defaults to None) —
The parent of the sensor.
List[Asset], optional, defaults to None) —
The children of the sensor.
str, optional, defaults to None) —
The path to the file from which the sensor was created.
A Raycast sensor: cast a ray to get an observation.