def get_motion(obj_idx, frame_idx, motion_trajectory):
    """Returns the motion of a specified object at a specified frame."""
    motion = motion_trajectory[frame_idx]['objects'][obj_idx]
    return motion