How to check from C++ code if moveit planning is successful?
I want to call a function from Moveit C++ to check if the the planner could plan to a pose, so that if the planning fails, I can call the Moveit pick function with another pose. What is the way to check from code if the planning has been successful or not?
I am looking for something similar
boolean plan=....here goes the function to check if the planning has been successful
if plan==true{
//Do nothing
}
else{
pick (with new pose)
}