GibsonEnv
GibsonEnv copied to clipboard
Frameskip doesn't work as expected with Minitaur
When adjusting frameskip for minitaur, any settings besides timestep: 0.001 and frameskip: 1 leads to erratic minitaur leg behavior when running examples/demo/controller_minitaur_nonviz.py.
Is this potentially due to a zero order hold on robot action?
In gibson/env/env_modalities.py, we have:
def _step(self, a):
self.nframe += 1
if not self.scene.multiplayer:
self.robot.apply_action(a)
self.scene.global_step()
rendering stuff here...
In gibson/core/physics/scene_abstract.py, we set:
p.setPhysicsEngineParameter(fixedTimeStep=self.timestep*self.frame_skip, numSolverIterations=50, numSubSteps=(self.frame_skip-1))
It seems like this will continue to command the robot action for the total time between frame renderings. Should p.stepSimulation() instead be called in a loop for frame_skip iterations to allow changing robot actions (such as from a low-level controller)?