ZhengyiLuo / UHC

Official Implementation of the Universal Humanoid Controller in Mujoco. Supports Kinpoly (NeurIPS 2021) and EmbodiedPose (NeurIPS 2022).
https://zhengyiluo.github.io/projects/embodied_pose/
Other
189 stars 19 forks source link

encounter a problem that the render results are not synchronize with the original video #10

Closed visonpon closed 1 year ago

visonpon commented 1 year ago

Hi @ZhengyiLuo ,I get my mocap data from rgb video and use trained model to test, but the render results seem dropped some frames and the motion cannot synchronize with the original video(usually move faster than the video). the motion pkl file has the same frames as video file, and are 30 fps,the rendered imitation and expert results are synchronize, but they all not synchronize with the video. it seems this caused by the mujoco render. Hope you can help, thanks~

ZhengyiLuo commented 1 year ago

Ahh right. If you render the model through a visualizer, your rendering fps will be dictated by the viewer, whose fps can fluctuate based on your computer scheduling. To render with the same framerate as the simulation/data, checkout the offscreen renderer. You can also use this function on the viewer:

self.env_vis.viewer.read_pixels(size[0], size[1], depth=False)[::-1, :, :], dtype=np.uint8,

at every rendering call.

visonpon commented 1 year ago

I see, thank you~