-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Description
Help needed about simulation status
Description: If I keep the inputs the same, and run the following function multiple times, I will get different results occasionally. Is it normal? From my understanding, the state of the engine is (pos, vel, acc, forces), right? Do I miss some variables containing the simulation information?
MyState forward(WorldPtr & _world, const MyState & start, const Eigen::VectorXd & torque)
{
MyState end;
_world->reset();
auto biped = _world->getSkeleton("biped");
biped->setPositions(start.qpos);
biped->setVelocities(start.qvel);
biped->setAccelerations(start.qacc);
biped->setForces(torque);
int numStep = static_cast<int>(round(1.0f / (_world->getTimeStep() * samplePerSecond)));
for(int i = 0; i < numStep; i++)
{
_world->step();
}
end.qpos = biped->getPositions();
end.qvel = biped->getVelocities();
end.qacc = biped->getAccelerations();
return end;
}
Metadata
Metadata
Assignees
Labels
No labels