$darkmode
cloe::frustum_culling_plugin::ObjectFrustumCulling Class Reference

This class rotates objects to the coordinate system of a different sensor. More...

Inheritance diagram for cloe::frustum_culling_plugin::ObjectFrustumCulling:
Collaboration diagram for cloe::frustum_culling_plugin::ObjectFrustumCulling:

Public Member Functions

 ObjectFrustumCulling (const std::string &name, const FrustumCullingConf &conf, std::shared_ptr< ObjectSensor > obs)
 
const Objectssensed_objects () const override
 
const Frustumfrustum () const override
 
const Eigen::Isometry3d & mount_pose () const override
 
Duration process (const Sync &sync) override
 
void reset () override
 
void abort () override
 
void enroll (Registrar &r) override
 
- Public Member Functions inherited from cloe::ObjectSensor
fable::Json active_state () const override
 
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
- Public Member Functions inherited from cloe::Component
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
uint64_t id () const
 
template<typename T >
T * as ()
 
Duration process (const Sync &sync) override
 
void reset () override
 
void abort () override
 
- Public Member Functions inherited from cloe::Model
virtual ~Model () noexcept=default
 
virtual Duration resolution () const
 
virtual bool is_connected () const
 
virtual bool is_operational () const
 
virtual void connect ()
 
virtual void disconnect ()
 
virtual void start (const Sync &)
 
virtual void pause (const Sync &)
 
virtual void resume (const Sync &)
 
virtual void stop (const Sync &)
 
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
- Public Member Functions inherited from cloe::Entity
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
const std::string & name () const
 
void set_name (std::string name)
 
const std::string & description () const
 
void set_description (std::string desc)
 

Protected Member Functions

std::shared_ptr< Objectapply_frustum_culling (const std::shared_ptr< Object > &o) const
 
void clear_cache ()
 
- Protected Member Functions inherited from cloe::Entity
virtual Logger logger () const
 

Additional Inherited Members

- Protected Attributes inherited from cloe::Model
bool connected_ {false}
 
bool operational_ {false}
 
- Protected Attributes inherited from cloe::Entity
std::string name_
 
std::string desc_
 

Detailed Description

This class rotates objects to the coordinate system of a different sensor.

An object given in coordinate system c1 is converted to an object in coordinate system c2 via the configured reference frame in the configuration. The reference frame configuration expects the values from c1 to c2, e.g. if c2 is rotated by 90 degrees in mathematic positive direction from c1, the yaw should be set to +90 degree (in radians) Analoguely, if the origin of c2 is translated 5 m in positive x direction from c1, the configuration should be set to +5 m. The class considers first the translation in the original coordinate system (c1) and then the rotation.

Member Function Documentation

◆ abort()

void cloe::frustum_culling_plugin::ObjectFrustumCulling::abort ( )
inlineoverridevirtual

Signal an abort to model processing.

This method is called asynchronously. It is highly recommended to make use of a std::atomic_bool for purposes of making the abortion request known to other parts of the model. This method is called when the user requests the simulation to be aborted, e.g., by sending the SIGINT signal.

An abort will be followed by a stop if the simulation was started.

The default implementation will throw an error. This will be caught and possibly ignored. Otherwise, the simulation will be killed.

See also
cloe/core/abort.hpp

Reimplemented from cloe::Model.

Here is the call graph for this function:

◆ enroll()

void cloe::frustum_culling_plugin::ObjectFrustumCulling::enroll ( Registrar )
inlineoverridevirtual

Register any events, actions, or handlers with the registrar.

  • This may exhibit different behavior when called in a disconnected state, in order to provide the possibility for verification of triggers in offline mode.
  • It may throw an exception.

Reimplemented from cloe::Model.

Here is the call graph for this function:

◆ frustum()

const Frustum& cloe::frustum_culling_plugin::ObjectFrustumCulling::frustum ( ) const
inlineoverridevirtual

Return the frustum of the object sensor.

Implements cloe::ObjectSensor.

◆ mount_pose()

const Eigen::Isometry3d& cloe::frustum_culling_plugin::ObjectFrustumCulling::mount_pose ( ) const
inlineoverridevirtual

Return the mounting position of the object sensor.

Implements cloe::ObjectSensor.

◆ process()

Duration cloe::frustum_culling_plugin::ObjectFrustumCulling::process ( const Sync sync)
inlineoverridevirtual

Process the underlying sensor and clear the cache.

We could process and create the filtered list of objects now, but we can also delay it (lazy computation) and only do it when absolutely necessary. This comes at the minor cost of checking whether cached_ is true every time sensed_objects() is called.

Implements cloe::Model.

Here is the call graph for this function:

◆ reset()

void cloe::frustum_culling_plugin::ObjectFrustumCulling::reset ( )
inlineoverridevirtual

Reset the model state.

This is called when Cloe is asked to reset the whole simulation to time 0. This can be the case when the simulator or a controller asks us to recover from a temporary problem without repeating the whole simulation setup.

The default implementation will raise an error. So if your model is not able to re-initialize, the simulation will be aborted.

Reimplemented from cloe::Model.

Here is the call graph for this function:

◆ sensed_objects()

const Objects& cloe::frustum_culling_plugin::ObjectFrustumCulling::sensed_objects ( ) const
inlineoverridevirtual

Return the sensed world objects, whether dynamic or static. "World" in this case means the environment. These may be fused or from an individual sensor.

  • The returned pointer is invalid after ClearCache is called.
  • The ObjectSensor that returns the pointer manages the memory.
  • The returned objects have the origin of center-rear axle.

Implements cloe::ObjectSensor.


The documentation for this class was generated from the following file: