demo: add 'execute' parameter

useful for testing parameters
This commit is contained in:
v4hn 2019-10-08 23:35:11 +00:00 committed by Robert Haschke
parent 232ef5e03e
commit 6764b2a9ca

View File

@ -119,11 +119,17 @@ int main(int argc, char** argv) {
pick_place_task.init();
if (pick_place_task.plan()) {
ROS_INFO_NAMED(LOGNAME, "Planning succeded");
pick_place_task.execute();
if (pnh.param("execute", false)) {
pick_place_task.execute();
} else {
ROS_INFO_NAMED(LOGNAME, "Execution disabled");
}
} else {
ROS_INFO_NAMED(LOGNAME, "Planning failed");
}
ROS_INFO_NAMED(LOGNAME, "Execution complete");
// Keep introspection alive
ros::waitForShutdown();
return 0;