esp::metadata::attributes::AbstractVisualSensorAttributes class

Class to suppoort creating visual sensors by providing common attributes.

Base classes

class AbstractSensorAttributes
Attributes object holding the descriptions of a Sensor object.

Derived classes

class AbstractCubeMapSensorAttributes
class CameraSensorAttributes
Class to suppoort creating camera sensors.

Constructors, destructors, conversion operators

AbstractVisualSensorAttributes(const std::string& classKey, const std::string& handle)

Public functions

void populateWithSensorSpec(const sensor::SensorSpec::ptr& spec) override
Populate this AbstractVisualSensorAttributes from an appropriate sensor::SensorSpec.
void setResolution(const Mn::Vector2i& resolution)
Set the resolution (Height, Width) of the Visual Sensor built from this attributes.
auto getResolution() const -> Mn::Vector2i
Get the resolution (Height, Width) of the Visual Sensor built from this attributes.
void setChannels(int channels)
Set the number of channels for the Visual Sensor built from this attributes.
auto getChannels() const -> int
get the number of channels for the Visual Sensor built from this attributes.
void setGPUToGPUTransfer(bool transfer)
Set whether to enable gpu-to-gpu transfer for the sensor built from this attributes.
auto getGPUToGPUTransfer() const -> bool
get whether to enable gpu-to-gpu transfer for the sensor built from this attributes.
void setNearPlane(float near_plane)
Set the near plane distance for visual sensors built from this attributes.
auto getNearPlane() const -> float
Get the near plane distance for visual sensors built from this attributes.
void setFarPlane(float far_plane)
Set the far plane distance for visual sensors built from this attributes.
auto getFarPlane() const -> float
Get the far plane distance for visual sensors built from this attributes.
void setClearColor(const Mn::Color4& clear_color)
Set the clear color to use for the visual sensor built from this attributes.
auto getClearColor() const -> Mn::Color4
Get the clear color to use for the visual sensor built from this attributes.
void setSemanticSensorTarget(const std::string& semantic_target)
Set the SemanticSensorTarget to use for a Semantic Sensor built from this attributes.
void setSemanticSensorTargetEnum(sensor::SemanticSensorTarget semanticTargetEnum)
Set the SemanticSensorTarget to use for a Semantic Sensor built from this attributes using the given sensor::SemanticSensorTarget enum value.
auto getSemanticSensorTarget() const -> sensor::SemanticSensorTarget
Get the SemanticSensorTarget to use for a Semantic Sensor built from this attributes.

Protected functions

void writeValuesToJsonInternal(io::JsonGenericValue& jsonObj, io::JsonAllocator& allocator) const override
Write Visual Sensor-specific values to json object.
void writeVisualSensorValuesToJsonInternal(io::JsonGenericValue& jsonObj, io::JsonAllocator& allocator) const virtual
auto getAbstractSensorInfoHeaderInternal() const -> std::string override
get AbstractSensorAttributes-specific info header
auto getAbstractSensorInfoInternal() const -> std::string override
get AbstractSensorAttributes specific info for csv string
auto getAbstractVisualSensorInfoHeaderInternal() const -> std::string virtual
get AbstractVisualSensorAttributes-specific info header
auto getAbstractVisualSensorInfoInternal() const -> std::string virtual
get AbstractSensorAttributes specific info for csv string