def load_checkpoint(simulator, root_directory, frame):
    bullet_path = os.path.join(root_directory, ('%d.bullet' % frame))
    json_path = os.path.join(root_directory, ('%d.json' % frame))
    restoreState(fileName=bullet_path)
    with open(json_path, 'r') as f:
        dump = json.load(f)
    load_internal_states(simulator, dump)
    for obj in simulator.scene.get_objects():
        if isinstance(obj, URDFObject):
            obj.force_wakeup()
def load_checkpoint(simulator, root_directory, frame):
    bullet_path = os.path.join(root_directory, ('%d.bullet' % frame))
    json_path = os.path.join(root_directory, ('%d.json' % frame))
    restoreState(fileName=bullet_path)
    with open(json_path, 'r') as f:
        dump = json.load(f)
    load_internal_states(simulator, dump)
    for obj in simulator.scene.get_objects():
        if isinstance(obj, URDFObject):
            obj.force_wakeup()