• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ actionlib::SimpleClientGoalState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中actionlib::SimpleClientGoalState的典型用法代码示例。如果您正苦于以下问题:C++ SimpleClientGoalState类的具体用法?C++ SimpleClientGoalState怎么用?C++ SimpleClientGoalState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了SimpleClientGoalState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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");
                }
            }
        }
    }
开发者ID:inesc-tec-robotics,项目名称:carlos_motion,代码行数:33,代码来源:move_platform_server.cpp


示例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]);
}
开发者ID:skeel3r,项目名称:jarvis,代码行数:8,代码来源:face_rec_client.cpp


示例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);
}
开发者ID:tayyab-naseer,项目名称:person_following,代码行数:10,代码来源:waypoint_client.cpp


示例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();
}
开发者ID:silverbullet1,项目名称:bbauv,代码行数:8,代码来源:ControllerTest.cpp


示例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!");
    }
}
开发者ID:mwswartwout,项目名称:learning_ros,代码行数:15,代码来源:example_navigator_action_client.cpp


示例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();
 }
开发者ID:frog0705,项目名称:actionlib_tutorials,代码行数:7,代码来源:fibonacci_class_client.cpp


示例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();
}
开发者ID:fmrico,项目名称:WaterMellon,代码行数:7,代码来源:wm_test_global_navigation_node.cpp


示例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++;
}
开发者ID:TuZZiX,项目名称:ros_workspace,代码行数:7,代码来源:baxter_jnt_traj_ctlr_client_pre_pose.cpp


示例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;
}
开发者ID:rxs688,项目名称:eecs600_2015_Alpha,代码行数:8,代码来源:baxter_cart_move_lib.cpp


示例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;
    }
}
开发者ID:TuZZiX,项目名称:ros_workspace,代码行数:29,代码来源:fetch_and_stack_client.cpp


示例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;
}
开发者ID:niliayu,项目名称:proj_4,代码行数:9,代码来源:path_action_client.cpp


示例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();
}
开发者ID:gongwenbo,项目名称:kuboki_navigation,代码行数:8,代码来源:nevigation.cpp


示例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");
				}
			}
开发者ID:yangfuyuan,项目名称:labust-ros-pkg,代码行数:9,代码来源:PrimitiveCallBase.hpp


示例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();
	}
开发者ID:JSpenc,项目名称:ReadOnly,代码行数:11,代码来源:face_detection_client.cpp


示例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;
    }
}
开发者ID:qkennedy,项目名称:eecs376,代码行数:11,代码来源:my_action_client.cpp


示例16: objectGrabberDoneCb_

void TaskActionServer::objectGrabberDoneCb_(const actionlib::SimpleClientGoalState& state,
        const object_grabber::object_grabberResultConstPtr& result) {
    ROS_INFO(" objectGrabberDoneCb: server responded with state [%s]", state.toString().c_str());
        
    ROS_INFO("got result output = %d; ", result->return_code);

    //result_.des_flange_pose_stamped_wrt_torso = result->des_flange_pose_stamped_wrt_torso;
    
    //pass return code back to the client    
    result_.object_grabber_return_code = object_grabber_return_code_;
    object_grabber_return_code_ = result->return_code; //put this last, to avoid race condition
}
开发者ID:TuZZiX,项目名称:ros_workspace,代码行数:12,代码来源:command_bundler.cpp


示例17: pickAndPlace

 void pickAndPlace(const actionlib::SimpleClientGoalState& state, const InteractiveBlockManipulationResultConstPtr& result)
 {
   ROS_INFO("Got interactive marker callback. Picking and placing.");
   
   if (state == actionlib::SimpleClientGoalState::SUCCEEDED)
     ROS_INFO("Succeeded!");
   else
   {
     ROS_INFO("Did not succeed! %s",  state.toString().c_str());
     ros::shutdown();
   }
   pick_and_place_action_.sendGoal(pick_and_place_goal_, boost::bind( &BlockManipulationAction::finish, this, _1, _2));
 }
开发者ID:scottmishra,项目名称:clam,代码行数:13,代码来源:block_manipulation_action_demo.cpp


示例18: addBlocks

 void addBlocks(const actionlib::SimpleClientGoalState& state, const BlockDetectionResultConstPtr& result)
 {
   ROS_INFO("Got block detection callback. Adding blocks.");
   geometry_msgs::Pose block;
   
   if (state == actionlib::SimpleClientGoalState::SUCCEEDED)
     ROS_INFO("Succeeded!");
   else
   {
     ROS_INFO("Did not succeed! %s",  state.toString().c_str());
     ros::shutdown();
   }
   interactive_manipulation_action_.sendGoal(interactive_manipulation_goal_, boost::bind( &BlockManipulationAction::pickAndPlace, this, _1, _2));
 }
开发者ID:scottmishra,项目名称:clam,代码行数:14,代码来源:block_manipulation_action_demo.cpp


示例19: finish

 void finish(const actionlib::SimpleClientGoalState& state, const PickAndPlaceResultConstPtr& result)
 {
   ROS_INFO("Got pick and place callback. Finished!");
   if (state == actionlib::SimpleClientGoalState::SUCCEEDED)
     ROS_INFO("Succeeded!");
   else
     ROS_INFO("Did not succeed! %s",  state.toString().c_str());
     
   reset_arm_action_.sendGoal(simple_arm_actions::ResetArmGoal());
   
   if (once)
     ros::shutdown();
   else
     detectBlocks();
 }
开发者ID:scottmishra,项目名称:clam,代码行数:15,代码来源:block_manipulation_action_demo.cpp


示例20: userCmdDone

void InteractiveObjectDetectionFrame::userCmdDone(const actionlib::SimpleClientGoalState& state,
                                                  const UserCommandResultConstPtr& result)
{
  boost::mutex::scoped_lock l1( mutex_ );

  ROS_INFO("Action finished in state [%s]", state.toString().c_str());
  action_requested_ = false;
  status_ = "[" + state.toString() + "]";

  switch (user_command_goal_.request)
  {
    case UserCommandGoal::SEGMENT:
      seg_status_ = state.getText();
      break;
    case UserCommandGoal::RECOGNIZE:
      rec_status_ = state.getText();
      break;
    case UserCommandGoal::DETECT:
      det_status_ = state.getText();
      break;    
    default:
      break;
  }
}
开发者ID:PR2,项目名称:pr2_object_manipulation,代码行数:24,代码来源:interactive_object_detection_frame.cpp



注:本文中的actionlib::SimpleClientGoalState类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ actiontools::ActionInstance类代码示例发布时间:2022-05-31
下一篇:
C++ actionlib::SimpleActionServer类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap