Go to the documentation of this file.
6 #ifndef CNOID_BODYPLUGIN_AIST_SIMULATOR_ITEM_H
7 #define CNOID_BODYPLUGIN_AIST_SIMULATOR_ITEM_H
10 #include <cnoid/Collision>
11 #include "exportdecl.h"
15 class ContactMaterial;
27 enum DynamicsMode { FORWARD_DYNAMICS = 0, KINEMATICS, N_DYNAMICS_MODES };
30 void setDynamicsMode(
int mode);
31 void setIntegrationMode(
int mode);
32 void setGravity(
const Vector3& gravity);
34 void setFrictionCoefficientRange(
double minFriction,
double maxFriction);
35 double minFrictionCoefficient()
const;
36 double maxFrictionCoefficient()
const;
37 void setContactCullingDistance(
double value);
38 void setContactCullingDepth(
double value);
39 void setErrorCriterion(
double value);
40 void setMaxNumIterations(
int value);
41 void setContactCorrectionDepth(
double value);
42 void setContactCorrectionVelocityRatio(
double value);
43 void setEpsilon(
double epsilon);
44 void set2Dmode(
bool on);
45 void setKinematicWalkingEnabled(
bool on);
47 [[deprecated(
"This function does nothing. Set Link::LinkContactState to Link::sensingMode from a controller.")]]
48 void setConstraintForceOutputEnabled(
bool on);
51 void clearExtraJoints();
53 virtual Vector3 getGravity()
const override;
55 virtual bool isForcedPositionActiveFor(
BodyItem* bodyItem)
const override;
56 virtual void clearForcedPositions()
override;
58 typedef std::function<bool(
Link* link1,
Link* link2,
62 void registerCollisionHandler(
const std::string& name,
CollisionHandler handler);
63 bool unregisterCollisionHandler(
const std::string& name);
66 void setFriction(
Link* link1,
Link* link2,
double staticFriction,
double dynamicFriction);
70 virtual bool initializeSimulation(
const std::vector<SimulationBody*>& simBodies)
override;
71 virtual bool completeInitializationOfSimulation()
override;
72 virtual bool stepSimulation(
const std::vector<SimulationBody*>& activeSimBodies)
override;
73 virtual void finalizeSimulation()
override;
74 virtual std::shared_ptr<CollisionLinkPairList> getCollisions()
override;
76 virtual Item* doDuplicate()
const override;
78 virtual bool store(
Archive& archive)
override;
79 virtual bool restore(
const Archive& archive)
override;
std::vector< Collision > CollisionArray
Definition: Collision.h:27
std::function< bool(Link *link1, Link *link2, const CollisionArray &collisions, ContactMaterial *contactMaterial)> CollisionHandler
Definition: AISTSimulatorItem.h:60
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
ref_ptr< AISTSimulatorItem > AISTSimulatorItemPtr
Definition: AISTSimulatorItem.h:86
Definition: ExtensionManager.h:23
Definition: PutPropertyFunction.h:51
Eigen::Isometry3d Isometry3
Definition: EigenTypes.h:73
Definition: Referenced.h:103
Definition: BodyItem.h:28
Definition: SimulatorItem.h:29
IntegrationMode
Definition: AISTSimulatorItem.h:28
Definition: AbstractSceneLoader.h:11
Definition: CloneMap.h:13
Definition: AISTSimulatorItem.h:18
@ RUNGE_KUTTA_INTEGRATION
Definition: AISTSimulatorItem.h:28
DynamicsMode
Definition: AISTSimulatorItem.h:27
Definition: SimulatorItem.h:81