15 #ifndef OPENHRP_DYNAMICS_SIMULATOR_IMPL_H_INCLUDED 16 #define OPENHRP_DYNAMICS_SIMULATOR_IMPL_H_INCLUDED 20 #include <hrpCorba/ModelLoader.hh> 21 #include <hrpCorba/CollisionDetector.hh> 22 #include <hrpCorba/DynamicsSimulator.hh> 28 #include <boost/scoped_ptr.hpp> 36 virtual public PortableServer::RefCountServantBase
62 void _setupCharacterData();
63 void _updateCharacterPositions();
64 void _updateSensorStates();
66 void registerCollisionPair2CD
68 const std::string &,
const std::string &,
69 const std::string &,
const std::string &
81 virtual void registerCharacter(
const char *
name, BodyInfo_ptr binfo);
83 virtual void init(CORBA::Double timeStep,
84 OpenHRP::DynamicsSimulator::IntegrateMethod integrateOpt,
85 OpenHRP::DynamicsSimulator::SensorOption sensorOpt);
87 virtual void registerCollisionCheckPair
93 CORBA::Double staticFriction,
94 CORBA::Double slipFriction,
95 const DblSequence6& K,
96 const DblSequence6&
C,
97 const double culling_thresh,
98 const double restitution);
100 virtual void registerIntersectionCheckPair
106 const double tolerance);
108 virtual void registerExtraJoint
110 const char* charName1,
111 const char* linkName1,
112 const char* charName2,
113 const char* linkName2,
114 const DblSequence3& link1LocalPos,
115 const DblSequence3& link2LocalPos,
116 const ExtraJointType jointType,
117 const DblSequence3& jointAxis,
118 const char* extraJointName);
121 virtual void getExtraJointConstraintForce
123 const char* characterName,
124 const char* extraJointName,
125 DblSequence6_out contactForce);
127 virtual void getCharacterSensorValues
129 const char* characterName,
130 const char* sensorName,
131 DblSequence_out values);
133 virtual void initSimulation();
135 virtual void stepSimulation();
137 virtual void setCharacterLinkData
139 const char* characterName,
141 OpenHRP::DynamicsSimulator::LinkDataType
type,
142 const DblSequence&
data);
144 virtual void getCharacterLinkData
146 const char* characterName,
148 OpenHRP::DynamicsSimulator::LinkDataType
type,
149 DblSequence_out rdata);
151 virtual void getCharacterAllLinkData
153 const char* characterName,
154 OpenHRP::DynamicsSimulator::LinkDataType
type,
155 DblSequence_out wdata);
157 virtual void setCharacterAllLinkData
159 const char* characterName,
160 OpenHRP::DynamicsSimulator::LinkDataType
type,
161 const DblSequence& wdata);
163 virtual void setGVector(
const DblSequence3& wdata);
165 virtual void getGVector(DblSequence3_out wdata);
167 virtual void setCharacterAllJointModes
169 const char* characterName,
170 OpenHRP::DynamicsSimulator::JointDriveMode jointMode);
172 virtual CORBA::Boolean calcCharacterInverseKinematics
174 const char* characterName,
175 const char* baseLink,
176 const char* targetLink,
177 const LinkPosition& target);
179 virtual void calcCharacterForwardKinematics
181 const char* characterName);
183 virtual void calcWorldForwardKinematics();
185 virtual bool checkCollision(
bool checkAll);
187 virtual LinkPairSequence *checkIntersection(CORBA::Boolean checkAll);
189 virtual DistanceSequence *checkDistance();
193 virtual void getCharacterSensorState(
const char* characterName, SensorState_out sstate);
195 virtual CORBA::Boolean getCharacterCollidingPairs
197 const char* characterName,
198 LinkPairSequence_out pairs);
200 virtual void calcCharacterJacobian
202 const char* characterName,
203 const char* baseLink,
204 const char* targetLink,
205 DblSequence_out jacobian);
241 DynamicsSimulator_ptr
create();
png_infop png_charp png_int_32 png_int_32 int * type
bool needToUpdateSensorStates
png_infop png_charpp name
CollisionDetector_var collisionDetector
CharacterPositionSequence_var allCharacterPositions
hrp::World< hrp::ConstraintForceSolver > world
bool needToUpdatePositions
SensorStateSequence_var allCharacterSensorStates
void getWorldState(WorldState &state, WorldBase &world)
LinkPairSequence_var collidingLinkPairs
local int destroy(gz_stream *s)
CollisionSequence_var collisions
static BodyCustomizerHandle create(BodyHandle bodyHandle, const char *modelName)