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


C++ PowerCubeCtrl::Stop方法代码示例

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


在下文中一共展示了PowerCubeCtrl::Stop方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: srvCallback_Recover

		/*!
		* \brief Executes the service callback for recover.
		*
		* Recovers the driver after an emergency stop.
		* \param req Service request
		* \param res Service response
		*/
		bool srvCallback_Recover(	cob_srvs::Trigger::Request &req,
									cob_srvs::Trigger::Response &res )
		{
			if (isInitialized_ == true)
			{
		   		ROS_INFO("Recovering powercubes");
		
				// stopping all arm movements
				if (PCube_->Stop())
				{
					ROS_INFO("Recovering powercubes succesfull");
					res.success.data = true;
				}
				else
				{
					ROS_ERROR("Recovering powercubes not succesfull. error: %s", PCube_->getErrorMessage().c_str());
					res.success.data = false;
					res.error_message.data = PCube_->getErrorMessage();
				}
			}
			else
			{
				ROS_ERROR("...powercubes already recovered...");
				res.success.data = false;
				res.error_message.data = "powercubes already recovered";
			}

			return true;
		}
开发者ID:brudder,项目名称:cob_driver,代码行数:36,代码来源:cob_powercube_chain.cpp

示例2: srvCallback_Stop

  /*!
   * \brief Executes the service callback for stop.
   *
   * Stops all hardware movements.
   * \param req Service request
   * \param res Service response
   */
  bool srvCallback_Stop(cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res)
  {
    ROS_INFO("Stopping powercubes...");

    // stop powercubes
    if (pc_ctrl_->Stop())
    {
      res.success.data = true;
      ROS_INFO("...stopping powercubes successful.");
    }
    else
    {
      res.success.data = false;
      res.error_message.data = pc_ctrl_->getErrorMessage();
      ROS_ERROR("...stopping powercubes not successful. error: %s", res.error_message.data.c_str());
    }
    return true;
  }
开发者ID:ipa-fmw-hj,项目名称:cob_driver,代码行数:25,代码来源:cob_powercube_chain.cpp

示例3: srvCallback_Stop

  bool srvCallback_Stop(cob3_srvs::Stop::Request &req,
                        cob3_srvs::Stop::Response &res )
  {
 	    ROS_INFO("Stopping powercubes");
  
      // stopping all arm movements
      if (PCube->Stop())
      {
      	ROS_INFO("Stopping powercubes succesfull");
      	res.success = 0; // 0 = true, else = false
      }
      else
      {
      	ROS_ERROR("Stopping powercubes not succesfull. error: %s", PCube->getErrorMessage().c_str());
      	res.success = 1; // 0 = true, else = false
      	res.errorMessage.data = PCube->getErrorMessage();
      }
      return true;
  }
开发者ID:genius2609,项目名称:care-o-bot,代码行数:19,代码来源:powercube_chain.cpp

示例4: srvCallback_Stop

		/*!
		* \brief Executes the service callback for stop.
		*
		* Stops all hardware movements.
		* \param req Service request
		* \param res Service response
		*/
		bool srvCallback_Stop(	cob_srvs::Trigger::Request &req,
								cob_srvs::Trigger::Response &res )
		{
			ROS_INFO("Stopping powercubes");
			newvel_ = false;
	
			// set current trajectory to be finished
			traj_point_nr_ = traj_.points.size();
	
			// stopping all arm movements
			if (PCube_->Stop())
			{
				ROS_INFO("Stopping powercubes succesfull");
				res.success.data = true;
			}
			else
			{
				ROS_ERROR("Stopping powercubes not succesfull. error: %s", PCube_->getErrorMessage().c_str());
				res.success.data = false;
				res.error_message.data = PCube_->getErrorMessage();
			}
			return true;
		}
开发者ID:brudder,项目名称:cob_driver,代码行数:30,代码来源:cob_powercube_chain.cpp


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