10 #ifndef ODE_DYNAMICS_SIMULATOR_IMPL_H_INCLUDED 11 #define ODE_DYNAMICS_SIMULATOR_IMPL_H_INCLUDED 15 #include <hrpCorba/ModelLoader.hh> 16 #include <hrpCorba/CollisionDetector.hh> 17 #include <hrpCorba/DynamicsSimulator.hh> 23 #include <boost/scoped_ptr.hpp> 34 virtual public PortableServer::RefCountServantBase
60 void _setupCharacterData();
61 void _updateCharacterPositions();
62 void _updateSensorStates();
64 void registerCollisionPair2CD
66 const std::string &,
const std::string &,
67 const std::string &,
const std::string &
79 virtual void registerCharacter(
const char *
name, BodyInfo_ptr binfo);
81 virtual void init(CORBA::Double timeStep,
82 OpenHRP::DynamicsSimulator::IntegrateMethod integrateOpt,
83 OpenHRP::DynamicsSimulator::SensorOption sensorOpt);
85 virtual void registerCollisionCheckPair
91 CORBA::Double staticFriction,
92 CORBA::Double slipFriction,
93 const DblSequence6& K,
94 const DblSequence6&
C,
95 const double culling_thresh,
96 const double restitution);
98 virtual void registerIntersectionCheckPair
104 const double tolerance);
106 virtual void registerExtraJoint
108 const char* charName1,
109 const char* linkName1,
110 const char* charName2,
111 const char* linkName2,
112 const DblSequence3& link1LocalPos,
113 const DblSequence3& link2LocalPos,
114 const ExtraJointType jointType,
115 const DblSequence3& jointAxis,
116 const char* extraJointName);
119 virtual void getExtraJointConstraintForce
121 const char* characterName,
122 const char* extraJointName,
123 DblSequence6_out contactForce);
125 virtual void getCharacterSensorValues
127 const char* characterName,
128 const char* sensorName,
129 DblSequence_out values);
131 virtual void initSimulation();
133 virtual void stepSimulation();
135 virtual void setCharacterLinkData
137 const char* characterName,
139 OpenHRP::DynamicsSimulator::LinkDataType
type,
140 const DblSequence&
data);
142 virtual void getCharacterLinkData
144 const char* characterName,
146 OpenHRP::DynamicsSimulator::LinkDataType
type,
147 DblSequence_out rdata);
149 virtual void getCharacterAllLinkData
151 const char* characterName,
152 OpenHRP::DynamicsSimulator::LinkDataType
type,
153 DblSequence_out wdata);
155 virtual void setCharacterAllLinkData
157 const char* characterName,
158 OpenHRP::DynamicsSimulator::LinkDataType
type,
159 const DblSequence& wdata);
161 virtual void setGVector(
const DblSequence3& wdata);
163 virtual void getGVector(DblSequence3_out wdata);
165 virtual void setCharacterAllJointModes
167 const char* characterName,
168 OpenHRP::DynamicsSimulator::JointDriveMode jointMode);
170 virtual CORBA::Boolean calcCharacterInverseKinematics
172 const char* characterName,
173 const char* baseLink,
174 const char* targetLink,
175 const LinkPosition& target);
177 virtual void calcCharacterForwardKinematics
179 const char* characterName);
181 virtual void calcWorldForwardKinematics();
183 virtual bool checkCollision(
bool checkAll);
185 virtual LinkPairSequence *checkIntersection(CORBA::Boolean checkAll);
187 virtual DistanceSequence *checkDistance();
191 virtual void getCharacterSensorState(
const char* characterName, SensorState_out sstate);
193 virtual CORBA::Boolean getCharacterCollidingPairs
195 const char* characterName,
196 LinkPairSequence_out pairs);
198 virtual void calcCharacterJacobian
200 const char* characterName,
201 const char* baseLink,
202 const char* targetLink,
203 DblSequence_out jacobian);
239 DynamicsSimulator_ptr
create();
SensorStateSequence_var allCharacterSensorStates
png_infop png_charp png_int_32 png_int_32 int * type
png_infop png_charpp name
CharacterPositionSequence_var allCharacterPositions
void getWorldState(WorldState &state, WorldBase &world)
bool needToUpdatePositions
CollisionSequence_var collisions
CollisionDetector_var collisionDetector
local int destroy(gz_stream *s)
static BodyCustomizerHandle create(BodyHandle bodyHandle, const char *modelName)
LinkPairSequence_var collidingLinkPairs
bool needToUpdateSensorStates