1 #ifndef MODELING_ROBOT_H 2 #define MODELING_ROBOT_H 4 #include <KrisLibrary/robotics/RobotWithGeometry.h> 5 #include <KrisLibrary/utils/PropertyMap.h> 6 #include "ManagedGeometry.h" 28 enum Type { Weld, Normal, Spin, Floating, FloatingPlanar, BallAndSocket, Closed };
57 enum Type { Normal, Affine, Translation, Rotation, Custom };
59 int NumControls()
const;
61 bool Affects(
int link)
const;
64 vector<int> linkIndices;
69 vector<Real> affScaling;
70 vector<Real> affOffset;
71 Real servoP,servoI,servoD;
86 virtual std::string LinkName(
int i)
const;
87 int LinkIndex(
const char* name)
const;
88 bool Load(
const char* fn);
89 bool LoadRob(
const char* fn);
90 bool LoadURDF(
const char* fn);
91 bool Save(
const char* fn);
92 bool LoadGeometry(
int i,
const char* file);
93 void SetGeomFiles(
const char* geomPrefix=
"",
const char* geomExt=
"off");
94 void SetGeomFiles(
const vector<string>& geomFiles);
95 bool SaveGeometry(
const char* prefix=
"");
96 void InitStandardJoints();
97 bool CheckValid()
const;
99 void Mount(
int link,
const Geometry::AnyGeometry3D& geom,
const RigidTransform& T);
101 void Mount(
int link,
const RobotModel& subchain,
const RigidTransform& T,
const char* prefix=NULL);
103 void Merge(
const std::vector<RobotModel*>& robots);
109 void Reduce(
RobotModel& reducedRobot,vector<int>& dofMap);
111 bool DoesJointAffect(
int joint,
int dof)
const;
112 void GetJointIndices(
int joint,vector<int>& indices)
const;
114 void SetJointByTransform(
int joint,
int link,
const RigidTransform& T);
116 void SetJointByOrientation(
int joint,
int link,
const Matrix3& R);
118 void SetJointVelocityByMoment(
int joint,
int link,
const Vector3& w,
const Vector3& v);
121 bool IsPassiveDOF(
int dof)
const;
122 bool DoesDriverAffect(
int driver,
int dof)
const;
123 void GetDriverIndices(
int driver,vector<int>& indices)
const;
124 Vector2 GetDriverLimits(
int driver)
const;
125 Real GetDriverValue(
int driver)
const;
126 Real GetDriverVelocity(
int driver)
const;
127 void SetDriverValue(
int driver,Real value);
128 void SetDriverVelocity(
int driver,Real value);
130 void GetDriverJacobian(
int driver,Vector& J);
135 void ComputeLipschitzMatrix();
139 void ConfigureDriverConstraints(RobotIKFunction& f);
145 vector<RobotModelJoint> joints;
146 vector<RobotModelDriver> drivers;
147 vector<string> linkNames;
148 vector<string> driverNames;
static bool disableGeometryLoading
Definition: Robot.h:162
Type type
The type of this joint.
Definition: Robot.h:31
Determines the effects of an actuator on the robot configuration.
Definition: Robot.h:45
Vector3 localPt
For closed joints.
Definition: Robot.h:39
Type
Definition: Robot.h:57
vector< ManagedGeometry > geomManagers
geometry loaders (speeds up loading)
Definition: Robot.h:143
PropertyMap properties
Definition: Robot.h:155
Additional joint properties.
Definition: Robot.h:17
Type
Definition: Robot.h:28
Vector accMax
conservative acceleration limits, used by DynamicPath
Definition: Robot.h:144
int baseIndex
Definition: Robot.h:37
The main robot type used in RobotSim.
Definition: Robot.h:83
Matrix lipschitzMatrix
A matrix of lipschitz constants (see ComputeLipschitzMatrix)
Definition: Robot.h:158
int linkIndex
Definition: Robot.h:34
Definition: ContactDistance.h:6
vector< string > geomFiles
geometry file names (used in saving)
Definition: Robot.h:142