Use rosdep2 API instead of calling subprocesses