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

Revision history [back]

click to hide/show revision 1
initial version

Have a look at the api. The first function passed into sendGoal is the doneCB and only gets executed when the action server sends a result message. You'll need to use all the arguments instead of relying on the defaults. Something like

ac.sendGoal(goal, &doneCb, &activeCb, &feedbackCb);

Have a look at the api. The first function passed into sendGoal is the doneCB and only gets executed when the action server sends a result message. You'll need to use all the arguments instead of relying on the defaults. Something like

ac.sendGoal(goal, &doneCb, &activeCb, &feedbackCb);

EDIT: here's the code you said you used.

ac.sendGoal(goal,boost::bind(&Pose_Goal::doneCb, this, _1, _2), Client::SimpleActiveCallback(),Client::SimpleFeedbackCallback());

void Pose_Goal::feedbackCb(const move_base_msgs::MoveBaseFeedbackConstPtr &feedback){ 
    ROS_INFO("[X]:%f [Y]:%f [W]: %f",feedback->base_position.pose.position.x,feedback->base_position.pose.position.y,feedback->base_position.pose.orientation.w); 
}

You need to pass your feedback function to sendGoal. Client::SimpleFeedbackCallback() is the default, do-nothing feedback callback. Put a reference or boost pointer to your Pose_Goal::feedbackCb instead.