ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

What should work is the following:

DetectionResultConstPtr result = ac.getResult();

A little bit of background:

With

actionlib::SimpleActionClient<manipulator::DetectionAction>::ResultConstPtr

you are trying to access a private typedef declared in actionlib/action_defintion.h and actionlib/action_client.h. Also, getResult already returns a ResultConstPtr, so adding *(ac....) will not work as well.

As the action definitions are templated, and you want to get the result (which has nothing to do with the client itself), DetectionResultConstPtr is the way to go here.