handle degenerate cases in ExtractOpenRAVETrajectoryFromProfiles