@@ -97,20 +97,6 @@ controller_interface::InterfaceConfiguration GPIOController::command_interface_c
9797 config.names .emplace_back (tf_prefix + " hand_back_control/hand_back_control_cmd" );
9898 config.names .emplace_back (tf_prefix + " hand_back_control/hand_back_control_async_success" );
9999
100- // Start or stop tool contact functionality
101- config.names .emplace_back (tf_prefix + " start_tool_contact/start_tool_contact_cmd" );
102- config.names .emplace_back (tf_prefix + " start_tool_contact/start_tool_contact_async_success" );
103- config.names .emplace_back (tf_prefix + " end_tool_contact/end_tool_contact_cmd" );
104- config.names .emplace_back (tf_prefix + " end_tool_contact/end_tool_contact_async_success" );
105-
106- // Get version service
107- config.names .emplace_back (tf_prefix + " get_version/get_version_cmd" );
108- config.names .emplace_back (tf_prefix + " get_version/get_version_async_success" );
109- config.names .emplace_back (tf_prefix + " get_version/get_version_major" );
110- config.names .emplace_back (tf_prefix + " get_version/get_version_minor" );
111- config.names .emplace_back (tf_prefix + " get_version/get_version_bugfix" );
112- config.names .emplace_back (tf_prefix + " get_version/get_version_build" );
113-
114100 return config;
115101}
116102
@@ -326,17 +312,6 @@ ur_controllers::GPIOController::on_activate(const rclcpp_lifecycle::State& /*pre
326312 tare_sensor_srv_ = get_node ()->create_service <std_srvs::srv::Trigger>(
327313 " ~/zero_ftsensor" ,
328314 std::bind (&GPIOController::zeroFTSensor, this , std::placeholders::_1, std::placeholders::_2));
329-
330- start_tool_contact_srv_ = get_node ()->create_service <std_srvs::srv::Trigger>(
331- " ~/start_tool_contact" ,
332- std::bind (&GPIOController::startToolContact, this , std::placeholders::_1, std::placeholders::_2));
333-
334- end_tool_contact_srv_ = get_node ()->create_service <std_srvs::srv::Trigger>(
335- " ~/end_tool_contact" ,
336- std::bind (&GPIOController::endToolContact, this , std::placeholders::_1, std::placeholders::_2));
337-
338- get_version_srv_ = get_node ()->create_service <ur_msgs::srv::GetVersion>(
339- " ~/get_version" , std::bind (&GPIOController::getVersion, this , std::placeholders::_1, std::placeholders::_2));
340315 } catch (...) {
341316 return LifecycleNodeInterface::CallbackReturn::ERROR;
342317 }
@@ -545,81 +520,6 @@ bool GPIOController::zeroFTSensor(std_srvs::srv::Trigger::Request::SharedPtr /*r
545520 return true ;
546521}
547522
548- bool GPIOController::startToolContact (std_srvs::srv::Trigger::Request::SharedPtr /* req*/ ,
549- std_srvs::srv::Trigger::Response::SharedPtr resp)
550- {
551- // reset success flag
552- command_interfaces_[CommandInterfaces::START_TOOL_CONTACT_ASYNC_SUCCESS].set_value (ASYNC_WAITING);
553-
554- // call the service in the hardware
555- command_interfaces_[CommandInterfaces::START_TOOL_CONTACT_CMD].set_value (1.0 );
556-
557- if (!waitForAsyncCommand (
558- [&]() { return command_interfaces_[CommandInterfaces::START_TOOL_CONTACT_ASYNC_SUCCESS].get_value (); })) {
559- RCLCPP_WARN (get_node ()->get_logger (), " Could not verify that tool contact was started." );
560- }
561-
562- resp->success =
563- static_cast <bool >(command_interfaces_[CommandInterfaces::START_TOOL_CONTACT_ASYNC_SUCCESS].get_value ());
564-
565- if (resp->success ) {
566- RCLCPP_INFO (get_node ()->get_logger (), " Successfully started tool contact" );
567- } else {
568- RCLCPP_ERROR (get_node ()->get_logger (), " Could not start tool contact" );
569- return false ;
570- }
571-
572- return true ;
573- }
574-
575- bool GPIOController::endToolContact (std_srvs::srv::Trigger::Request::SharedPtr /* req*/ ,
576- std_srvs::srv::Trigger::Response::SharedPtr resp)
577- {
578- // reset success flag
579- command_interfaces_[CommandInterfaces::END_TOOL_CONTACT_ASYNC_SUCCESS].set_value (ASYNC_WAITING);
580-
581- // call the service in the hardware
582- command_interfaces_[CommandInterfaces::END_TOOL_CONTACT_CMD].set_value (1.0 );
583-
584- if (!waitForAsyncCommand (
585- [&]() { return command_interfaces_[CommandInterfaces::END_TOOL_CONTACT_ASYNC_SUCCESS].get_value (); })) {
586- RCLCPP_WARN (get_node ()->get_logger (), " Could not verify that tool contact was stopped." );
587- }
588-
589- resp->success = static_cast <bool >(command_interfaces_[CommandInterfaces::END_TOOL_CONTACT_ASYNC_SUCCESS].get_value ());
590-
591- if (resp->success ) {
592- RCLCPP_INFO (get_node ()->get_logger (), " Successfully stopped tool contact" );
593- } else {
594- RCLCPP_ERROR (get_node ()->get_logger (), " Could not stop tool contact" );
595- return false ;
596- }
597-
598- return true ;
599- }
600-
601- bool GPIOController::getVersion (ur_msgs::srv::GetVersion::Request::SharedPtr /* req*/ ,
602- ur_msgs::srv::GetVersion::Response::SharedPtr resp)
603- {
604- // reset success flag
605- command_interfaces_[CommandInterfaces::GET_VERSION_ASYNC_SUCCESS].set_value (ASYNC_WAITING);
606-
607- // call the service in the hardware
608- command_interfaces_[CommandInterfaces::GET_VERSION_CMD].set_value (1.0 );
609-
610- if (!waitForAsyncCommand (
611- [&]() { return command_interfaces_[CommandInterfaces::GET_VERSION_ASYNC_SUCCESS].get_value (); })) {
612- RCLCPP_WARN (get_node ()->get_logger (), " Could not verify software version of robot." );
613- }
614-
615- resp->major = static_cast <uint32_t >(command_interfaces_[CommandInterfaces::GET_VERSION_MAJOR].get_value ());
616- resp->minor = static_cast <uint32_t >(command_interfaces_[CommandInterfaces::GET_VERSION_MINOR].get_value ());
617- resp->bugfix = static_cast <uint32_t >(command_interfaces_[CommandInterfaces::GET_VERSION_BUGFIX].get_value ());
618- resp->build = static_cast <uint32_t >(command_interfaces_[CommandInterfaces::GET_VERSION_BUILD].get_value ());
619-
620- return true ;
621- }
622-
623523void GPIOController::initMsgs ()
624524{
625525 io_msg_.digital_in_states .resize (standard_digital_output_cmd_.size ());
0 commit comments