当前位置: 首页>>代码示例>>C++>>正文


C++ SimpleClientGoalState::toString方法代码示例

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


在下文中一共展示了SimpleClientGoalState::toString方法的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");
                }
            }
        }
    }
开发者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: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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