Trajectory generation algorithm for safe human-robot collaboration based on multiple depth sensor measurements