Choreonoid  1.8
Public Types | Public Member Functions | Protected Member Functions | List of all members
cnoid::RangeSensor Class Reference

#include <RangeSensor.h>

Inheritance diagram for cnoid::RangeSensor:
cnoid::Device cnoid::DeviceState cnoid::ClonableReferenced cnoid::Referenced

Public Types

typedef std::vector< double > RangeData
 

Public Member Functions

 RangeSensor ()
 
 RangeSensor (const RangeSensor &org, bool copyStateOnly=false)
 
virtual const char * typeName () const override
 
void copyStateFrom (const RangeSensor &other)
 
virtual void copyStateFrom (const DeviceState &other) override
 
virtual DeviceStatecloneState () const override
 
virtual void forEachActualType (std::function< bool(const std::type_info &type)> func) override
 
virtual void clearState () override
 
virtual bool on () const override
 
virtual void on (bool on) override
 
double yawRange () const
 
void setYawRange (double theta)
 
double yawStep () const
 
void setYawStep (double s)
 
int numYawSamples () const
 
double pitchRange () const
 
void setPitchRange (double theta)
 
double pitchStep () const
 
void setPitchStep (double s)
 
int numPitchSamples () const
 
double maxDistance () const
 
void setMaxDistance (double d)
 
double minDistance () const
 
void setMinDistance (double d)
 
double scanRate () const
 
void setScanRate (double r)
 
double frameRate () const
 
void setFrameRate (double r)
 
void setRangeDataStateClonable (bool on)
 
bool isRangeDataStateClonable () const
 
const RangeDatarangeData () const
 
const RangeDataconstRangeData () const
 
RangeDatarangeData ()
 
RangeDatanewRangeData ()
 
std::shared_ptr< RangeDatasharedRangeData () const
 
void setRangeData (std::shared_ptr< RangeData > &rangeData)
 
void clearRangeData ()
 
double delay () const
 
void setDelay (double time)
 
virtual int stateSize () const override
 
virtual const double * readState (const double *buf) override
 
virtual double * writeState (double *out_buf) const override
 
bool readSpecifications (const Mapping *info)
 
bool writeSpecifications (Mapping *info) const
 
- Public Member Functions inherited from cnoid::Device
virtual ~Device ()
 
Deviceclone () const
 
Deviceclone (CloneMap &cloneMap) const
 
virtual bool copyFrom (const Device *other)
 
void setIndex (int index)
 
void setId (int id)
 
void setName (const std::string &name)
 
void setLink (Link *link)
 
bool hasStateOnly () const
 
int index () const
 
int id () const
 
const std::string & name () const
 
const Linklink () const
 
Linklink ()
 
const Bodybody () const
 
Bodybody ()
 
Isometry3T_local ()
 
const Isometry3T_local () const
 
const Isometry3localPosition () const
 
template<class Scalar , int Mode, int Options>
void setLocalPosition (const Eigen::Transform< Scalar, 3, Mode, Options > &T)
 
Isometry3::ConstLinearPart R_local () const
 
Isometry3::LinearPart R_local ()
 
Isometry3::ConstLinearPart localRotation () const
 
template<typename Derived >
void setLocalRotation (const Eigen::MatrixBase< Derived > &R)
 
Isometry3::ConstTranslationPart p_local () const
 
Isometry3::TranslationPart p_local ()
 
Isometry3::ConstTranslationPart localTranslation () const
 
template<typename Derived >
void setLocalTranslation (const Eigen::MatrixBase< Derived > &p)
 
SignalProxy< void()> sigStateChanged ()
 
void notifyStateChange ()
 
SignalProxy< void(double time)> sigTimeChanged ()
 
void notifyTimeChange (double time)
 
const Isometry3T_local_org () const
 
void setLocalAttitude (const Isometry3 &Ta)
 
double cycle () const
 
void setCycle (double msec)
 
- Public Member Functions inherited from cnoid::DeviceState
virtual ~DeviceState ()
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Protected Member Functions

virtual ReferenceddoClone (CloneMap *cloneMap) const override
 
- Protected Member Functions inherited from cnoid::Device
 Device ()
 
 Device (const Device &org, bool copyStateOnly=false)
 
void copySpecFrom (const Device *other)
 
- Protected Member Functions inherited from cnoid::DeviceState
 DeviceState ()
 
 DeviceState (const DeviceState &)
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Member Typedef Documentation

◆ RangeData

typedef std::vector<double> cnoid::RangeSensor::RangeData

Constructor & Destructor Documentation

◆ RangeSensor() [1/2]

RangeSensor::RangeSensor ( )

◆ RangeSensor() [2/2]

RangeSensor::RangeSensor ( const RangeSensor org,
bool  copyStateOnly = false 
)

Member Function Documentation

◆ clearRangeData()

void RangeSensor::clearRangeData ( )

◆ clearState()

void RangeSensor::clearState ( )
overridevirtual

Reimplemented from cnoid::Device.

◆ cloneState()

DeviceState * RangeSensor::cloneState ( ) const
overridevirtual

Implements cnoid::DeviceState.

◆ constRangeData()

const RangeData& cnoid::RangeSensor::constRangeData ( ) const
inline

◆ copyStateFrom() [1/2]

void RangeSensor::copyStateFrom ( const DeviceState other)
overridevirtual

Implements cnoid::DeviceState.

◆ copyStateFrom() [2/2]

void RangeSensor::copyStateFrom ( const RangeSensor other)

◆ delay()

double cnoid::RangeSensor::delay ( ) const
inline

Time [s] consumed in the measurement

◆ doClone()

Referenced * RangeSensor::doClone ( CloneMap cloneMap) const
overrideprotectedvirtual

◆ forEachActualType()

void RangeSensor::forEachActualType ( std::function< bool(const std::type_info &type)>  func)
overridevirtual

Reimplemented from cnoid::Device.

◆ frameRate()

double cnoid::RangeSensor::frameRate ( ) const
inline

◆ isRangeDataStateClonable()

bool cnoid::RangeSensor::isRangeDataStateClonable ( ) const
inline

◆ maxDistance()

double cnoid::RangeSensor::maxDistance ( ) const
inline

◆ minDistance()

double cnoid::RangeSensor::minDistance ( ) const
inline

◆ newRangeData()

RangeSensor::RangeData & RangeSensor::newRangeData ( )

◆ numPitchSamples()

int RangeSensor::numPitchSamples ( ) const

◆ numYawSamples()

int RangeSensor::numYawSamples ( ) const

◆ on() [1/2]

bool RangeSensor::on ( ) const
overridevirtual

Reimplemented from cnoid::Device.

◆ on() [2/2]

void RangeSensor::on ( bool  on)
overridevirtual

Reimplemented from cnoid::Device.

◆ pitchRange()

double cnoid::RangeSensor::pitchRange ( ) const
inline

◆ pitchStep()

double cnoid::RangeSensor::pitchStep ( ) const
inline

◆ rangeData() [1/2]

RangeData& cnoid::RangeSensor::rangeData ( )

◆ rangeData() [2/2]

RangeSensor::RangeData & RangeSensor::rangeData ( ) const
inline
Note
You must check if the range data is not empty before accessing the data

◆ readSpecifications()

bool RangeSensor::readSpecifications ( const Mapping info)

◆ readState()

const double * RangeSensor::readState ( const double *  buf)
overridevirtual
Returns
The position in the buf after reading. The value is used when the super class's readState is called by the inherited class.

Implements cnoid::DeviceState.

◆ scanRate()

double cnoid::RangeSensor::scanRate ( ) const
inline

◆ setDelay()

void cnoid::RangeSensor::setDelay ( double  time)
inline

◆ setFrameRate()

void cnoid::RangeSensor::setFrameRate ( double  r)
inline

◆ setMaxDistance()

void cnoid::RangeSensor::setMaxDistance ( double  d)
inline

◆ setMinDistance()

void cnoid::RangeSensor::setMinDistance ( double  d)
inline

◆ setPitchRange()

void cnoid::RangeSensor::setPitchRange ( double  theta)
inline

◆ setPitchStep()

void cnoid::RangeSensor::setPitchStep ( double  s)
inline

◆ setRangeData()

void RangeSensor::setRangeData ( std::shared_ptr< RangeData > &  rangeData)

Move semantics. If the use_count() of the given shared range data pointer is one, the data is moved to the Camera object and the ownership of the given pointer is released. Otherwise, the data is copied.

◆ setRangeDataStateClonable()

void cnoid::RangeSensor::setRangeDataStateClonable ( bool  on)
inline

◆ setScanRate()

void cnoid::RangeSensor::setScanRate ( double  r)
inline

◆ setYawRange()

void cnoid::RangeSensor::setYawRange ( double  theta)
inline

◆ setYawStep()

void cnoid::RangeSensor::setYawStep ( double  s)
inline

◆ sharedRangeData()

std::shared_ptr<RangeData> cnoid::RangeSensor::sharedRangeData ( ) const
inline

◆ stateSize()

int RangeSensor::stateSize ( ) const
overridevirtual

Size of the double-precision floating numbers for representing the state.

Implements cnoid::DeviceState.

◆ typeName()

const char * RangeSensor::typeName ( ) const
overridevirtual

Implements cnoid::DeviceState.

◆ writeSpecifications()

bool RangeSensor::writeSpecifications ( Mapping info) const

◆ writeState()

double * RangeSensor::writeState ( double *  out_buf) const
overridevirtual
Returns
The position in the buf after reading. The value is used when the super class's readState is called by the inherited class.

Implements cnoid::DeviceState.

◆ yawRange()

double cnoid::RangeSensor::yawRange ( ) const
inline

◆ yawStep()

double cnoid::RangeSensor::yawStep ( ) const
inline

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