in ws_setup.py [0:0]
def postProcess(self):
try:
log("Perform the build and bundles...")
log("Setp 1. simulation_ws install dependencies...")
os.chdir(os.path.abspath('./simulation_ws'))
result = subprocess.call("rosdep install --from-paths src --ignore-src -r -y".split())
if result == 0:
log(" =>OK")
else:
errlog("Setup failed!")
errlog("Reason: Failed to bundle the sample program!")
sys.exit(1)
log("Setp 2. simulation_ws build...")
result = subprocess.call("colcon build".split())
if result == 0:
log(" =>OK")
else:
errlog("Setup failed!")
errlog("Reason: Failed to build the sample program!")
sys.exit(1)
log("Setp 3. simulation_ws bundle...")
result = subprocess.call("colcon bundle".split())
if result == 0:
log(" =>OK")
else:
errlog("Setup failed!")
errlog("Reason: Failed to bundle the sample program!")
sys.exit(1)
log("Setp 4. robot_ws install dependencies...")
os.chdir(os.path.abspath('../robot_ws'))
result = subprocess.call("rosdep install --from-paths src --ignore-src -r -y".split())
if result == 0:
log(" =>OK")
else:
errlog("Setup failed!")
errlog("Reason: Failed to bundle the sample program!")
sys.exit(1)
log("Setp 5. robot_ws build...")
result = subprocess.call("colcon build".split())
if result == 0:
log(" =>OK")
else:
errlog("Setup failed!")
errlog("Reason: Failed to build the sample program!")
sys.exit(1)
log("Setp 6. robot_ws bundle...")
result = subprocess.call("colcon bundle".split())
if result == 0:
log(" =>OK")
else:
errlog("Setup failed!")
errlog("Reason: Failed to bundle the sample program!")
sys.exit(1)
except Exception as e:
errlog("Exception : %s" % str(e))
sys.exit(1)