9 #ifndef CscRobotModel_h
10 #define CscRobotModel_h
24 #define ENTITY_MODEL_ID_CARE "49"
25 #define ENTITY_MODEL_ID_BERING "46"
26 #define ENTITY_MODEL_ID_BERING_1B "51"
27 #define ENTITY_MODEL_ID_DJIMAVIC3 "60"
28 #define ENTITY_MODEL_ID_UBIK "58"
29 #define ENTITY_MODEL_ID_UBIKMAX "65"
45 float rightMovementCoef = 1.0;
46 float leftMovementCoef = 1.0;
47 float backMovementCoef = 1.0;
57 vector<const CscMemberJoint *> *joints;
58 vector<const CscMember *> *members;
59 vector<const CscPropeller *> *propellers;
60 vector<const CscMemberWheel *> *wheels;
61 vector<const CscTranslation *> *translations;
62 vector<const CscEntityLidar *> *lidars;
66 const map<string, float> maxHeightByMemberName;
67 const float defaultYPositionCm;
68 const CscPoint3d *
const defaultRotationPitchYawRoll;
70 const string entityType;
73 bool entityHasLeftAndRightSides;
75 bool computeHasLeftAndRightSides();
78 inline static const string MEMBER_CORE =
"Conscience_Member_Core";
79 inline static const int MEMBER_CORE_ID = 0;
80 inline static const string MEMBER_HEAD =
"Conscience_Member_Head";
81 inline static const string MEMBER_LENSE =
"Conscience_Member_Lense";
82 inline static const string MEMBER_LIDAR =
"Conscience_Lidar";
83 inline static const string MEMBER_FOOT_LEFT =
"Conscience_Member_FootLeft";
84 inline static const string MEMBER_FOOT_RIGHT =
"Conscience_Member_FootRight";
85 inline static const string MEMBER_PREFIX =
"Conscience_Member_";
94 const string &modelId,
98 vector<const CscMember *> *membersIn,
99 vector<const CscMemberJoint *> *jointsIn,
100 vector<const CscPropeller *> *propellersIn,
101 vector<const CscMemberWheel *> *wheelsIn,
102 vector<const CscTranslation *> *translationsIn,
104 vector<const CscEntityLidar *> *lidarsIn,
106 float defaultYPositionCm,
107 const CscPoint3d *defaultRotationPitchYawRoll,
108 const map<string, float> &maxHeightByMemberNameIn,
114 virtual const string &getId()
const;
116 string getEntityType()
const;
117 string getName()
const;
119 string getOwner()
const;
125 CscSize3d getCoreMemberDimensions()
const;
127 const vector<const CscMember *> *getMembers()
const;
129 const vector<const CscMemberJoint *> *getPivots()
const;
130 const vector<const CscTranslation *> *getTranslations()
const;
131 const vector<const CscPropeller *> *getPropellers()
const;
132 const vector<const CscMemberWheel *> *getWheels()
const;
133 const vector<const CscEntityLidar *> *getLidars()
const;
140 optional<int> getPivotIdByTag(
string searchTag)
const;
142 virtual int countMembers()
const;
143 virtual int countPivots()
const;
144 virtual int countTranslations()
const;
145 virtual int countPropellers()
const;
146 virtual int countWheels()
const;
147 virtual int countLidars()
const;
148 float getHeightMaxByMember(
const string &memberName)
const;
150 bool hasLeftAndRightSides()
const;
153 const CscMember *getMemberById(
int memberId)
const;
154 const CscMember *getMemberByName(
const string &memberName)
const;
159 const int getMemberIndexByName(
const string &memberName)
const;
162 bool isWheelFlagged(
int wheelId,
string flag)
const;
163 bool isPropellerFlagged(
int propellerId,
string flag)
const;
164 bool hasLense()
const;
173 const map<int, float> maxDeltaPercentPivotByPivotId(
float maxPivotDeltaInDegree)
const;
175 float getDefaultYPositionCm()
const;
180 const CscPoint3d *getDefaultRotationPitchYawRoll()
const;