Conscience Core
Public Member Functions | Static Public Attributes | List of all members
CscEntityModel Class Reference

#include <CscEntityModel.h>

Public Member Functions

 CscEntityModel (const string &modelId, string entityType, string name, string robotOwner, vector< const CscMember * > *membersIn, vector< const CscMemberJoint * > *jointsIn, vector< const CscPropeller * > *propellersIn, vector< const CscMemberWheel * > *wheelsIn, vector< const CscTranslation * > *translationsIn, vector< const CscEntityLidar * > *lidarsIn, float defaultYPositionCm, const CscPoint3d *defaultRotationPitchYawRoll, const map< string, float > &maxHeightByMemberNameIn, const CscEntityVision *visionIn, const RobotModelGlobalCoefs &globalCoefs)
 
virtual ~CscEntityModel ()
 
virtual const string & getId () const
 
string getEntityType () const
 
string getName () const
 
FieldOfView getLenseFieldOfView () const
 
string getOwner () const
 
CscArea3d getBoundingBox () const
 
CscSize3d getCoreMemberDimensions () const
 
const vector< const CscMember * > * getMembers () const
 
const vector< const CscMemberJoint * > * getPivots () const
 
const vector< const CscTranslation * > * getTranslations () const
 
const vector< const CscPropeller * > * getPropellers () const
 
const vector< const CscMemberWheel * > * getWheels () const
 
const vector< const CscEntityLidar * > * getLidars () const
 
const CscMemberJointgetPivotById (int id) const
 
const CscTranslationgetTranslationById (int id) const
 
const CscPropellergetPropellerById (int id) const
 
const CscMemberWheelgetWheelById (int id) const
 
optional< int > getPivotIdByTag (string searchTag) const
 
virtual int countMembers () const
 
virtual int countPivots () const
 
virtual int countTranslations () const
 
virtual int countPropellers () const
 
virtual int countWheels () const
 
virtual int countLidars () const
 
float getHeightMaxByMember (const string &memberName) const
 
const RobotModelGlobalCoefsgetGlobalCoefs () const
 
bool hasLeftAndRightSides () const
 
CscEntityModelclone () const
 
const CscMembergetMemberById (int memberId) const
 
const CscMembergetMemberByName (const string &memberName) const
 
const int getMemberIndexByName (const string &memberName) const
 
const CscEntityVisiongetVision () const
 
bool isWheelFlagged (int wheelId, string flag) const
 
bool isPropellerFlagged (int propellerId, string flag) const
 
bool hasLense () const
 
const map< int, float > maxDeltaPercentPivotByPivotId (float maxPivotDeltaInDegree) const
 
float getDefaultYPositionCm () const
 
const CscPoint3dgetDefaultRotationPitchYawRoll () const
 

Static Public Attributes

static const string MEMBER_CORE = "Conscience_Member_Core"
 
static const int MEMBER_CORE_ID = 0
 
static const string MEMBER_HEAD = "Conscience_Member_Head"
 
static const string MEMBER_LENSE = "Conscience_Member_Lense"
 
static const string MEMBER_LIDAR = "Conscience_Lidar"
 
static const string MEMBER_FOOT_LEFT = "Conscience_Member_FootLeft"
 
static const string MEMBER_FOOT_RIGHT = "Conscience_Member_FootRight"
 
static const string MEMBER_PREFIX = "Conscience_Member_"
 
static const CscPoint3dINITIAL_EULER = new CscPoint3d(0, 0, -M_PI_2)
 
static const CscQuaternion INITIAL_QUATERNION = CscQuaternion::fromAngleAxis(-M_PI_2, AXIS_3D_X)
 

Constructor & Destructor Documentation

◆ CscEntityModel()

CscEntityModel::CscEntityModel ( const string &  modelId,
string  entityType,
string  name,
string  robotOwner,
vector< const CscMember * > *  membersIn,
vector< const CscMemberJoint * > *  jointsIn,
vector< const CscPropeller * > *  propellersIn,
vector< const CscMemberWheel * > *  wheelsIn,
vector< const CscTranslation * > *  translationsIn,
vector< const CscEntityLidar * > *  lidarsIn,
float  defaultYPositionCm,
const CscPoint3d defaultRotationPitchYawRoll,
const map< string, float > &  maxHeightByMemberNameIn,
const CscEntityVision visionIn,
const RobotModelGlobalCoefs globalCoefs 
)
Parameters
defaultRotationPitchYawRollangles in radians

◆ ~CscEntityModel()

CscEntityModel::~CscEntityModel ( )
virtual

Member Function Documentation

◆ clone()

CscEntityModel * CscEntityModel::clone ( ) const

◆ countLidars()

int CscEntityModel::countLidars ( ) const
virtual

◆ countMembers()

int CscEntityModel::countMembers ( ) const
virtual

◆ countPivots()

int CscEntityModel::countPivots ( ) const
virtual

◆ countPropellers()

int CscEntityModel::countPropellers ( ) const
virtual

◆ countTranslations()

int CscEntityModel::countTranslations ( ) const
virtual

◆ countWheels()

int CscEntityModel::countWheels ( ) const
virtual

◆ getBoundingBox()

CscArea3d CscEntityModel::getBoundingBox ( ) const

◆ getCoreMemberDimensions()

CscSize3d CscEntityModel::getCoreMemberDimensions ( ) const
Returns
Dimensions of CORE member, which could be assimilated as this entity's bounding box. In the Conscience ref frame: depth=sizeX,heigth=sizeY,width=sizeZ
See also
CscMember::CscMember implementation and how models are loaded

◆ getDefaultRotationPitchYawRoll()

const CscPoint3d * CscEntityModel::getDefaultRotationPitchYawRoll ( ) const
Returns
rotation with angles in radians

◆ getDefaultYPositionCm()

float CscEntityModel::getDefaultYPositionCm ( ) const

◆ getEntityType()

string CscEntityModel::getEntityType ( ) const

◆ getGlobalCoefs()

const RobotModelGlobalCoefs & CscEntityModel::getGlobalCoefs ( ) const

◆ getHeightMaxByMember()

float CscEntityModel::getHeightMaxByMember ( const string &  memberName) const

◆ getId()

const string & CscEntityModel::getId ( ) const
virtual

◆ getLenseFieldOfView()

FieldOfView CscEntityModel::getLenseFieldOfView ( ) const

◆ getLidars()

const vector< const CscEntityLidar * > * CscEntityModel::getLidars ( ) const

◆ getMemberById()

const CscMember * CscEntityModel::getMemberById ( int  memberId) const

◆ getMemberByName()

const CscMember * CscEntityModel::getMemberByName ( const string &  memberName) const

◆ getMemberIndexByName()

const int CscEntityModel::getMemberIndexByName ( const string &  memberName) const
Returns
-1 if member not found

◆ getMembers()

const vector< const CscMember * > * CscEntityModel::getMembers ( ) const

◆ getName()

string CscEntityModel::getName ( ) const

◆ getOwner()

string CscEntityModel::getOwner ( ) const

◆ getPivotById()

const CscMemberJoint * CscEntityModel::getPivotById ( int  id) const

◆ getPivotIdByTag()

optional< int > CscEntityModel::getPivotIdByTag ( string  searchTag) const

◆ getPivots()

const vector< const CscMemberJoint * > * CscEntityModel::getPivots ( ) const

◆ getPropellerById()

const CscPropeller * CscEntityModel::getPropellerById ( int  id) const

◆ getPropellers()

const vector< const CscPropeller * > * CscEntityModel::getPropellers ( ) const

◆ getTranslationById()

const CscTranslation * CscEntityModel::getTranslationById ( int  id) const

◆ getTranslations()

const vector< const CscTranslation * > * CscEntityModel::getTranslations ( ) const

◆ getVision()

const CscEntityVision * CscEntityModel::getVision ( ) const

◆ getWheelById()

const CscMemberWheel * CscEntityModel::getWheelById ( int  id) const

◆ getWheels()

const vector< const CscMemberWheel * > * CscEntityModel::getWheels ( ) const

◆ hasLeftAndRightSides()

bool CscEntityModel::hasLeftAndRightSides ( ) const

◆ hasLense()

bool CscEntityModel::hasLense ( ) const

◆ isPropellerFlagged()

bool CscEntityModel::isPropellerFlagged ( int  propellerId,
string  flag 
) const

◆ isWheelFlagged()

bool CscEntityModel::isWheelFlagged ( int  wheelId,
string  flag 
) const

◆ maxDeltaPercentPivotByPivotId()

const map< int, float > CscEntityModel::maxDeltaPercentPivotByPivotId ( float  maxPivotDeltaInDegree) const

Calculates the maximum pivot angle change, in percent, for each pivot in the entity.

Parameters
maxPivotDeltaInDegreeThe maximum pivot angle change, in degrees.
Returns
A map of pivot IDs to their respective maximum pivot angle change, in percent.

Member Data Documentation

◆ INITIAL_EULER

const CscPoint3d* CscEntityModel::INITIAL_EULER = new CscPoint3d(0, 0, -M_PI_2)
inlinestatic

◆ INITIAL_QUATERNION

const CscQuaternion CscEntityModel::INITIAL_QUATERNION = CscQuaternion::fromAngleAxis(-M_PI_2, AXIS_3D_X)
inlinestatic

◆ MEMBER_CORE

const string CscEntityModel::MEMBER_CORE = "Conscience_Member_Core"
inlinestatic

◆ MEMBER_CORE_ID

const int CscEntityModel::MEMBER_CORE_ID = 0
inlinestatic

◆ MEMBER_FOOT_LEFT

const string CscEntityModel::MEMBER_FOOT_LEFT = "Conscience_Member_FootLeft"
inlinestatic

◆ MEMBER_FOOT_RIGHT

const string CscEntityModel::MEMBER_FOOT_RIGHT = "Conscience_Member_FootRight"
inlinestatic

◆ MEMBER_HEAD

const string CscEntityModel::MEMBER_HEAD = "Conscience_Member_Head"
inlinestatic

◆ MEMBER_LENSE

const string CscEntityModel::MEMBER_LENSE = "Conscience_Member_Lense"
inlinestatic

◆ MEMBER_LIDAR

const string CscEntityModel::MEMBER_LIDAR = "Conscience_Lidar"
inlinestatic

◆ MEMBER_PREFIX

const string CscEntityModel::MEMBER_PREFIX = "Conscience_Member_"
inlinestatic

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