Computetask pull request
Previously: the ComputeTask service set the field "result" in the service response to 1 if the path planning and smoothing were successful. However, according to the srv definition, the constants should be defined as follows:
int32 RESULT_OK=0 int32 RESULT_PATH_PLANNER_SERVICE_FAILED=1 int32 RESULT_PATH_PLANNER_FAILED=2 int32 RESULT_PATH_PLANNER_REPOSITIONING_FAILED=3 int32 RESULT_POLYGONCONSTRAINT_SERVICE_FAILED=4 int32 RESULT_SMOOTHING_SERVICE_FAILED=5 int32 RESULT_SMOOTHING_FAILED=6
I looked into the orunav_vehicle_execution_node.cpp code and found that it only ever res.result to either 0 or 1, never the other values, and that 0 means failure and 1 means success. I also think that positive error codes for failure states could be dangerous if you use C-style condition checking (anything >0 is true), so I have modified the srv to include only:
int32 RESULT_OK = 1 int32 RESULT_FAIL = 0
I have not changed the code anywhere, so if someone uses the int value directly the change should not affect them.