本文整理汇总了C++中actionlib::SimpleClientGoalState类的典型用法代码示例。如果您正苦于以下问题:C++ SimpleClientGoalState类的具体用法?C++ SimpleClientGoalState怎么用?C++ SimpleClientGoalState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SimpleClientGoalState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ControlDoneCB
void ControlDoneCB(const actionlib::SimpleClientGoalState& state, const oea_controller::controlPlatformResultConstPtr &result)
{
controlling_ = false;
ROS_DEBUG_STREAM_NAMED(logger_name_, "Control Action finished: " << state.toString());
move_result_.result_state = result->result_state;
move_result_.error_string = result->error_string;
if (move_result_.result_state)
{
as_.setSucceeded(move_result_);
ROS_INFO_NAMED(logger_name_, "Goal was successful :)");
}
else
{
ROS_WARN_NAMED(logger_name_, "Goal was NOT successful :)");
// if is preempted => as_ was already set, cannot set again
if (state.toString() != "PREEMPTED")
{
as_.setAborted(move_result_);
ROS_DEBUG_NAMED(logger_name_, "Goal was Aborted");
}
else
{
if (set_terminal_state_)
{
as_.setPreempted(move_result_);
ROS_DEBUG_NAMED(logger_name_, "Goal was Preempted");
}
}
}
}
示例2: doneCb
void FaceClient::doneCb(const actionlib::SimpleClientGoalState& state,
const face_recognition::FaceRecognitionResultConstPtr& result)
{
ROS_INFO("Goal [%i] Finished in state [%s]", result->order_id,state.toString().c_str());
if(state.toString() != "SUCCEEDED") return;
if( result->order_id==0)
ROS_INFO("%s was recognized with confidence %f", result->names[0].c_str(),result->confidence[0]);
}
示例3: doneCb
void doneCb(const actionlib::SimpleClientGoalState& state, const asctec_hl_comm::WaypointResultConstPtr & result)
{
if (state.state_ == actionlib::SimpleClientGoalState::SUCCEEDED)
ROS_INFO("Finished in state [%s]", state.toString().c_str());
else
ROS_WARN("Finished in state [%s]", state.toString().c_str());
const geometry_msgs::Point32 & wp = result->result_pos;
ROS_INFO("Reached waypoint: %fm %fm %fm %f°",wp.x, wp.y, wp.z, result->result_yaw*180/M_PI);
}
示例4: done2Cb
// Called once when the goal completes
void done2Cb(const actionlib::SimpleClientGoalState& state,
const bbauv_msgs::ControllerResultConstPtr& result)
{
ROS_INFO("Finished in state [%s]", state.toString().c_str());
//ROS_INFO("Answer: %i", result->sequence.back());
ros::shutdown();
}
示例5: navigatorDoneCb
void navigatorDoneCb(const actionlib::SimpleClientGoalState& state,
const navigator::navigatorResultConstPtr& result) {
ROS_INFO(" navigatorDoneCb: server responded with state [%s]", state.toString().c_str());
g_navigator_rtn_code=result->return_code;
ROS_INFO("got object code response = %d; ",g_navigator_rtn_code);
if (g_navigator_rtn_code==navigator::navigatorResult::DESTINATION_CODE_UNRECOGNIZED) {
ROS_WARN("destination code not recognized");
}
else if (g_navigator_rtn_code==navigator::navigatorResult::DESIRED_POSE_ACHIEVED) {
ROS_INFO("reached desired location!");
}
else {
ROS_WARN("desired pose not reached!");
}
}
示例6: doneCb
void doneCb(const actionlib::SimpleClientGoalState& state,
const FibonacciResultConstPtr& result)
{
ROS_INFO("Finished in state [%s]", state.toString().c_str());
ROS_INFO("Answer: %i", result->sequence.back());
ros::shutdown();
}
示例7: doneCb
void doneCb(const actionlib::SimpleClientGoalState& state,
const watermellon::wm_navigation_alResultConstPtr& result)
{
ROS_INFO("Finished in state [%s]", state.toString().c_str());
ROS_INFO("Answer: %s", result->finished? "True": "False");
ros::shutdown();
}
示例8: rightArmDoneCb
void rightArmDoneCb(const actionlib::SimpleClientGoalState& state,
const control_msgs::FollowJointTrajectoryResultConstPtr& result) {
ROS_INFO(" rtArmDoneCb: server responded with state [%s]", state.toString().c_str());
g_done_move = true;
//ROS_INFO("got return val = %d", result->return_val);
g_done_count++;
}
示例9: doneCb_
// This function will be called once when the goal completes
void ArmMotionCommander::doneCb_(const actionlib::SimpleClientGoalState& state,
const cwru_action::cwru_baxter_cart_moveResultConstPtr& result)
{
ROS_INFO(" doneCb: server responded with state [%s]", state.toString().c_str());
ROS_INFO("got return value= %d", result->return_code);
cart_result_=*result;
}
示例10: doneCb
void doneCb(const actionlib::SimpleClientGoalState& state,
const coordinator::ManipTaskResultConstPtr& result) {
ROS_INFO(" doneCb: server responded with state [%s]", state.toString().c_str());
g_goal_done = true;
g_result = *result;
g_callback_status = result->manip_return_code;
switch (g_callback_status) {
case coordinator::ManipTaskResult::MANIP_SUCCESS:
ROS_INFO("returned MANIP_SUCCESS");
break;
case coordinator::ManipTaskResult::FAILED_PERCEPTION:
ROS_WARN("returned FAILED_PERCEPTION");
g_object_finder_return_code = result->object_finder_return_code;
break;
case coordinator::ManipTaskResult::FAILED_PICKUP:
ROS_WARN("returned FAILED_PICKUP");
g_object_grabber_return_code= result->object_grabber_return_code;
g_object_pose = result->object_pose;
//g_des_flange_pose_stamped_wrt_torso = result->des_flange_pose_stamped_wrt_torso;
break;
case coordinator::ManipTaskResult::FAILED_DROPOFF:
ROS_WARN("returned FAILED_DROPOFF");
//g_des_flange_pose_stamped_wrt_torso = result->des_flange_pose_stamped_wrt_torso;
break;
}
}
示例11: doneCb
// This function will be called once when the goal completes
// this is optional, but it is a convenient way to get access to the "result" message sent by the server
void doneCb(const actionlib::SimpleClientGoalState& state,
const example_action_server::demoResultConstPtr& result) {
ROS_INFO(" doneCb: server responded with state [%s]", state.toString().c_str());
ROS_INFO("got result output = %d",result->output);
g_result_output= result->output;
g_goal_active=false;
}
示例12: doneCb
void doneCb(const actionlib::SimpleClientGoalState& status,
const kobuki_msgs::AutoDockingResultConstPtr& result)
{
ROS_INFO("Finished in state [%s]", status.toString().c_str());
ROS_INFO("Answer: %s", result->text.c_str());
//ros::shutdown();
}
示例13: doneCb
// Called once when the goal completes
virtual void doneCb(const actionlib::SimpleClientGoalState& state, const typename Result::ConstPtr& result)
{
if (state == actionlib::SimpleClientGoalState::SUCCEEDED)
{
ROS_ERROR("Finished in state [%s]", state.toString().c_str());
publishEventString("/PRIMITIVE_FINISHED");
}
}
示例14: doneCb
// Called once when the goal completes
void FaceDetectionClient::doneCb(const actionlib::SimpleClientGoalState &state,
const face_detection::identifyResultConstPtr &result)
{
ROS_INFO("Finished in state [%s]", state.toString().c_str());
user = result->users_identified;
xPos = result->x;
yPos = result->y;
goalCompleted = true;
ros::shutdown();
}
示例15: doneCb
void doneCb(const actionlib::SimpleClientGoalState& state,
const gazebo_action_motion_ctrl::pathResultConstPtr& result) {
ROS_INFO(" doneCb: server responded with state [%s]", state.toString().c_str());
g_curr_pose=result->final_pose;
g_is_done=true;
was_canceled=false;
if(g_curr_pose.position.x>blocked_x){
blocked_x=g_curr_pose.position.x;
was_blocked_y=false;
}
}