trouble with isExpired()
I can not figure out how to use isExpired
function from actionlib
. The first line is what the documentation tells me to use. spotted is my action name and marker is the package its located in. The second line is what I think is right, but I can't get it to compile (with spottedAction
, spottedActionGoal
, spottedGoal
).
actionlib::ClientGoalHandle<ActionSpec>::isExpired()
actionlib::ClientGoalHandle<marker::spotted.....>::isExpired()
Thanks :)
when using actionlib::ClientGoalHandle<marker::spottedAction>::isExpired()
Errors << control:make /home/ros-industrial/ros_ws/logs/control/build.make.009.log /home/ros-industrial/ros_ws/src/nov_ros/control/src/nodes/seq_node.cpp: In function ‘int main(int, char)’: /home/ros-industrial/ros_ws/src/nov_ros/control/src/nodes/seq_node.cpp:206:91: error: cannot call member function ‘bool actionlib::ClientGoalHandle<actionspec>::isExpired() const [with ActionSpec = marker::spottedAction_<std::allocator<void> >]’ without object if (actionlib::ClientGoalHandle<marker::spottedaction>::isExpired()) { ^ make[2]: [CMakeFiles/seq_node.dir/src/nodes/seq_node.cpp.o] Error 1 make[1]: [CMakeFiles/seq_node.dir/all] Error 2 make: * [all] Error 2
Asked by Abigail on 2019-08-16 08:57:00 UTC
Comments
Can you please update your question with the errors that you're getting (using the preformatted text (
101010
) button)Asked by jayess on 2019-08-16 10:56:17 UTC
I figured out the 101010 button too late. when i use spottedAction, i get "
cannot call member function 'bool actionlib::ClientGoalHandle<actionspec>::isExpired() const' without object
when i use spottedActionGoal, i get
required from here
no type named '_action_goal_type' in 'struct marker::spottedActionGoal_<std::allocator<void> >'
and a whole bunch of other "no type name...".
when I use spottedGoal, i get the basically same thing as using spottedActionGoal
Asked by Abigail on 2019-08-16 11:13:00 UTC
Can you please post with full error?
Asked by jayess on 2019-08-16 12:45:29 UTC
when using
actionlib::ClientGoalHandle<marker::spottedAction>::isExpired()
Errors << control:make /home/ros-industrial/ros_ws/logs/control/build.make.009.log /home/ros-industrial/ros_ws/src/nov_ros/control/src/nodes/seq_node.cpp: In function ‘int main(int, char*)’: /home/ros-industrial/ros_ws/src/nov_ros/control/src/nodes/seq_node.cpp:206:91: error: cannot call member function ‘bool actionlib::ClientGoalHandle::isExpired() const [with ActionSpec = marker::spottedAction_std::allocator<void >]’ without object
if (actionlib::ClientGoalHandlemarker::spottedAction::isExpired()) {
^
make[2]: * * [CMakeFiles/seq_node.dir/src/nodes/seq_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/seq_node.dir/all] Error 2
make: *** [all] Error 2
Asked by Abigail on 2019-08-16 12:52:58 UTC
Please don't use comments to give more information, please update your question instead
Asked by jayess on 2019-08-16 13:27:03 UTC
The problem is you're trying to call the method as if it was a static method without an object instance. You need to call this on an actual instance of
actionlib::ClientGoalHandle
Asked by PeteBlackerThe3rd on 2019-08-17 08:04:00 UTC