          // Check if there is a cancel request
          if (goal_handle->is_canceling()) {
            result->sequence = sequence;
            goal_handle->canceled(result);
            RCLCPP_INFO(this->get_logger(), "Goal canceled");
            return;
          }
          // Update sequence
          sequence.push_back(sequence[i] + sequence[i - 1]);
          // Publish feedback
          goal_handle->publish_feedback(feedback);
          RCLCPP_INFO(this->get_logger(), "Publish feedback");

          loop_rate.sleep();
        }

        // Check if goal is done
        if (rclcpp::ok()) {
          result->sequence = sequence;
          goal_handle->succeed(result);
          RCLCPP_INFO(this->get_logger(), "Goal succeeded");
        }
      };

    };  // class FibonacciActionServer

    }  // namespace custom_action_cpp

    RCLCPP_COMPONENTS_REGISTER_NODE(custom_action_cpp::FibonacciActionServer)

The first few lines include all of the headers we need to compile.

Next we create a class that is a derived class of ` rclcpp::Node  ` :

    class FibonacciActionServer : public rclcpp::Node


    return sequence_number;
  }
  std::optional<CallbackInfoVariant>
  get_and_erase_pending_request(int64_t request_number)
  {
    std::unique_lock<std::mutex> lock(pending_requests_mutex_);
    auto it = this->pending_requests_.find(request_number);
    if (it == this->pending_requests_.end()) {
      RCUTILS_LOG_DEBUG_NAMED(
        "rclcpp",
        "Received invalid sequence number. Ignoring...");
      return std::nullopt;
    }
    auto value = std::move(it->second.second);
    this->pending_requests_.erase(request_number);
    return value;
  }
  RCLCPP_DISABLE_COPY(Client)
  std::unordered_map<
    int64_t,
    std::pair<
      std::chrono::time_point<std::chrono::system_clock>,
      CallbackInfoVariant>>
  pending_requests_;
  std::mutex pending_requests_mutex_;
private:
  const rosidl_service_type_support_t * srv_type_support_handle_;
};
}  // namespace rclcpp
#endif  // RCLCPP__CLIENT_HPP_


rclcpp::node_interfaces::NodeTimersInterface::SharedPtr
rclcpp::Node::get_node_timers_interface  |  (  |  |  )  |
---|---|---|---|---

Return the [ Node ](classrclcpp_1_1Node.html "Node is the single point of
entry for creating publishers and subscribers.") 's internal
NodeTimersInterface implementation.


We’ll begin by creating our own ROS 2 package. Navigate to the ` src ` folder
of your ` ros2_ws ` and create a package named ` srv_client_checks ` :


Parameters


If the parameter has not been declared this function may throw the [
rclcpp::exceptions::ParameterNotDeclaredException
](classrclcpp_1_1exceptions_1_1ParameterNotDeclaredException.html "Thrown if
parameter is not declared, e.g. either set or get was called without first
declaring.") exception, but only if the node was not created with the [
rclcpp::NodeOptions::allow_undeclared_parameters
](classrclcpp_1_1NodeOptions.html#a5b9580203b3cb88c75b5b858e26b3b7d "Return
the allow_undeclared_parameters flag.") set to true. If undeclared parameters
are allowed, then the parameter is implicitly declared with the default
parameter meta data before being set. [ Parameter
](classrclcpp_1_1Parameter.html "Structure to store an arbitrary parameter
with templated get/set methods.") overrides are ignored by set_parameter.


true if output "values" was changed, false otherwise.


##  ◆  get_number_of_ready_guard_conditions()


    //                (since it is a C type)
    return std::shared_ptr<rmw_request_id_t>(new rmw_request_id_t);
  }
  /// Handle a server response
  /**
    * \param[in] request_header used to check if the secuence number is valid
    * \param[in] response message with the server response
   */
  void
  handle_response(
    std::shared_ptr<rmw_request_id_t> request_header,
    std::shared_ptr<void> response) override
  {
    std::optional<CallbackInfoVariant>
    optional_pending_request = this->get_and_erase_pending_request(request_header->sequence_number);
    if (!optional_pending_request) {
      return;
    }
    auto & value = *optional_pending_request;
    auto typed_response = std::static_pointer_cast<typename ServiceT::Response>(
      std::move(response));
    if (std::holds_alternative<Promise>(value)) {
      auto & promise = std::get<Promise>(value);
      promise.set_value(std::move(typed_response));
    } else if (std::holds_alternative<CallbackTypeValueVariant>(value)) {
      auto & inner = std::get<CallbackTypeValueVariant>(value);
      const auto & callback = std::get<CallbackType>(inner);
      auto & promise = std::get<Promise>(inner);
      auto & future = std::get<SharedFuture>(inner);
      promise.set_value(std::move(typed_response));
      callback(std::move(future));
    } else if (std::holds_alternative<CallbackWithRequestTypeValueVariant>(value)) {
      auto & inner = std::get<CallbackWithRequestTypeValueVariant>(value);
      const auto & callback = std::get<CallbackWithRequestType>(inner);
      auto & promise = std::get<PromiseWithRequest>(inner);
      auto & future = std::get<SharedFutureWithRequest>(inner);
      auto & request = std::get<SharedRequest>(inner);
      promise.set_value(std::make_pair(std::move(request), std::move(typed_response)));
      callback(std::move(future));
    }


   */
  size_t
  prune_pending_requests()
  {
    std::lock_guard guard(pending_requests_mutex_);
    auto ret = pending_requests_.size();
    pending_requests_.clear();
    return ret;
  }
  /// Clean all pending requests older than a time_point.
  /**
   * \param[in] time_point Requests that were sent before this point are going to be removed.
   * \param[inout] pruned_requests Removed requests id will be pushed to the vector
   *  if a pointer is provided.
   * \return number of pending requests that were removed.
   */
  template<typename AllocatorT = std::allocator<int64_t>>
  size_t
  prune_requests_older_than(
    std::chrono::time_point<std::chrono::system_clock> time_point,
    std::vector<int64_t, AllocatorT> * pruned_requests = nullptr)
  {
    std::lock_guard guard(pending_requests_mutex_);
    auto old_size = pending_requests_.size();
    for (auto it = pending_requests_.begin(), last = pending_requests_.end(); it != last; ) {
      if (it->second.first < time_point) {
        if (pruned_requests) {
          pruned_requests->push_back(it->first);
        }
        it = pending_requests_.erase(it);
      } else {
        ++it;
      }
    }
    return old_size - pending_requests_.size();
  }
  /// Configure client introspection.
  /**
   * \param[in] clock clock to use to generate introspection timestamps
   * \param[in] qos_service_event_pub QoS settings to use when creating the introspection publisher


[ std::map ](http://en.cppreference.com/w/cpp/container/map.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) , [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) > >
rclcpp::Node::get_service_names_and_types  |  (  |  |  )  |  const
---|---|---|---|---

Return a map of existing service names to list of service types.


Encapsulation of Quality of Service settings.


##  ◆  get_node_graph_interface()


  * [ Download ](/download)
  * [ Documentation ](/docs)
  * [ Tutorials ](/tutorials)
  * [ ROS visualization ](/ros)
  * [ Rosbridge ](/rosbridge)
  * [ URDF visualization ](/urdf)


Implemented in [ rclcpp_action::Server< ActionT >
](classrclcpp__action_1_1Server.html#a33a4731623423f4fadf9f25524ee3b6e) .


This allows the node developer to control which parameters may be changed.


###  Developers


result.successful =  false  ;


This method will not cause a callback registered with
add_on_set_parameters_callback to be called.


**Tutorial level:** Intermediate

**Time:** 15 minutes

Contents

  * Background

  * Prerequisites

  * Tasks

    * 1 Creating the custom_action_cpp package

    * 2 Writing an action server

    * 3 Writing an action client

  * Summary

  * Related content


The returned parameter is a list of topic endpoint information, where each
item will contain the node name, node namespace, topic type, endpoint type,
topic endpoint's GID, and its [ QoS ](classrclcpp_1_1QoS.html "Encapsulation
of Quality of Service settings.") profile.


We can finally run both our client and server nodes to see if they can
communicate with each other properly!


     InvalidEventError  |  if the given event is nullptr
---|---
EventNotRegisteredError  |  if the given event was not acquired with [
get_graph_event() ](classrclcpp_1_1Node.html#a9e5851844ecb1794503b8fc0f9f5c898
"Return a graph event, which will be set anytime a graph change occurs.") .

##  ◆  get_clock()  [1/2]


const char* rclcpp::Node::get_namespace  |  (  |  |  )  |  const
---|---|---|---|---

Get the namespace of the node.


[ Twitter  ](https://twitter.com/foxglove) [ GitHub
](https://github.com/foxglove)


void rclcpp::Node::wait_for_graph_change  |  (  |  rclcpp::Event::SharedPtr  |
_event_ ,
---|---|---|---
|  |  [ std::chrono::nanoseconds
](http://en.cppreference.com/w/cpp/chrono/duration.html) |  _timeout_
|  )  |  |

Wait for a graph event to occur by waiting on an [ Event
](classrclcpp_1_1Event.html) to become set.


      * [ Launch ](../Intermediate/Launch/Launch-Main.html)
        * [ Creating a launch file ](../Intermediate/Launch/Creating-Launch-Files.html)
        * [ Integrating launch files into ROS 2 packages ](../Intermediate/Launch/Launch-system.html)
        * [ Using substitutions ](../Intermediate/Launch/Using-Substitutions.html)
        * [ Using event handlers ](../Intermediate/Launch/Using-Event-Handlers.html)
        * [ Managing large projects ](../Intermediate/Launch/Using-ROS2-Launch-For-Large-Projects.html)
      * [ ` tf2  ` ](../Intermediate/Tf2/Tf2-Main.html)
        * [ Introducing ` tf2  ` ](../Intermediate/Tf2/Introduction-To-Tf2.html)
        * [ Writing a static broadcaster (Python) ](../Intermediate/Tf2/Writing-A-Tf2-Static-Broadcaster-Py.html)
        * [ Writing a static broadcaster (C++) ](../Intermediate/Tf2/Writing-A-Tf2-Static-Broadcaster-Cpp.html)
        * [ Writing a broadcaster (Python) ](../Intermediate/Tf2/Writing-A-Tf2-Broadcaster-Py.html)
        * [ Writing a broadcaster (C++) ](../Intermediate/Tf2/Writing-A-Tf2-Broadcaster-Cpp.html)
        * [ Writing a listener (Python) ](../Intermediate/Tf2/Writing-A-Tf2-Listener-Py.html)
        * [ Writing a listener (C++) ](../Intermediate/Tf2/Writing-A-Tf2-Listener-Cpp.html)
        * [ Adding a frame (Python) ](../Intermediate/Tf2/Adding-A-Frame-Py.html)
        * [ Adding a frame (C++) ](../Intermediate/Tf2/Adding-A-Frame-Cpp.html)
        * [ Using time (Python) ](../Intermediate/Tf2/Learning-About-Tf2-And-Time-Py.html)
        * [ Using time (C++) ](../Intermediate/Tf2/Learning-About-Tf2-And-Time-Cpp.html)
        * [ Traveling in time (Python) ](../Intermediate/Tf2/Time-Travel-With-Tf2-Py.html)
        * [ Traveling in time (C++) ](../Intermediate/Tf2/Time-Travel-With-Tf2-Cpp.html)
        * [ Debugging ](../Intermediate/Tf2/Debugging-Tf2-Problems.html)
        * [ Quaternion fundamentals ](../Intermediate/Tf2/Quaternion-Fundamentals.html)
        * [ Using stamped datatypes with ` tf2_ros::MessageFilter  ` ](../Intermediate/Tf2/Using-Stamped-Datatypes-With-Tf2-Ros-MessageFilter.html)
      * [ Testing ](../Intermediate/Testing/Testing-Main.html)
        * [ Running Tests in ROS 2 from the Command Line ](../Intermediate/Testing/CLI.html)
        * [ Writing Basic Tests with C++ with GTest ](../Intermediate/Testing/Cpp.html)
        * [ Writing Basic Tests with Python ](../Intermediate/Testing/Python.html)
      * [ URDF ](../Intermediate/URDF/URDF-Main.html)
        * [ Building a visual robot model from scratch ](../Intermediate/URDF/Building-a-Visual-Robot-Model-with-URDF-from-Scratch.html)
        * [ Building a movable robot model ](../Intermediate/URDF/Building-a-Movable-Robot-Model-with-URDF.html)
        * [ Adding physical and collision properties ](../Intermediate/URDF/Adding-Physical-and-Collision-Properties-to-a-URDF-Model.html)
        * [ Using Xacro to clean up your code ](../Intermediate/URDF/Using-Xacro-to-Clean-Up-a-URDF-File.html)
        * [ Using URDF with ` robot_state_publisher  ` ](../Intermediate/URDF/Using-URDF-with-Robot-State-Publisher.html)
        * [ Generating an URDF File ](../Intermediate/URDF/Exporting-an-URDF-File.html)
      * [ RViz ](../Intermediate/RViz/RViz-Main.html)
        * [ RViz User Guide ](../Intermediate/RViz/RViz-User-Guide/RViz-User-Guide.html)
        * [ Building a Custom RViz Display ](../Intermediate/RViz/RViz-Custom-Display/RViz-Custom-Display.html)
    * [ Advanced ](../Advanced.html)
      * [ Enabling topic statistics (C++) ](../Advanced/Topic-Statistics-Tutorial/Topic-Statistics-Tutorial.html)
      * [ Using Fast DDS Discovery Server as discovery protocol [community-contributed] ](../Advanced/Discovery-Server/Discovery-Server.html)


rclcpp_action::ServerBase Class Reference  abstract


As always, feel free to check [ our docs ](/docs/studio) or reach out to us
directly in [ our Slack community ](/slack) to learn how our tools can help
you accelerate your ROS development!


The documentation for this class was generated from the following files:


##  ◆  get_goal_id_from_goal_request()


In the service scenario, the client node could be a diagnostics node that
gathers robot state data at start-up. The server node could be a motor node
that controls the robot’s servo motors. If all goes well, and the actuators
are working properly, the server node would deliver a response saying that all
checks passed. If any motors encountered an issue, however, the response would
raise an alarm.


  * [ Security ](/security)
  * [ Privacy ](/legal/privacy)
  * [ Terms of Service ](/legal/terms)


    * [ Using Callback Groups ](../../../How-To-Guides/Using-callback-groups.html)
    * [ IDEs and Debugging [community-contributed] ](../../../How-To-Guides/ROS-2-IDEs.html)
    * [ Setup ROS 2 with VSCode and Docker [community-contributed] ](../../../How-To-Guides/Setup-ROS-2-with-VSCode-and-Docker-Container.html)
    * [ Using Custom Rosdistro Version ](../../../How-To-Guides/Using-Custom-Rosdistro.html)
    * [ Building RQt from source ](../../../How-To-Guides/RQt-Source-Install.html)
      * [ Building RQt from source on macOS ](../../../How-To-Guides/RQt-Source-Install-MacOS.html)
      * [ Building RQt from source on Windows 10 ](../../../How-To-Guides/RQt-Source-Install-Windows10.html)
  * [ Concepts ](../../../Concepts.html)
    * [ Basic Concepts ](../../../Concepts/Basic.html)
      * [ Nodes ](../../../Concepts/Basic/About-Nodes.html)
      * [ Discovery ](../../../Concepts/Basic/About-Discovery.html)
      * [ Interfaces ](../../../Concepts/Basic/About-Interfaces.html)
      * [ Topics ](../../../Concepts/Basic/About-Topics.html)
      * [ Services ](../../../Concepts/Basic/About-Services.html)
      * [ Actions ](../../../Concepts/Basic/About-Actions.html)
      * [ Parameters ](../../../Concepts/Basic/About-Parameters.html)
      * [ Introspection with command line tools ](../../../Concepts/Basic/About-Command-Line-Tools.html)
      * [ Launch ](../../../Concepts/Basic/About-Launch.html)
      * [ Client libraries ](../../../Concepts/Basic/About-Client-Libraries.html)
    * [ Intermediate Concepts ](../../../Concepts/Intermediate.html)
      * [ The ROS_DOMAIN_ID ](../../../Concepts/Intermediate/About-Domain-ID.html)
      * [ Different ROS 2 middleware vendors ](../../../Concepts/Intermediate/About-Different-Middleware-Vendors.html)
      * [ Logging and logger configuration ](../../../Concepts/Intermediate/About-Logging.html)
      * [ Quality of Service settings ](../../../Concepts/Intermediate/About-Quality-of-Service-Settings.html)
      * [ Executors ](../../../Concepts/Intermediate/About-Executors.html)
      * [ Topic statistics ](../../../Concepts/Intermediate/About-Topic-Statistics.html)
      * [ Overview and usage of RQt ](../../../Concepts/Intermediate/About-RQt.html)
      * [ Composition ](../../../Concepts/Intermediate/About-Composition.html)
      * [ Cross-compilation ](../../../Concepts/Intermediate/About-Cross-Compilation.html)
      * [ ROS 2 Security ](../../../Concepts/Intermediate/About-Security.html)
      * [ Tf2 ](../../../Concepts/Intermediate/About-Tf2.html)
    * [ Advanced Concepts ](../../../Concepts/Advanced.html)
      * [ The build system ](../../../Concepts/Advanced/About-Build-System.html)
      * [ Internal ROS 2 interfaces ](../../../Concepts/Advanced/About-Internal-Interfaces.html)
      * [ ROS 2 middleware implementations ](../../../Concepts/Advanced/About-Middleware-Implementations.html)
  * [ Contact ](../../../Contact.html)
  * [ The ROS 2 Project ](../../../The-ROS2-Project.html)
    * [ Contributing ](../../../The-ROS2-Project/Contributing.html)
      * [ ROS 2 developer guide ](../../../The-ROS2-Project/Contributing/Developer-Guide.html)
      * [ Code style and language versions ](../../../The-ROS2-Project/Contributing/Code-Style-Language-Versions.html)


     [in]  |  other  |  The node from which a new sub-node is created.
---|---|---
[in]  |  sub_namespace  |  The sub-namespace of the sub-node.

##  Member Function Documentation


Like [ set_parameter()
](classrclcpp_1_1Node.html#a8c753036cd5cbdf0168ca3b39a193223 "Set a single
parameter.") this method will implicitly undeclare parameters with the type [
rclcpp::PARAMETER_NOT_SET
](namespacerclcpp.html#a1b307a4b7368b68f325812cd2aeb8784adefddb470d1054265245a0c5dbeccf4e)
.


Email address


##  ◆  create_subscription()


It occurs to me that there is another approach to solve the problem of writing
generic C++ applications that work with message / service types not known
until runtime. That is to follow the path of [ SOSS
](https://github.com/osrf/soss/) and use generated code which is compiled to
plugins that are loaded at runtime. As far as I can tell the key advantage of
that route is you don’t have to mess around with the sort of serialisation
routines I mentioned above, and should be fully insulated from the rmw. But I
don’t know if using using SOSS as a library for an existing application one of
its intended uses, rather than as a standalone gateway.


tutorial


](visibility__control_8hpp.html#a736fe60d4de4417a213ed34ba1926048) bool  |  [
is_ready
](classrclcpp__action_1_1ServerBase.html#a9942d7427e25cf5128e4ee26b19b5d7c) (
[ rcl_wait_set_t
](http://docs.ros2.org/foxy/api/rcl/structrcl__wait__set__t.html) *) override
[ RCLCPP_ACTION_PUBLIC
](visibility__control_8hpp.html#a736fe60d4de4417a213ed34ba1926048) void  |  [
execute
](classrclcpp__action_1_1ServerBase.html#aa7d963efcf8243566de9fd07755556e6) ()
override
![-](closed.png) Public Member Functions inherited from [ rclcpp::Waitable
](http://docs.ros2.org/foxy/api/rclcpp/classrclcpp_1_1Waitable.html)
virtual  |  [ ~Waitable
](http://docs.ros2.org/foxy/api/rclcpp/classrclcpp_1_1Waitable.html#a775475ffdec36b88279a0d671739cce2)
()=default
virtual size_t  |  [ get_number_of_ready_events
](http://docs.ros2.org/foxy/api/rclcpp/classrclcpp_1_1Waitable.html#a441c473cb21623371b8ae0bc4d4ff7ce)
()
bool  |  [ exchange_in_use_by_wait_set_state
](http://docs.ros2.org/foxy/api/rclcpp/classrclcpp_1_1Waitable.html#aa73eeb074bfbbd858d5c559d6b185ff8)
(bool in_use_state)

##  Protected Member Functions

---
[ RCLCPP_ACTION_PUBLIC
](visibility__control_8hpp.html#a736fe60d4de4417a213ed34ba1926048) |  [
ServerBase
](classrclcpp__action_1_1ServerBase.html#aee6f41e4969d74b82718a866e8d0fd96)
(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base,
rclcpp::node_interfaces::NodeClockInterface::SharedPtr node_clock,
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr node_logging, const [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html)
&name, const rosidl_action_type_support_t *type_support, const [
rcl_action_server_options_t
](http://docs.ros2.org/foxy/api/rcl_action/structrcl__action__server__options__t.html)
&options)
virtual [ RCLCPP_ACTION_PUBLIC
](visibility__control_8hpp.html#a736fe60d4de4417a213ed34ba1926048) [ std::pair
](http://en.cppreference.com/w/cpp/utility/pair.html) < [ GoalResponse


If the value type of the parameter is [ rclcpp::PARAMETER_NOT_SET
](namespacerclcpp.html#a1b307a4b7368b68f325812cd2aeb8784adefddb470d1054265245a0c5dbeccf4e)
, and the existing parameter type is something else, then the parameter will
be implicitly undeclared. This will result in a parameter event indicating
that the parameter was deleted.


Returns


##  ◆  get_fully_qualified_name()


node->get_effective_namespace();  // -> "/my_ns"


bool rclcpp::Node::get_parameter  |  (  |  const [ std::string
](http://en.cppreference.com/w/cpp/string/basic_string.html) & |  _name_ ,
---|---|---|---
|  |  ParameterT & |  _parameter_
|  )  |  |  const

Get the value of a parameter by the given name, and return true if it was set.


Parameters


The sub-namespace should be relative, and an exception will be thrown if the
sub-namespace is absolute, i.e. if it starts with a leading '/'.


##  ◆  get_clock()  [2/2]


[ gbiggs  ](https://discourse.ros.org/u/gbiggs) June 18, 2020, 4:56am  2


I managed to cobble together a generic service client, following in the
footsteps of the rosbag2 [ generic subscription
](https://github.com/ros2/rosbag2/blob/master/rosbag2_transport/src/rosbag2_transport/generic_subscription.hpp)
and [ ros2_introspection
](https://github.com/facontidavide/ros2_introspection) .


##  ◆  get_name()


[ std::vector< rclcpp::Parameter >
](http://en.cppreference.com/w/cpp/container/vector.html)


     [ std::runtime_error ](http://en.cppreference.com/w/cpp/error/runtime_error.html) |  if the handler was not created with ` add_on_set_parameters_callback ` , or if it has been removed before.
---|---

##  ◆  set_on_parameters_set_callback()


If ` ignore_overrides ` is ` true ` , all the overrides of the parameters
declared by the function call will be ignored.


##  ◆  get_namespace()


[ [ legend ](graph_legend.html) ]


Collaboration diagram for rclcpp_action::ServerBase:


](classrclcpp_1_1Node.html#aabb818bb5c848c5a980ddbe745517b7c)

rcl_interfaces::msg::SetParametersResult  |  [ set_parameter
](classrclcpp_1_1Node.html#a8c753036cd5cbdf0168ca3b39a193223) (const [
rclcpp::Parameter ](classrclcpp_1_1Parameter.html) &parameter)
|  Set a single parameter. [ More...
](classrclcpp_1_1Node.html#a8c753036cd5cbdf0168ca3b39a193223)

[ std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) <
rcl_interfaces::msg::SetParametersResult > |  [ set_parameters
](classrclcpp_1_1Node.html#a7d8af4dc449c7130ccc396814b86c14d) (const [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < [
rclcpp::Parameter ](classrclcpp_1_1Parameter.html) > &parameters)
|  Set one or more parameters, one at a time. [ More...
](classrclcpp_1_1Node.html#a7d8af4dc449c7130ccc396814b86c14d)

rcl_interfaces::msg::SetParametersResult  |  [ set_parameters_atomically
](classrclcpp_1_1Node.html#a0a6d4b50c0fab975859590c82931e9ae) (const [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < [
rclcpp::Parameter ](classrclcpp_1_1Parameter.html) > &parameters)
|  Set one or more parameters, all at once. [ More...
](classrclcpp_1_1Node.html#a0a6d4b50c0fab975859590c82931e9ae)

[ rclcpp::Parameter ](classrclcpp_1_1Parameter.html) |  [ get_parameter
](classrclcpp_1_1Node.html#a0bf1077fba623d72fe1b49805f6c0a5a) (const [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html)
&name) const
|  Return the parameter by the given name. [ More...
](classrclcpp_1_1Node.html#a0bf1077fba623d72fe1b49805f6c0a5a)

bool  |  [ get_parameter
](classrclcpp_1_1Node.html#a1fe80d17fb6789dec1ecf74c4d135aad) (const [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html)
&name, [ rclcpp::Parameter ](classrclcpp_1_1Parameter.html) &parameter) const
|  Get the value of a parameter by the given name, and return true if it was
set. [ More... ](classrclcpp_1_1Node.html#a1fe80d17fb6789dec1ecf74c4d135aad)

template<typename ParameterT >
bool  |  [ get_parameter
](classrclcpp_1_1Node.html#a3158e5520c58531ae4d85a2e98cdf210) (const [


    bool moveMotorToMinAndMax(int motor_id){
      bool reached_min = false;
      bool reached_max = false;

      // Add code here that moves the motor to its min and max positions

      if (reached_min && reached_max){
        return true;
      } else {
        return false;
      }
    }


[ create_sub_node() ](classrclcpp_1_1Node.html#a1df8e4507d17a503630317432449d69d "Create a sub-node, which will extend the namespace of all entities created with it.")


     [in]  |  name  |  The name of the parameter to be undeclared.
---|---|---

Exceptions


##  ◆  create_result_response()


[ std::shared_ptr ](http://en.cppreference.com/w/cpp/memory/shared_ptr.html) <
PublisherT > rclcpp::Node::create_publisher  |  (  |  const [ std::string
](http://en.cppreference.com/w/cpp/string/basic_string.html) & |  _topic_name_
,
---|---|---|---
|  |  const [ rclcpp::QoS ](classrclcpp_1_1QoS.html) & |  _qos_ ,
|  |  const [ PublisherOptionsWithAllocator
](structrclcpp_1_1PublisherOptionsWithAllocator.html) < AllocatorT > & |
_options_ = ` [ PublisherOptionsWithAllocator
](structrclcpp_1_1PublisherOptionsWithAllocator.html) <AllocatorT>() `
|  )  |  |

Create and return a [ Publisher ](classrclcpp_1_1Publisher.html "A publisher
publishes messages of any type to a topic.") .


Returns


rcl_interfaces::msg::SetParametersResult result;


  2.2 Compiling the action server  ï

In the previous section we put the action server code into place. To get it to
compile and run, we need to do a couple of additional things.

First we need to setup the CMakeLists.txt so that the action server is
compiled. Open up ` custom_action_cpp/CMakeLists.txt  ` , and add the
following right after the ` find_package  ` calls:

    add_library(action_server SHARED
      src/fibonacci_action_server.cpp)
    target_include_directories(action_server PRIVATE
      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
      $<INSTALL_INTERFACE:include>)
    target_compile_definitions(action_server
      PRIVATE "CUSTOM_ACTION_CPP_BUILDING_DLL")
    ament_target_dependencies(action_server
      "custom_action_interfaces"
      "rclcpp"
      "rclcpp_action"
      "rclcpp_components")
    rclcpp_components_register_node(action_server PLUGIN "custom_action_cpp::FibonacciActionServer" EXECUTABLE fibonacci_action_server)
    install(TARGETS
      action_server
      ARCHIVE DESTINATION lib
      LIBRARY DESTINATION lib
      RUNTIME DESTINATION bin)

And now we can compile the package. Go to the top-level of the ` ros2_ws  ` ,
and run:

    colcon build

This should compile the entire workspace, including the `


I can create multiple instances of the LinearController1, but as soon as I try
and load LinearController2 I get the following error:


Query


* Solutions


    @article{ros_control,
    author = {Chitta, Sachin and Marder-Eppstein, Eitan and Meeussen, Wim and Pradeep, Vijay and Rodr{\'i}guez Tsouroukdissian, Adolfo  and Bohren, Jonathan and Coleman, David and Magyar, Bence and Raiola, Gennaro and L{\"u}dtke, Mathias and Fern{\'a}ndez Perdomo, Enrique},
    title = {ros\_control: A generic and simple control framework for ROS},
    journal = {The Journal of Open Source Software},
    year = {2017},
    doi = {10.21105/joss.00456},
    URL = {http://www.theoj.org/joss-papers/joss.00456/10.21105.joss.00456.pdf}
    }


Resources


  * [ catkin ](/catkin?distro=hydro)
  * [ diff_drive_controlle... ](/diff_drive_controller?distro=hydro)
  * [ effort_controllers ](/effort_controllers?distro=hydro)
  * [ force_torque_sensor_... ](/force_torque_sensor_controller?distro=hydro)
  * [ forward_command_cont... ](/forward_command_controller?distro=hydro)
  * [ gripper_action_contr... ](/gripper_action_controller?distro=hydro)
  * [ imu_sensor_controlle... ](/imu_sensor_controller?distro=hydro)
  * [ joint_state_controll... ](/joint_state_controller?distro=hydro)
  * [ joint_trajectory_con... ](/joint_trajectory_controller?distro=hydro)
  * [ position_controllers... ](/position_controllers?distro=hydro)
  * [ velocity_controllers... ](/velocity_controllers?distro=hydro)


#  Package Summary


#  Search code, repositories, users, issues, pull requests...


  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ros_controllers/page:1/)
  * [ Changelog ](http://docs.ros.org/en/kinetic/changelogs/ros_controllers/changelog.html)
  * [ Change List ](/ros_controllers/ChangeList)
  * [ Reviews ](/ros_controllers/Reviews)


Continuous Integration


Skip to content


Released


  * [ Code  ](/ros-controls/ros_controllers)
  * [ Issues  97  ](/ros-controls/ros_controllers/issues)
  * [ Pull requests  26  ](/ros-controls/ros_controllers/pulls)
  * [ Actions  ](/ros-controls/ros_controllers/actions)
  * [ Projects  0  ](/ros-controls/ros_controllers/projects)
  * [ Wiki  ](/ros-controls/ros_controllers/wiki)
  * [ Security  ](/ros-controls/ros_controllers/security)
  * [ Insights  ](/ros-controls/ros_controllers/pulse)


[ position_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/position_controllers "position_controllers")


Parameters:


[ tags ](/tags/) [ users ](/users/) [ badges ](/badges/)


  * **` msg ` ** (Message) - msg message to fill
  * **` prefix ` ** (str) - field name prefix (for verbose printing)


###  fill_message_args  (  msg  ,  msg_args  ,  keys  =  ` { ` ` } ` )


Library of ros controllers


[ imu_sensor_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/imu_sensor_controller "imu_sensor_controller")


See [ ros_control ](/ros_control) for more information.


  * [ Code  ](/ros-controls/ros_controllers)
  * [ Issues  ](/ros-controls/ros_controllers/issues)
  * [ Pull requests  ](/ros-controls/ros_controllers/pulls)
  * [ Actions  ](/ros-controls/ros_controllers/actions)
  * [ Projects  ](/ros-controls/ros_controllers/projects)
  * [ Wiki  ](/ros-controls/ros_controllers/wiki)
  * [ Security  ](/ros-controls/ros_controllers/security)
  * [ Insights  ](/ros-controls/ros_controllers/pulse)


##  Question Tools


[ edit ](/s/answers/381203/edit/) flag offensive  delete  [ link
](/question/380351/creating-multiple-plugins-from-single-package-in-
ros2/?answer=381203#post-id-381203 "permanent link") more


[ wiki.ros.org/ros_control ](http://wiki.ros.org/ros_control
"http://wiki.ros.org/ros_control")


**Package Links**


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


|  [ source code ](roslib.message-pysrc.html#strify_message)
---|---

Convert value to string representation


In my current workspace I have successfully compiled and run three packages:


#  Package Summary


[ GusBus ](/users/26964/gusbus/)
63  ●  4  ●  7  ●  10


[ Report repository ](/contact/report-
content?content_url=https%3A%2F%2Fgithub.com%2Fros-
controls%2Fros_controllers&report=ros-controls+%28user%29)


###  Resources


[ four_wheel_steering_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/four_wheel_steering_controller "four_wheel_steering_controller")


Documented


[ __ ](/questions/) |


Library of ros controllers


##  About


Seen: **395 times**


melodic  noetic  _Show EOL distros:_


Last updated: **Jun 27 '21**


  * [ ackermann_steering_c... ](/ackermann_steering_controller?distro=melodic)
  * [ catkin ](/catkin?distro=melodic)
  * [ diff_drive_controlle... ](/diff_drive_controller?distro=melodic)
  * [ effort_controllers ](/effort_controllers?distro=melodic)
  * [ force_torque_sensor_... ](/force_torque_sensor_controller?distro=melodic)
  * [ forward_command_cont... ](/forward_command_controller?distro=melodic)
  * [ gripper_action_contr... ](/gripper_action_controller?distro=melodic)
  * [ imu_sensor_controlle... ](/imu_sensor_controller?distro=melodic)
  * [ joint_state_controll... ](/joint_state_controller?distro=melodic)
  * [ joint_trajectory_con... ](/joint_trajectory_controller?distro=melodic)
  * [ position_controllers... ](/position_controllers?distro=melodic)
  * [ velocity_controllers... ](/velocity_controllers?distro=melodic)


**Package Links**


* Product


[ See ros_controllers on index.ros.org for more info including aything ROS 2
related. ](https://index.ros.org/p/ros_controllers)


     printable representation of msg args

|


* ` **ValueError** ` \- if message_type is invalidly specified


  * README
  * BSD-3-Clause license


#  Page


###  get_message_class  (  message_type  ,  reload_on_error  =  False  )


Get string representation of msg arguments  |  [ source code ](roslib.message-
pysrc.html#get_printable_message_args)
---|---
|  |  [ fill_message_args ](roslib.message-module.html#fill_message_args) (
msg  ,  msg_args  ,  keys  =  ` { ` ` } ` )
Populate message with specified args.  |  [ source code ](roslib.message-
pysrc.html#fill_message_args)
---|---
Variables
---
|  struct_I  = ` struct.Struct('<I') `
|  __package__  = ` ` ' ` ` roslib ` ` ' ` `
Function Details
---

|


[ Branches  ](/ros-controls/ros_controllers/branches) [ Tags  ](/ros-
controls/ros_controllers/tags)


Readme


Repositories


[ ](https://github.com/)


  * [ ackermann_steering_c... ](/ackermann_steering_controller?distro=noetic)
  * [ catkin ](/catkin?distro=noetic)
  * [ diff_drive_controlle... ](/diff_drive_controller?distro=noetic)
  * [ effort_controllers ](/effort_controllers?distro=noetic)
  * [ force_torque_sensor_... ](/force_torque_sensor_controller?distro=noetic)
  * [ forward_command_cont... ](/forward_command_controller?distro=noetic)
  * [ gripper_action_contr... ](/gripper_action_controller?distro=noetic)
  * [ imu_sensor_controlle... ](/imu_sensor_controller?distro=noetic)
  * [ joint_state_controll... ](/joint_state_controller?distro=noetic)
  * [ joint_trajectory_con... ](/joint_trajectory_controller?distro=noetic)
  * [ position_controllers... ](/position_controllers?distro=noetic)
  * [ velocity_controllers... ](/velocity_controllers?distro=noetic)


#  Provide feedback


Returns: Message class


[ ![ gravatar image]() ]() [ ]() (  2024-04-16 17:00:40 -0500  )  edit


|  [ source code ](roslib.message-pysrc.html#get_printable_message_args)
---|---

Get string representation of msg arguments


We read every piece of feedback, and take your input very seriously.


##  Stats


[ qt_gui_cpp ros2 does not build without warnings
](/question/328503/qt_gui_cpp-ros2-does-not-build-without-warnings/)


* **hydro:** _Documentation generated on August 28, 2015 at 12:37 PM_ ( [ doc job ](http://jenkins.ros.org/job/doc-hydro-ros_controllers/) ).


[ Error when Custom messages will be built ](/question/355843/error-when-
custom-messages-will-be-built/)


ROS Resources: [ Documentation ](http://wiki.ros.org/) | [ Support
](http://wiki.ros.org/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---

_Attention:_ Answers.ros.org is deprecated as of August the 11th, 2023. Please
visit [ robotics.stackexchange.com ](http://robotics.stackexchange.com) to ask
a new question. This site will remain online in read-only mode during the
transition and into the foreseeable future. Selected questions and answers
have been migrated, and redirects have been put in place to direct users to
the corresponding questions on Robotics Stack Exchange. Additional details are
[ available here ](https://discourse.ros.org/t/ros-and-gazebo-answers-
migration-to-robotics-stack-exchange-process/31494) .


###  License


[ **asked 2021-06-15 11:09:12 -0500  ** ](/questions/380351/revisions/)


[ gripper_action_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/gripper_action_controller "gripper_action_controller")


Library of ros controllers


** Dependencies  (12) **


* [ Pricing ](/pricing)


* [ ros2 ](/questions/scope:all/sort:activity-desc/tags:ros2/page:1/)


Documented


Explore


[ source code ](roslib.message-pysrc.html)


Here is how I am importing them in the ControlFramework.cpp file


**Package Links**


##  ControlFramework.cpp


* **noetic:** _Documentation generated on March 03, 2024 at 11:15 AM_ ( [ doc job ](https://build.ros.org/view/Ndoc/job/Ndoc__ros_controllers__ubuntu_focal_amd64) ).


No packages published


[ How to get a command line value in the launch file ](/question/403661/how-
to-get-a-command-line-value-in-the-launch-file/)


[ rqt_joint_trajectory_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/rqt_joint_trajectory_controller "rqt_joint_trajectory_controller")


[ diff_drive_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/diff_drive_controller "diff_drive_controller")


    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)


[ subscribe to rss feed ](/feeds/question/380351/ "subscribe to the rss feed")


#  ros_controllers


[ Star  ](/login?return_to=%2Fros-controls%2Fros_controllers)


[ none ](/questions/scope:all/sort:activity-desc/tags:none/page:1/) ×


[ ros-controls ](/ros-controls) /  **[ ros_controllers ](/ros-
controls/ros_controllers) ** Public


If you find this work useful please give credits to the authors by citing:


1. Publication


[ joint_trajectory_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/joint_trajectory_controller "joint_trajectory_controller")


  * Maintainer status: maintained
  * Maintainer: Adolfo Rodriguez Tsouroukdissian <adolfo.rodriguez AT pal-robotics DOT com>, Bence Magyar <bence.magyar.robotics AT gmail DOT com>, Dave Coleman <davetcoleman AT gmail DOT com>, Enrique Fernandez <enrique.fernandez.perdomo AT gmail DOT com>
  * Author: Wim Meeussen
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros-controls/ros_controllers/issues ](https://github.com/ros-controls/ros_controllers/issues)
  * Source: git [ https://github.com/ros-controls/ros_controllers.git ](https://github.com/ros-controls/ros_controllers) (branch: kinetic-devel)


[ wiki.ros.org/ros_control ](http://wiki.ros.org/ros_control
"http://wiki.ros.org/ros_control")


* [ pluginlib ](/questions/scope:all/sort:activity-desc/tags:pluginlib/page:1/)


The site is read-only. Please transition to use Robotics Stack Exchange


Raises:


**Package Links**


[ LICENSE ](/ros-controls/ros_controllers/blob/noetic-devel/LICENSE "LICENSE")


    @article{ros_control,
    author = {Chitta, Sachin and Marder-Eppstein, Eitan and Meeussen, Wim and Pradeep, Vijay and Rodr{\'i}guez Tsouroukdissian, Adolfo  and Bohren, Jonathan and Coleman, David and Magyar, Bence and Raiola, Gennaro and L{\"u}dtke, Mathias and Fern{\'a}ndez Perdomo, Enrique},
    title = {ros\_control: A generic and simple control framework for ROS},
    journal = {The Journal of Open Source Software},
    year = {2017},
    doi = {10.21105/joss.00456},
    URL = {http://www.theoj.org/joss-papers/joss.00456/10.21105.joss.00456.pdf}
    }


add a comment


    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)


  * **` service_type ` ** (str) - type name of service
  * **` reload_on_error ` ** \- (optional). Attempt to reload the Python module if unable to load message the first time. Defaults to False. This is necessary if messages are built after the first load.


Follow


####  ROS 2 Documentation


Parameters:


fill_message_args also takes in an optional 'keys' dictionary which contain
substitute values for message and time types. These values must be of the
correct instance type, i.e. a Message, Time, or Duration. In a string key is
encountered with these types, the value from the keys dictionary will be used
instead. This is mainly used to provide values for the 'now' timestamp.


This commit does not belong to any branch on this repository, and may belong
to a fork outside of the repository.


|  [ source code ](roslib.message-pysrc.html#get_service_class)
---|---

Get the service class. NOTE: this function maintains a local cache of results
to improve performance.


Library of ros controllers


Code


[ Colcon Build Error with ROS2 Eloquent and Libtorch
](/question/352530/colcon-build-error-with-ros2-eloquent-and-libtorch/)


##  Footer


[ Custom properties  ](/ros-controls/ros_controllers/custom-properties)


Continuous Integration


Asked: ** 2021-06-15 11:09:12 -0500  **


    * [ Topics ](/topics)
    * [ Trending ](/trending)
    * [ Collections ](/collections)


Contents


[ joint_state_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/joint_state_controller "joint_state_controller")


[ .gitignore ](/ros-controls/ros_controllers/blob/noetic-devel/.gitignore
".gitignore")


Search or jump to...


Clear


Generic robotic controllers to accompany ros_control


[ forward_command_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/forward_command_controller "forward_command_controller")


  * S. Chitta, E. Marder-Eppstein, W. Meeussen, V. Pradeep, A. Rodríguez Tsouroukdissian, J. Bohren, D. Coleman, B. Magyar, G. Raiola, M. Lüdtke and E. Fernandez Perdomo
    * "ros_control: A generic and simple control framework for ROS"
    * The Journal of Open Source Software, 2017. [ PDF ](http://www.theoj.org/joss-papers/joss.00456/10.21105.joss.00456.pdf)


  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ros_controllers/page:1/)
  * [ Changelog ](http://docs.ros.org/en/hydro/changelogs/ros_controllers/changelog.html)
  * [ Change List ](/ros_controllers/ChangeList)
  * [ Reviews ](/ros_controllers/Reviews)


Indigo  |  Kinetic  |  Lunar  |  Melodic  |  Noetic
---|---|---|---|---
[ ![Build
Status](https://camo.githubusercontent.com/288c12c167a882842c5c78e289f2d01cea6c21b3e4926ed31137092cbb97239c/68747470733a2f2f7472617669732d63692e6f72672f726f732d636f6e74726f6c732f726f735f636f6e74726f6c6c6572732e706e673f6272616e63683d696e6469676f2d646576656c)
](https://travis-ci.org/ros-controls/ros_controllers) |  [ ![Build
Status](https://camo.githubusercontent.com/aa6d3d87c7e43ec9e747187752a7ba3250f432540b5c5adaf8545592543d825e/68747470733a2f2f7472617669732d63692e6f72672f726f732d636f6e74726f6c732f726f735f636f6e74726f6c6c6572732e706e673f6272616e63683d6b696e657469632d646576656c)
](https://travis-ci.org/ros-controls/ros_controllers) |  [ ![Build
Status](https://camo.githubusercontent.com/aa6d3d87c7e43ec9e747187752a7ba3250f432540b5c5adaf8545592543d825e/68747470733a2f2f7472617669732d63692e6f72672f726f732d636f6e74726f6c732f726f735f636f6e74726f6c6c6572732e706e673f6272616e63683d6b696e657469632d646576656c)
](https://travis-ci.org/ros-controls/ros_controllers) |  [ ![Build
Status](https://camo.githubusercontent.com/eca27c6f58278efa76276fde346f041ccde83f4eb631ef15ac66201b62bfe741/68747470733a2f2f7472617669732d63692e6f72672f726f732d636f6e74726f6c732f726f735f636f6e74726f6c6c6572732e706e673f6272616e63683d6d656c6f6469632d646576656c)
](https://travis-ci.org/ros-controls/ros_controllers) |  [ ![Build
Status](https://camo.githubusercontent.com/25e8514fd8d4c412384b20b1b7eb42fa25b49684227a06d0801c383d3f61efd0/68747470733a2f2f7472617669732d63692e6f72672f726f732d636f6e74726f6c732f726f735f636f6e74726f6c6c6572732e706e673f6272616e63683d6e6f657469632d646576656c)
](https://travis-ci.org/ros-controls/ros_controllers)

###  Branches for source-based installation


  * [ romeo_dcm_control ](/romeo_dcm_control?distro=jade)
  * [ schunk_canopen_drive... ](/schunk_canopen_driver?distro=jade)


[ Interfacing a native DDS system with ROS2? ](/question/298621/interfacing-a-
native-dds-system-with-ros2/)


_**ros_controllers** : [ ackermann_steering_controller
](/ackermann_steering_controller?distro=lunar) | [ diff_drive_controller
](/diff_drive_controller?distro=lunar) | [ effort_controllers
](/effort_controllers?distro=lunar) | [ force_torque_sensor_controller
](/force_torque_sensor_controller?distro=lunar) | [ forward_command_controller
](/forward_command_controller?distro=lunar) | [ gripper_action_controller
](/gripper_action_controller?distro=lunar) | [ imu_sensor_controller
](/imu_sensor_controller?distro=lunar) | [ joint_state_controller
](/joint_state_controller?distro=lunar) | [ joint_trajectory_controller
](/joint_trajectory_controller?distro=lunar) | [ position_controllers
](/position_controllers?distro=lunar) | [ rqt_joint_trajectory_controller
](/rqt_joint_trajectory_controller?distro=lunar) | [ velocity_controllers
](/velocity_controllers?distro=lunar) _


#  Package Summary


  * Immutable Page
  * Comments
  * [ Info ](/action/info/ros_controllers?action=info)
  * [ Attachments ](/action/AttachFile/ros_controllers?action=AttachFile)
  * More Actions:  Raw Text  Print View  Render as Docbook  Delete Cache  \------------------------  Check Spelling  Like Pages  Local Site Map  \------------------------  Rename Page  Copy Page  Delete Page  \------------------------  My Pages  Subscribe User  \------------------------  Remove Spam  Revert to this revision  Package Pages  Sync Pages  \------------------------  CreatePdfDocument  Load  RawFile  Save  SlideShow


Released


** Dependencies  (12) **


Continuous Integration


  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information


Additional navigation options


Toggle navigation


* [ webots_ros ](/webots_ros?distro=noetic)


  * **` field_name ` ** (str) - ROS .msg field name
  * **` field_type ` ** (str) - ROS .msg field type
  * **` field_val ` ** (Any) - field value


  * [ Notifications ](/login?return_to=%2Fros-controls%2Fros_controllers)
  * [ Fork  522  ](/login?return_to=%2Fros-controls%2Fros_controllers)
  * [ Star  532  ](/login?return_to=%2Fros-controls%2Fros_controllers)


  * Build history (last 3 of 3 builds):
  * [ #42  31-Jan-2023 17:37  292 / 293  ](https://build.ros.org//job/Mdev__ros_controllers__ubuntu_bionic_amd64/42/)
  * [ #41  20-Jan-2021 16:37  292 / 293  ](https://build.ros.org//job/Mdev__ros_controllers__ubuntu_bionic_amd64/41/)
  * [ #38  12-May-2020 07:37  293 / 293  ](https://build.ros.org//job/Mdev__ros_controllers__ubuntu_bionic_amd64/38/)


[ .clang-format ](/ros-controls/ros_controllers/blob/noetic-devel/.clang-
format ".clang-format")


  * [ abb_irb120_gazebo ](/abb_irb120_gazebo?distro=indigo)
  * [ aubo_gazebo ](/aubo_gazebo?distro=indigo)
  * [ aubo_new_driver ](/aubo_new_driver?distro=indigo)
  * [ cirkit_unit03_contro... ](/cirkit_unit03_control?distro=indigo)
  * [ gazebo_mimic ](/gazebo_mimic?distro=indigo)
  * [ kuka_kr10_gazebo ](/kuka_kr10_gazebo?distro=indigo)
  * [ nao_gazebo_plugin ](/nao_gazebo_plugin?distro=indigo)
  * [ nextage_gazebo ](/nextage_gazebo?distro=indigo)
  * [ pepper_gazebo_plugin... ](/pepper_gazebo_plugin?distro=indigo)
  * [ romeo_control ](/romeo_control?distro=indigo)
  * [ romeo_dcm_control ](/romeo_dcm_control?distro=indigo)
  * [ romeo_gazebo_plugin ](/romeo_gazebo_plugin?distro=indigo)
  * [ ros_control_boilerpl... ](/ros_control_boilerplate?distro=indigo)
  * [ schunk_canopen_drive... ](/schunk_canopen_driver?distro=indigo)
  * [ staubli_rx160_gazebo... ](/staubli_rx160_gazebo?distro=indigo)
  * [ staubli_tx90_gazebo ](/staubli_tx90_gazebo?distro=indigo)
  * [ summit_x_control ](/summit_x_control?distro=indigo)
  * [ summit_xl_control ](/summit_xl_control?distro=indigo)
  * [ yumi_control ](/yumi_control?distro=indigo)


[ force_torque_sensor_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/force_torque_sensor_controller "force_torque_sensor_controller")


Continuous Integration:  292 / 293


###  Footer navigation


ROS Indigo  |  ROS Kinetic  |  ROS Lunar  |  ROS Melodic
---|---|---|---
indigo-devel  |  kinetic-devel  |  kinetic-devel  |  melodic-devel

##  Publication


* S. Chitta, E. Marder-Eppstein, W. Meeussen, V. Pradeep, A. Rodríguez Tsouroukdissian, J. Bohren, D. Coleman, B. Magyar, G. Raiola, M. Lüdtke and E. Fernandez Perdomo **"ros_control: A generic and simple control framework for ROS"** , The Journal of Open Source Software, 2017. ( [ PDF ](http://www.theoj.org/joss-papers/joss.00456/10.21105.joss.00456.pdf) )


###  Build Status


[ imu_sensor_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/imu_sensor_controller "imu_sensor_controller")


Creating Multiple Plugins from Single Package in ROS2


Last commit message


Released


[ effort_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/effort_controllers "effort_controllers")


  * [ catkin ](/catkin?distro=jade)
  * [ diff_drive_controlle... ](/diff_drive_controller?distro=jade)
  * [ effort_controllers ](/effort_controllers?distro=jade)
  * [ force_torque_sensor_... ](/force_torque_sensor_controller?distro=jade)
  * [ forward_command_cont... ](/forward_command_controller?distro=jade)
  * [ gripper_action_contr... ](/gripper_action_controller?distro=jade)
  * [ imu_sensor_controlle... ](/imu_sensor_controller?distro=jade)
  * [ joint_state_controll... ](/joint_state_controller?distro=jade)
  * [ joint_trajectory_con... ](/joint_trajectory_controller?distro=jade)
  * [ position_controllers... ](/position_controllers?distro=jade)
  * [ rqt_joint_trajectory... ](/rqt_joint_trajectory_controller?distro=jade)
  * [ velocity_controllers... ](/velocity_controllers?distro=jade)


##  1  Answer


Cancel  Submit feedback


[ README.md ](/ros-controls/ros_controllers/blob/noetic-devel/README.md
"README.md")


[ lukicdarkoo ](/users/44970/lukicdarkoo/)
486  ●  3  ●  28  ●  17  [ https://spes.ai ](https://spes.ai "lukicdarkoo's
website is https://spes.ai")


First time here? Check out the FAQ!


** Used by  (19) **


##  History


** Dependencies  (13) **


* [ Login ](/action/login/ros_controllers?action=login)


3 followers


[ Documentation Status ](javascript:toggleDocStatus\(\))


##  Folders and files


[ ros_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/ros_controllers "ros_controllers")


** Dependencies  (12) **


  * [ ackermann_steering_c... ](/ackermann_steering_controller?distro=lunar)
  * [ catkin ](/catkin?distro=lunar)
  * [ diff_drive_controlle... ](/diff_drive_controller?distro=lunar)
  * [ effort_controllers ](/effort_controllers?distro=lunar)
  * [ force_torque_sensor_... ](/force_torque_sensor_controller?distro=lunar)
  * [ forward_command_cont... ](/forward_command_controller?distro=lunar)
  * [ gripper_action_contr... ](/gripper_action_controller?distro=lunar)
  * [ imu_sensor_controlle... ](/imu_sensor_controller?distro=lunar)
  * [ joint_state_controll... ](/joint_state_controller?distro=lunar)
  * [ joint_trajectory_con... ](/joint_trajectory_controller?distro=lunar)
  * [ position_controllers... ](/position_controllers?distro=lunar)
  * [ rqt_joint_trajectory... ](/rqt_joint_trajectory_controller?distro=lunar)
  * [ velocity_controllers... ](/velocity_controllers?distro=lunar)


_**ros_controllers** : [ diff_drive_controller
](/diff_drive_controller?distro=jade) | [ effort_controllers
](/effort_controllers?distro=jade) | [ force_torque_sensor_controller
](/force_torque_sensor_controller?distro=jade) | [ forward_command_controller
](/forward_command_controller?distro=jade) | [ gripper_action_controller
](/gripper_action_controller?distro=jade) | [ imu_sensor_controller
](/imu_sensor_controller?distro=jade) | [ joint_state_controller
](/joint_state_controller?distro=jade) | [ joint_trajectory_controller
](/joint_trajectory_controller?distro=jade) | [ position_controllers
](/position_controllers?distro=jade) | [ rqt_joint_trajectory_controller
](/rqt_joint_trajectory_controller?distro=jade) | [ velocity_controllers
](/velocity_controllers?distro=jade) _


###  check_type  (  field_name  ,  field_type  ,  field_val  )


Documented


[ BSD-3-Clause license ](/ros-controls/ros_controllers/blob/noetic-
devel/LICENSE)


  * [ catkin ](/catkin?distro=indigo)
  * [ diff_drive_controlle... ](/diff_drive_controller?distro=indigo)
  * [ effort_controllers ](/effort_controllers?distro=indigo)
  * [ force_torque_sensor_... ](/force_torque_sensor_controller?distro=indigo)
  * [ forward_command_cont... ](/forward_command_controller?distro=indigo)
  * [ gripper_action_contr... ](/gripper_action_controller?distro=indigo)
  * [ imu_sensor_controlle... ](/imu_sensor_controller?distro=indigo)
  * [ joint_state_controll... ](/joint_state_controller?distro=indigo)
  * [ joint_trajectory_con... ](/joint_trajectory_controller?distro=indigo)
  * [ position_controllers... ](/position_controllers?distro=indigo)
  * [ rqt_joint_trajectory... ](/rqt_joint_trajectory_controller?distro=indigo)
  * [ velocity_controllers... ](/velocity_controllers?distro=indigo)


[ joint_trajectory_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/joint_trajectory_controller "joint_trajectory_controller")


[ LICENSE ](/ros-controls/ros_controllers/blob/noetic-devel/LICENSE "LICENSE")


  * **` val ` ** (Value) - to convert to string representation. Most likely a Message.
  * **` indent ` ** (str) - indentation. If indent is set, then the return value will have a leading
  * **` time_offset ` ** (Time) - if not None, time fields will be displayed as deltas from time_offset
  * **` current_time ` ** (Time) - currently not used. Only provided for API compatibility. current_time passes in the current time with respect to the message.
  * **` field_filter ` ** (fn(Message)->iter(str)) - filter the fields that are strified for Messages.


    #include <iostream>
    #include <pluginlib/class_loader.hpp>
    #include <controller/Controller.h>

    int main(int argc, char** argv)
    {
      pluginlib::ClassLoader<control_base::Controller> ctrl_loader("controller", "control_base::Controller");

      try
      {
        std::cout << "Create Controller 1\n";
        std::shared_ptr<control_base::Controller> ctrl1 = ctrl_loader.createSharedInstance("linear_controller::LinearController1");
        std::cout << "Init Controller 1\n";
        ctrl1->initialize(10.0, 0.0, 0.0);
        std::cout << "Controller Output 1: " << ctrl1->computeFeedback(2.0) << "\n";

        std::cout << "Create Controller 2\n";
        std::shared_ptr<control_base::Controller> ctrl2 = ctrl_loader.createSharedInstance("linear_controller::LinearController2");
        std::cout << "Init Controller 2\n";
        ctrl2->initialize(5.0, 0.0, 0.0);
        std::cout << "Controller Output 2: " << ctrl2->computeFeedback(2.0) << "\n";
      }
      catch(pluginlib::PluginlibException& ex)
      {
        std::cout << "The plugin failed to load for some reason. Error: " << ex.what() << "\n";
      }

      return 0;
    }


** Jenkins jobs  (6) **


[ Home ](roslib-module.html) |  [ Trees ](module-tree.html) |  [ Indices
](identifier-index.html) |  [ Help ](help.html) |  |  [ roslib
](http://ros.org/wiki/rospy)
---
[ Package roslib ](roslib-module.html) :: Module message  |  |  [ [ frames
](frames.html) ] | [ no frames ](roslib.message-module.html) ]
---

#  Module message


Released


** Used by  (2) **


[ ![cc-by-sa](/m/default/media/images/cc-by-sa.png?v=28)
](http://creativecommons.org/licenses/by-sa/3.0/legalcode) ROS Answers is
licensed under Creative Commons Attribution 3.0 Content on this site is
licensed under a [ Creative Commons Attribution Share Alike 3.0
](http://creativecommons.org/licenses/by-sa/3.0/legalcode) license.


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/eventemitter3@latest/dist/eventemitter3.umd.min.js"></script>
<script src="../dist/RosLib.umd.cjs"></script>
<script>
  // Connecting to ROS
  // -----------------
  var ros = new ROSLIB.Ros({
    url : 'ws://localhost:9090'
  });
  // If there is an error on the backend, an 'error' emit will be emitted.
  ros.on('error', function(error) {
    document.getElementById('connecting').style.display = 'none';
    document.getElementById('connected').style.display = 'none';
    document.getElementById('closed').style.display = 'none';
    document.getElementById('error').style.display = 'inline';
    console.log(error);
  });
  // Find out exactly when we made a connection.
  ros.on('connection', function() {
    console.log('Connection made!');
    document.getElementById('connecting').style.display = 'none';
    document.getElementById('error').style.display = 'none';
    document.getElementById('closed').style.display = 'none';
    document.getElementById('connected').style.display = 'inline';
  });
  ros.on('close', function() {
    console.log('Connection closed.');
    document.getElementById('connecting').style.display = 'none';
    document.getElementById('connected').style.display = 'none';
    document.getElementById('closed').style.display = 'inline';
  });
  // The ActionClient
  // ----------------
  var fibonacciClient = new ROSLIB.Action({
    ros : ros,
    name : '/fibonacci',
    actionType : 'action_tutorials_interfaces/Fibonacci'


[ force_torque_sensor_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/force_torque_sensor_controller "force_torque_sensor_controller")


* **melodic:** _Documentation generated on February 03, 2023 at 11:14 AM_ ( [ doc job ](https://build.ros.org/view/Mdoc/job/Mdoc__ros_controllers__ubuntu_bionic_amd64) ).


[ effort_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/effort_controllers "effort_controllers")


###  Forks


_**ros_controllers** : [ diff_drive_controller
](/diff_drive_controller?distro=hydro) | [ effort_controllers
](/effort_controllers?distro=hydro) | [ force_torque_sensor_controller
](/force_torque_sensor_controller?distro=hydro) | [ forward_command_controller
](/forward_command_controller?distro=hydro) | [ gripper_action_controller
](/gripper_action_controller?distro=hydro) | [ imu_sensor_controller
](/imu_sensor_controller?distro=hydro) | [ joint_state_controller
](/joint_state_controller?distro=hydro) | [ joint_trajectory_controller
](/joint_trajectory_controller?distro=hydro) | [ position_controllers
](/position_controllers?distro=hydro) | [ velocity_controllers
](/velocity_controllers?distro=hydro) _


  * [ doosan_robotics ](/doosan_robotics?distro=melodic)
  * [ gundam_rx78_control ](/gundam_rx78_control?distro=melodic)
  * [ nextage_gazebo ](/nextage_gazebo?distro=melodic)
  * [ staubli_rx160_gazebo... ](/staubli_rx160_gazebo?distro=melodic)
  * [ staubli_tx90_gazebo ](/staubli_tx90_gazebo?distro=melodic)
  * [ webots_ros ](/webots_ros?distro=melodic)


  * **` message_type ` ** (str) - type name of message
  * **` reload_on_error ` ** \- (optional). Attempt to reload the Python module if unable to load message the first time. Defaults to False. This is necessary if messages are built after the first load.


Parameters:


[ ackermann_steering_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/ackermann_steering_controller "ackermann_steering_controller")


#  Wiki


[ Odom not published when using image_transport_plugins
](/question/413434/odom-not-published-when-using-image_transport_plugins/)


[ forward_command_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/forward_command_controller "forward_command_controller")


|  [ source code ](roslib.message-pysrc.html#check_type)
---|---

Dynamic type checker that maps ROS .msg types to python types and verifies the
python value. check_type() is not designed to be fast and is targeted at error
diagnosis. This type checker is not designed to run fast and is meant only for
error diagnosis.


[ edit ](/questions/380351/edit/) [ retag ](/s/questions/380351/retag/) flag
offensive  [ close ](/questions/380351/close/) merge  delete


##  [ Packages  0  ](/orgs/ros-controls/packages?repo_name=ros_controllers)


[ 532  stars ](/ros-controls/ros_controllers/stargazers) [ 522  forks ](/ros-
controls/ros_controllers/forks) [ Branches  ](/ros-
controls/ros_controllers/branches) [ Tags  ](/ros-
controls/ros_controllers/tags) [ Activity  ](/ros-
controls/ros_controllers/activity)


* **indigo:** _Documentation generated on June 07, 2019 at 02:50 AM_ ( [ doc job ](http://build.ros.org/view/Idoc/job/Idoc__ros_controllers__ubuntu_trusty_amd64) ).


##  [ Releases ](/ros-controls/ros_controllers/releases)


To see all available qualifiers, see our [ documentation
](https://docs.github.com/search-github/github-code-search/understanding-
github-code-search-syntax) .


     Message class for message/service type
Raises:


* Open Source


add a comment


#  ros-controls/ros_controllers


Name  |  Name  |


[ \+ 64 contributors ](/ros-controls/ros_controllers/graphs/contributors)


###  Watchers


  * [ Distributions ](/Distributions)
  * [ ROS/Installation ](/ROS/Installation)
  * [ ROS/Tutorials ](/ROS/Tutorials)
  * [ RecentChanges ](/RecentChanges)
  * [ ros_controllers ](/ros_controllers)


  * Maintainer status: maintained
  * Maintainer: Bence Magyar <bence.magyar.robotics AT gmail DOT com>, Mathias Lüdtke <mathias.luedtke AT ipa.fraunhofer DOT de>, Enrique Fernandez <enrique.fernandez.perdomo AT gmail DOT com>
  * Author: Wim Meeussen
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros-controls/ros_controllers/issues ](https://github.com/ros-controls/ros_controllers/issues)
  * Source: git [ https://github.com/ros-controls/ros_controllers.git ](https://github.com/ros-controls/ros_controllers) (branch: noetic-devel)


  * **` msg ` ** (Message) - message to fill
  * **` msg_args ` ** ([args]) - list of arguments to set fields to, or If None, msg_args will be made an empty list.
  * **` keys ` ** (dict) - keys to use as substitute values for messages and timestamps.


[ rqt_joint_trajectory_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/rqt_joint_trajectory_controller "rqt_joint_trajectory_controller")


Documented


  *[
              2021-06-15 11:09:12 -0500
             ]: 2021-06-15 11:09:12 -0500
  *[
              2021-06-27 04:45:10 -0500
             ]: 2021-06-27 04:45:10 -0500
  *[
        2021-06-15 11:09:12 -0500
       ]: 2021-06-15 11:09:12 -0500
  *[
        2024-04-16 17:00:40 -0500
       ]: 2024-04-16 17:00:40 -0500


[ Home ](roslib-module.html) |  [ Trees ](module-tree.html) |  [ Indices
](identifier-index.html) |  [ Help ](help.html) |  |  [ roslib
](http://ros.org/wiki/rospy)
---
Generated by Epydoc 3.0.1 on Fri Jan 11 10:12:15 2013  |  [
http://epydoc.sourceforge.net ](http://epydoc.sourceforge.net)
---|---


[ ROS2 Node sleeps forever after setting parameter
](/question/350245/ros2-node-sleeps-forever-after-setting-parameter/)


[ .github/  workflows  ](/ros-controls/ros_controllers/tree/noetic-
devel/.github/workflows "This path skips through empty directories")


Returns: Service class


[ ROS2 subs/pubs stop working after node restart
](/question/402000/ros2-subspubs-stop-working-after-node-restart/)


     string (YAML) representation of message

|


I don't have your CMake file, but the problem is probably hidden there.


Except where otherwise noted, the ROS wiki is licensed under the
[ Creative Commons Attribution 3.0
](http://creativecommons.org/licenses/by/3.0/)


* **jade:** _Documentation generated on August 13, 2016 at 10:54 AM_ ( [ doc job ](http://build.ros.org/view/Jdoc/job/Jdoc__ros_controllers__ubuntu_trusty_amd64) ).


Go to file


  * Build history (last 3 of 21 builds):
  * [ #53  01-Mar-2024 13:11  300 / 300  ](https://build.ros.org//job/Ndev__ros_controllers__ubuntu_focal_amd64/53/)
  * [ #50  27-Oct-2023 16:11  300 / 300  ](https://build.ros.org//job/Ndev__ros_controllers__ubuntu_focal_amd64/50/)
  * [ #49  03-Sep-2023 13:11  300 / 300  ](https://build.ros.org//job/Ndev__ros_controllers__ubuntu_focal_amd64/49/)


** Dependencies  (11) **


###  get_printable_message_args  (  msg  ,  buff  =  None  ,  prefix  =  ` ' `
` ` ` ' ` )


** Used by  (6) **


  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ros_controllers/page:1/)
  * [ Changelog ](http://docs.ros.org/en/indigo/changelogs/ros_controllers/changelog.html)
  * [ Change List ](/ros_controllers/ChangeList)
  * [ Reviews ](/ros_controllers/Reviews)


_**ros_controllers** : [ ackermann_steering_controller
](/ackermann_steering_controller?distro=noetic) | [ diff_drive_controller
](/diff_drive_controller?distro=noetic) | [ effort_controllers
](/effort_controllers?distro=noetic) | [ force_torque_sensor_controller
](/force_torque_sensor_controller?distro=noetic) | [
forward_command_controller ](/forward_command_controller?distro=noetic) | [
gripper_action_controller ](/gripper_action_controller?distro=noetic) | [
imu_sensor_controller ](/imu_sensor_controller?distro=noetic) | [
joint_state_controller ](/joint_state_controller?distro=noetic) | [
joint_trajectory_controller ](/joint_trajectory_controller?distro=noetic) | [
position_controllers ](/position_controllers?distro=noetic) | [
velocity_controllers ](/velocity_controllers?distro=noetic) _


[ joint_state_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/joint_state_controller "joint_state_controller")


Released


[ diff_drive_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/diff_drive_controller "diff_drive_controller")


Documented


**Package Links**


Library of ros controllers


##  Related questions


* **kinetic:** _Documentation generated on April 18, 2020 at 03:53 AM_ ( [ doc job ](http://build.ros.org/view/Kdoc/job/Kdoc__ros_controllers__ubuntu_xenial_amd64) ).


###  get_service_class  (  service_type  ,  reload_on_error  =  False  )


Returns: str


[ .gitignore ](/ros-controls/ros_controllers/blob/noetic-devel/.gitignore
".gitignore")


edit


[ Activity  ](/ros-controls/ros_controllers/activity)


  * [ source ubuntu bionic ](https://build.ros.org/view/Msrc_uB/job/Msrc_uB__ros_controllers__ubuntu_bionic__source)
  * [ binary ubuntu bionic amd64 ](https://build.ros.org/view/Mbin_uB64/job/Mbin_uB64__ros_controllers__ubuntu_bionic_amd64__binary)
  * [ binary ubuntu bionic armhf ](https://build.ros.org/view/Mbin_ubhf_uBhf/job/Mbin_ubhf_uBhf__ros_controllers__ubuntu_bionic_armhf__binary)
  * [ binary ubuntu bionic arm64 ](https://build.ros.org/view/Mbin_ubv8_uBv8/job/Mbin_ubv8_uBv8__ros_controllers__ubuntu_bionic_arm64__binary)
  * [ devel ubuntu bionic amd64 ](https://build.ros.org/view/Mdev/job/Mdev__ros_controllers__ubuntu_bionic_amd64)
  * [ doc ](https://build.ros.org/view/Mdoc/job/Mdoc__ros_controllers__ubuntu_bionic_amd64)


  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ros_controllers/page:1/)
  * [ Changelog ](http://docs.ros.org/en/jade/changelogs/ros_controllers/changelog.html)
  * [ Change List ](/ros_controllers/ChangeList)
  * [ Reviews ](/ros_controllers/Reviews)


|  [ source code ](roslib.message-pysrc.html#fill_message_args)
---|---

Populate message with specified args. Args are assumed to be a list of
arguments from a command-line YAML parser. See
http://www.ros.org/wiki/ROS/YAMLCommandLine for specification on how messages
are filled.


Parameters:


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fros-
controls%2Fros_controllers)


Released


[ ![ros.org](/custom/images/ros_org.png) ](/) |  [ About
](http://www.ros.org/about-ros) | [ Support ](/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---|---
![](/custom/images/menu_left.png) [
![Documentation](/custom/images/menu_documentation.png) ](/)
![](/custom/images/menu_spacer.png) [ ![Browse
Software](/custom/images/menu_browse_software.png)
](https://index.ros.org/packages) ![](/custom/images/menu_spacer.png) [
![News](/custom/images/menu_news.png) ](https://discourse.ros.org/c/general)
![](/custom/images/menu_spacer.png) [
![Download](/custom/images/menu_download.png) ](/ROS/Installation)
![](/custom/images/menu_right.png)

  * [ ros_controllers ](/ros_controllers)


Sort by »  [ oldest  ](/question/380351/creating-multiple-plugins-from-single-
package-in-ros2/?sort=oldest#sort-top) [ newest  ](/question/380351/creating-
multiple-plugins-from-single-package-in-ros2/?sort=latest#sort-top) [ most
voted  ](/question/380351/creating-multiple-plugins-from-single-package-in-
ros2/?sort=votes#sort-top)


  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ros_controllers/page:1/)
  * [ Changelog ](http://docs.ros.org/en/lunar/changelogs/ros_controllers/changelog.html)
  * [ Change List ](/ros_controllers/ChangeList)
  * [ Reviews ](/ros_controllers/Reviews)


Include my email address so I can be contacted


You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert


noetic-devel


[ Powered by Askbot version 0.10.2 ](http://askbot.com)


[ ![GusBus gravatar
image](//www.gravatar.com/avatar/24af4ab27c0c929697640772070f54c0?s=32&d=identicon&r=PG)
](/users/26964/gusbus/)


_EOL distros:_ hydro  indigo  jade  kinetic  lunar


** Used by  (13) **


  * Maintainer status: developed
  * Maintainer: Adolfo Rodriguez Tsouroukdissian <adolfo.rodriguez AT pal-robotics DOT com>, Dave Coleman <davetcoleman AT gmail DOT com>
  * Author: Wim Meeussen
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros-controls/ros_controllers/issues ](https://github.com/ros-controls/ros_controllers/issues)
  * Source: git [ https://github.com/ros-controls/ros_controllers.git ](https://github.com/ros-controls/ros_controllers) (branch: indigo-devel)


|  [ source code ](roslib.message-pysrc.html#get_message_class)
---|---

Get the message class. NOTE: this function maintains a local cache of results
to improve performance.


  * Maintainer status: maintained
  * Maintainer: Bence Magyar <bence.magyar.robotics AT gmail DOT com>, Mathias Lüdtke <mathias.luedtke AT ipa.fraunhofer DOT de>, Enrique Fernandez <enrique.fernandez.perdomo AT gmail DOT com>
  * Author: Wim Meeussen
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros-controls/ros_controllers/issues ](https://github.com/ros-controls/ros_controllers/issues)
  * Source: git [ https://github.com/ros-controls/ros_controllers.git ](https://github.com/ros-controls/ros_controllers) (branch: melodic-devel)


I am experimenting with the pluginlib and wondering if it is possible to
create two plugin classes from a single package? Is it recommended to rather
do separate packages for the different classes?


_**ros_controllers** : [ ackermann_steering_controller
](/ackermann_steering_controller?distro=melodic) | [ diff_drive_controller
](/diff_drive_controller?distro=melodic) | [ effort_controllers
](/effort_controllers?distro=melodic) | [ force_torque_sensor_controller
](/force_torque_sensor_controller?distro=melodic) | [
forward_command_controller ](/forward_command_controller?distro=melodic) | [
gripper_action_controller ](/gripper_action_controller?distro=melodic) | [
imu_sensor_controller ](/imu_sensor_controller?distro=melodic) | [
joint_state_controller ](/joint_state_controller?distro=melodic) | [
joint_trajectory_controller ](/joint_trajectory_controller?distro=melodic) | [
position_controllers ](/position_controllers?distro=melodic) | [
velocity_controllers ](/velocity_controllers?distro=melodic) _


It is definitely possible to have multiple plugins within a single package,
see the example here:
[ https://github.com/cyberbotics/webots...
](https://github.com/cyberbotics/webots_ros2/tree/master/webots_ros2_control)


**Package Links**


[ position_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/position_controllers "position_controllers")


Search


     Service class for service type
Raises:


Cancel  Create saved search


  * Maintainer status: developed
  * Maintainer: Wim Meeussen <wim AT hidof DOT com>, Adolfo Rodriguez Tsouroukdissian <adolfo.rodriguez AT pal-robotics DOT com>, Dave Coleman <davetcoleman AT gmail DOT com>
  * Author: Wim Meeussen
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros-controls/ros_controllers/issues ](https://github.com/ros-controls/ros_controllers/issues)
  * Source: git [ https://github.com/ros-controls/ros_controllers.git ](https://github.com/ros-controls/ros_controllers) (branch: hydro-devel)


* [ The ReadME Project  GitHub community articles  ](/readme)


[ ackermann_steering_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/ackermann_steering_controller "ackermann_steering_controller")


  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ros_controllers/page:1/)
  * [ Changelog ](http://docs.ros.org/en/melodic/changelogs/ros_controllers/changelog.html)
  * [ Change List ](/ros_controllers/ChangeList)
  * [ Reviews ](/ros_controllers/Reviews)


[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


##  Use saved searches to filter your results more quickly


The plugin failed to load for some reason. Error: According to the loaded plugin descriptions the class linear_controller::LinearControlle2 with base class type control_base::Controller does not exist. Declared types are  linear_controller::LinearController1 linear_controller::LinearController2


{{ message }}


    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)


#  Package Summary


Documented


** Used by  (1) **


Parameters:


You can’t perform that action at this time.


[ **522** forks ](/ros-controls/ros_controllers/forks)


[ Notifications ](/login?return_to=%2Fros-controls%2Fros_controllers)


** Used by  (5) **


##  Publication


[ velocity_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/velocity_controllers "velocity_controllers")


[ ](/ros-controls/ros_controllers/branches) [ ](/ros-
controls/ros_controllers/tags)


* ` **Exception** ` \- if service_type is invalidly specified


_**ros_controllers** : [ diff_drive_controller
](/diff_drive_controller?distro=indigo) | [ effort_controllers
](/effort_controllers?distro=indigo) | [ force_torque_sensor_controller
](/force_torque_sensor_controller?distro=indigo) | [
forward_command_controller ](/forward_command_controller?distro=indigo) | [
gripper_action_controller ](/gripper_action_controller?distro=indigo) | [
imu_sensor_controller ](/imu_sensor_controller?distro=indigo) | [
joint_state_controller ](/joint_state_controller?distro=indigo) | [
joint_trajectory_controller ](/joint_trajectory_controller?distro=indigo) | [
position_controllers ](/position_controllers?distro=indigo) | [
rqt_joint_trajectory_controller
](/rqt_joint_trajectory_controller?distro=indigo) | [ velocity_controllers
](/velocity_controllers?distro=indigo) _


By Solution


Library of ros controllers


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


* **lunar:** _Documentation generated on April 11, 2019 at 10:57 AM_ ( [ doc job ](http://build.ros.org/view/Ldoc/job/Ldoc__ros_controllers__ubuntu_xenial_amd64) ).


* ` **[ ROSMessageException ](roslib.message.ROSMessageException-class.html) ** ` \- if not enough/too many message arguments to fill message


##  Languages


[ ros_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/ros_controllers "ros_controllers")


[ about ](/about/) |  [ faq ](/faq/) |  [ help ](/help/ "help") |  [ privacy
policy ](/privacy/) |  [ terms of service ](/terms/)


I know that LinearController2 exists and was exported correctly based on the
console printout when I made a typo:


  * [ agvs_control ](/agvs_control?distro=hydro)
  * [ crom_gazebo ](/crom_gazebo?distro=hydro)
  * [ guardian_control ](/guardian_control?distro=hydro)
  * [ nao_gazebo_plugin ](/nao_gazebo_plugin?distro=hydro)
  * [ ur_gazebo ](/ur_gazebo?distro=hydro)


});
  // Send an action goal
  var goal = {order: 5};
  var goal_id = fibonacciClient.sendGoal(goal,
  function(result) {
    console.log('Result for action goal on ' + fibonacciClient.name + ': ' + result.result.sequence);
  },
  function(feedback) {
    console.log('Feedback for action on ' + fibonacciClient.name + ': ' + feedback.partial_sequence);
  },
  );
</script>

Fibonacci ActionClient Example

Run the following commands in the terminal then refresh this page. Check the JavaScript
    console for the output.

<tt>ros2 launch rosbridge_server rosbridge_websocket_launch.xml</tt>

<tt>ros2 run action_tutorials_py fibonacci_action_server</tt>

      Connecting to rosbridge...

      Connected

      Error in the backend!

      Connection closed.


Wiki: ros_controllers (last edited 2017-12-19 15:07:04 by  [ BenceMagyar
](/BenceMagyar "BenceMagyar @ dhcp5.eps.hw.ac.uk\[137.195.182.224\]") )


Generic robotic controllers to accompany ros_control


Raises:


#  Package Summary


* ` **[ SerializationError ](roslib.message.SerializationError-class.html) ** ` \- if typecheck fails


[ **answered 2021-06-27 04:45:10 -0500  ** ](/answers/381203/revisions/)


Please note: ROS Answers requires javascript to work properly, please enable
javascript in your browser, [ here is how
](https://www.google.com/support/bin/answer.py?answer=23852)


  * Maintainer status: maintained
  * Maintainer: Adolfo Rodriguez Tsouroukdissian <adolfo.rodriguez AT pal-robotics DOT com>, Bence Magyar <bence.magyar.robotics AT gmail DOT com>, Dave Coleman <davetcoleman AT gmail DOT com>, Enrique Fernandez <enrique.fernandez.perdomo AT gmail DOT com>
  * Author: Wim Meeussen
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros-controls/ros_controllers/issues ](https://github.com/ros-controls/ros_controllers/issues)
  * Source: git [ https://github.com/ros-controls/ros_controllers.git ](https://github.com/ros-controls/ros_controllers) (branch: kinetic-devel)


[ ![ROS Answers logo](/m/ros/media/images/logoros.png?v=28) ](/questions/)


  * [ source ubuntu focal ](https://build.ros.org/view/Nsrc_uF/job/Nsrc_uF__ros_controllers__ubuntu_focal__source)
  * [ binary ubuntu focal amd64 ](https://build.ros.org/view/Nbin_uF64/job/Nbin_uF64__ros_controllers__ubuntu_focal_amd64__binary)
  * [ binary ubuntu focal armhf ](https://build.ros.org/view/Nbin_ufhf_uFhf/job/Nbin_ufhf_uFhf__ros_controllers__ubuntu_focal_armhf__binary)
  * [ binary ubuntu focal arm64 ](https://build.ros.org/view/Nbin_ufv8_uFv8/job/Nbin_ufv8_uFv8__ros_controllers__ubuntu_focal_arm64__binary)
  * [ devel ubuntu focal amd64 ](https://build.ros.org/view/Ndev/job/Ndev__ros_controllers__ubuntu_focal_amd64)
  * [ doc ](https://build.ros.org/view/Ndoc/job/Ndoc__ros_controllers__ubuntu_focal_amd64)


###  strify_message  (  val  ,  indent  =  ` ' ` ` ` ` ' ` ,  time_offset  =
None  ,  current_time  =  None  ,  field_filter  =  None  )


The ROS Wiki is for ROS 1. Are you using ROS 2 ( [ Humble
](http://docs.ros.org/en/humble/) , [ Iron ](http://docs.ros.org/en/iron/) ,
or [ Rolling ](http://docs.ros.org/en/rolling/) )?
[ Check out the ROS 2 Project Documentation ](http://docs.ros.org)
Package specific documentation can be found on [ index.ros.org
](https://index.ros.org)


[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=ros-
controls%2Fros_controllers)


** Dependencies  (13) **


** Dependencies  (12) **


The plugin failed to load for some reason. Error: MultiLibraryClassLoader: Could not create object of class type linear_controller::LinearController2 as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()


[ ](/ros-controls/ros_controllers/commits/noetic-devel/)

###


[ **43** watching ](/ros-controls/ros_controllers/watchers)


control_framework - Contains executable and imports the plugins controller -
Contains base class linear_controller - Contains two plugin classes


Classes
---
|  [ ROSMessageException ](roslib.message.ROSMessageException-class.html)
Exception type for errors in roslib.message routines
|  [ Message ](roslib.message.Message-class.html)
Base class of Message data classes auto-generated from msg files.
|  [ ServiceDefinition ](roslib.message.ServiceDefinition-class.html)
Base class of Service classes auto-generated from srv files
|  [ DeserializationError ](roslib.message.DeserializationError-class.html)
Message deserialization error
|  [ SerializationError ](roslib.message.SerializationError-class.html)
Message serialization error
Functions
---
Message class  |  |  [ get_message_class ](roslib.message-
module.html#get_message_class) (  message_type  ,  reload_on_error  =  False
)
Get the message class.  |  [ source code ](roslib.message-
pysrc.html#get_message_class)
---|---
Service class  |  |  [ get_service_class ](roslib.message-
module.html#get_service_class) (  service_type  ,  reload_on_error  =  False
)
Get the service class.  |  [ source code ](roslib.message-
pysrc.html#get_service_class)
---|---
str  |  |  [ strify_message ](roslib.message-module.html#strify_message) (
val  ,  indent  =  ` ' ` ` ` ` ' ` ,  time_offset  =  None  ,  current_time  =
None  ,  field_filter  =  None  )
Convert value to string representation  |  [ source code ](roslib.message-
pysrc.html#strify_message)
---|---
|  |  [ check_type ](roslib.message-module.html#check_type) (  field_name  ,
field_type  ,  field_val  )
Dynamic type checker that maps ROS .msg types to python types and verifies the
python value.  |  [ source code ](roslib.message-pysrc.html#check_type)
---|---
str  |  |  [ get_printable_message_args ](roslib.message-
module.html#get_printable_message_args) (  msg  ,  buff  =  None  ,  prefix  =
` ' ` ` ` ` ' ` )


  * [ ackermann_steering_c... ](/ackermann_steering_controller?distro=kinetic)
  * [ catkin ](/catkin?distro=kinetic)
  * [ diff_drive_controlle... ](/diff_drive_controller?distro=kinetic)
  * [ effort_controllers ](/effort_controllers?distro=kinetic)
  * [ force_torque_sensor_... ](/force_torque_sensor_controller?distro=kinetic)
  * [ forward_command_cont... ](/forward_command_controller?distro=kinetic)
  * [ gripper_action_contr... ](/gripper_action_controller?distro=kinetic)
  * [ imu_sensor_controlle... ](/imu_sensor_controller?distro=kinetic)
  * [ joint_state_controll... ](/joint_state_controller?distro=kinetic)
  * [ joint_trajectory_con... ](/joint_trajectory_controller?distro=kinetic)
  * [ position_controllers... ](/position_controllers?distro=kinetic)
  * [ rqt_joint_trajectory... ](/rqt_joint_trajectory_controller?distro=kinetic)
  * [ velocity_controllers... ](/velocity_controllers?distro=kinetic)


###  License


Support library for Python autogenerated message files. This defines the [
Message ](roslib.message.Message-class.html) base class used by genmsg_py as
well as support libraries for type checking and retrieving message classes by
type name.


[ ![lukicdarkoo gravatar
image](//www.gravatar.com/avatar/74fe970e94762c115f71e6c17f058f20?s=32&d=identicon&r=PG)
](/users/44970/lukicdarkoo/)


[ ![](/custom/images/brought_by_horiz.png) ](https://www.openrobotics.org/)


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


  * Maintainer status: maintained
  * Maintainer: Adolfo Rodriguez Tsouroukdissian <adolfo.rodriguez AT pal-robotics DOT com>, Dave Coleman <davetcoleman AT gmail DOT com>
  * Author: Wim Meeussen
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros-controls/ros_controllers/issues ](https://github.com/ros-controls/ros_controllers/issues)
  * Source: git [ https://github.com/ros-controls/ros_controllers.git ](https://github.com/ros-controls/ros_controllers) (branch: jade-devel)


Name


#  User


Returns: str


Continuous Integration:  300 / 300


  * [ C++  91.2%  ](/ros-controls/ros_controllers/search?l=c%2B%2B)
  * [ CMake  3.5%  ](/ros-controls/ros_controllers/search?l=cmake)
  * [ Python  3.3%  ](/ros-controls/ros_controllers/search?l=python)
  * [ Objective-C  2.0%  ](/ros-controls/ros_controllers/search?l=objective-c)


#  Saved searches


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fros-
controls%2Fros_controllers)


Continuous Integration


* [ multiLibraryClassLoader ](/questions/scope:all/sort:activity-desc/tags:multiLibraryClassLoader/page:1/)


###  Stars


[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


[ **532** stars ](/ros-controls/ros_controllers/stargazers)


[ 55  tags  ](/ros-controls/ros_controllers/tags)


Last commit date

---|---|---|---

##  Latest commit


For


[ Using xacro package in ROS 2 ](/question/354341/using-xacro-package-in-
ros-2/)


[ four_wheel_steering_controller ](/ros-controls/ros_controllers/tree/noetic-
devel/four_wheel_steering_controller "four_wheel_steering_controller")


|  [ Ask Your Question ](/questions/ask/)
---|---|---|---

1


  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ros_controllers/page:1/)
  * [ Changelog ](http://docs.ros.org/en/noetic/changelogs/ros_controllers/changelog.html)
  * [ Change List ](/ros_controllers/ChangeList)
  * [ Reviews ](/ros_controllers/Reviews)


[ 954 Commits  ](/ros-controls/ros_controllers/commits/noetic-devel/)


[ Hi there! Please sign in ](/account/signin/?next=/question/380351/creating-
multiple-plugins-from-single-package-in-ros2/) [ help ](/help/ "help")


[ ALL ](/questions/scope:all/sort:activity-desc/page:1/) [ UNANSWERED
](/questions/scope:unanswered/sort:answers-asc/page:1/)


[ Generate and publish PointCloud2 in ros2? ](/question/312587/generate-and-
publish-pointcloud2-in-ros2/)


##  [ Contributors  78  ](/ros-controls/ros_controllers/graphs/contributors)


[ .clang-format ](/ros-controls/ros_controllers/blob/noetic-devel/.clang-
format ".clang-format")


BSD-3-Clause license


|

View all files

##  Repository files navigation


See [ ros_control ](http://wiki.ros.org/ros_control) and [ ros_controllers
](http://wiki.ros.org/ros_controllers) documentation on ros.org


[ velocity_controllers ](/ros-controls/ros_controllers/tree/noetic-
devel/velocity_controllers "velocity_controllers")


  * [ abb_irb120_gazebo ](/abb_irb120_gazebo?distro=kinetic)
  * [ gundam_rx78_control ](/gundam_rx78_control?distro=kinetic)
  * [ hebiros ](/hebiros?distro=kinetic)
  * [ nao_gazebo_plugin ](/nao_gazebo_plugin?distro=kinetic)
  * [ nextage_gazebo ](/nextage_gazebo?distro=kinetic)
  * [ pepper_gazebo_plugin... ](/pepper_gazebo_plugin?distro=kinetic)
  * [ romeo_control ](/romeo_control?distro=kinetic)
  * [ romeo_dcm_control ](/romeo_dcm_control?distro=kinetic)
  * [ romeo_gazebo_plugin ](/romeo_gazebo_plugin?distro=kinetic)
  * [ schunk_canopen_drive... ](/schunk_canopen_driver?distro=kinetic)
  * [ staubli_rx160_gazebo... ](/staubli_rx160_gazebo?distro=kinetic)
  * [ staubli_tx90_gazebo ](/staubli_tx90_gazebo?distro=kinetic)
  * [ summit_x_control ](/summit_x_control?distro=kinetic)


_**ros_controllers** : [ ackermann_steering_controller
](/ackermann_steering_controller?distro=kinetic) | [ diff_drive_controller
](/diff_drive_controller?distro=kinetic) | [ effort_controllers
](/effort_controllers?distro=kinetic) | [ force_torque_sensor_controller
](/force_torque_sensor_controller?distro=kinetic) | [
forward_command_controller ](/forward_command_controller?distro=kinetic) | [
gripper_action_controller ](/gripper_action_controller?distro=kinetic) | [
imu_sensor_controller ](/imu_sensor_controller?distro=kinetic) | [
joint_state_controller ](/joint_state_controller?distro=kinetic) | [
joint_trajectory_controller ](/joint_trajectory_controller?distro=kinetic) | [
position_controllers ](/position_controllers?distro=kinetic) | [
rqt_joint_trajectory_controller
](/rqt_joint_trajectory_controller?distro=kinetic) | [ velocity_controllers
](/velocity_controllers?distro=kinetic) _


rostopic pub -1 /mrm/joint2_position_controller/command std_msgs/Float64 "data: 0.0"


roslaunch rrbot_control rrbot_rqt.launch


#  Next Steps


####  [ Robotics with ROS
](https://www.theconstruct.ai/category/robotics_with_ros/)


##  Step 6 – Launch Gazebo Controllers


#  Submit a Comment  [ Cancel reply ](/my-robotic-manipulator-04-urdf-
transmission-gazebo-controllers/#respond)


For the purposes of gazebo_ros_control in its current implementation, the only
important information in these transmission tags are:


##  Add transmission elements to a URDF


The default plugin XML should be added to your URDF:


ROS Teaching Center


##  URDF/Transmission + Gazebo Controllers


See the next section for more details about these controllers.


Enable the topic publisher by checking the check box on the left of the topic
name. Set the rate column to 100 (the frequency we send it commands - 100hz in
this case).


We are defining the **joint_state_publisher** as reference.


[ ![ros.org](/custom/images/ros_org.png) ](/) |  [ About
](http://www.ros.org/about-ros) | [ Support ](/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---|---
![](/custom/images/menu_left.png) [
![Documentation](/custom/images/menu_documentation.png) ](/)
![](/custom/images/menu_spacer.png) [ ![Browse
Software](/custom/images/menu_browse_software.png)
](https://index.ros.org/packages) ![](/custom/images/menu_spacer.png) [
![News](/custom/images/menu_news.png) ](https://discourse.ros.org/c/general)
![](/custom/images/menu_spacer.png) [
![Download](/custom/images/menu_download.png) ](/ROS/Installation)
![](/custom/images/menu_right.png)

  * [ urdf ](/urdf)
  * [ XML ](/urdf/XML)
  * [ Transmission ](/urdf/XML/Transmission)


The respective RobotHWSim sub-class is specified in a URDF model and is loaded
when the robot model is loaded. For example, the following XML will load the
default plugin (same behavior as when using no ` <robotSimType> ` tag):


[ read more ](https://www.theconstruct.ai/130-the-open-source-robotics-
alliance/)


The controller_spawner node starts the two joint position controllers for the
RRBot by running a python script that makes a service call to the ros_control
controller manager. The service calls tell the controller manager which
controllers you want. It also loads a third controller that publishes the
joint states of all the joints with hardware_interfaces and advertises the
topic on /joint_states. The spawner is just a helper script for use with
roslaunch.


###  Create a roslaunch file


On the 'Plugins' menu of RQT add the 'Topics->Message Publisher' plugin then
choose the topic from the drop down box that commands any particular
controller that you want to publish to. For the RRBot, add the controller:


#  Demo Code


##  [ 130\. The Open Source Robotics Alliance
](https://www.theconstruct.ai/130-the-open-source-robotics-alliance/)


##  Step 7 – Testing!


[ Back ](/tutorials?cat=install)


Great! If you missed any of the steps or something just didn’t work, you can
check the original project just clicking on the link: [
http://www.rosject.io/l/c1ed2ee/ ](http://www.rosject.io/l/c1ed2ee/)


[ ![Speed Up Data Processing with Multi-Threaded
Execution](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Speed Up Data Processing with Multi-Threaded
Execution](https://www.theconstruct.ai/wp-
content/uploads/2024/03/Ernest_march_cover.jpeg)
](https://www.theconstruct.ai/speed-up-data-processing-with-multi-threaded-
execution-english-ros2-tutorial/)


    process[mrm/mybot_spawn-1]: started with pid [4817]
    process[mrm/controller_spawner-2]: started with pid [4822]
    [INFO] [1567187158.002693, 0.000000]: Controller Spawner: Waiting for service /mrm/controller_manager/load_controller
    the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
    SpawnModel script started
    [INFO] [1567187165.292282, 0.000000]: Loading model XML from ros parameter
    [INFO] [1567187165.303925, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
    [INFO] [1567187165.312998, 0.000000]: Calling service /gazebo/spawn_urdf_model
    [INFO] [1567187165.504207, 904.010000]: Spawn status: SpawnModel: Successfullyspawned entity
    [mrm/mybot_spawn-1] process has finished cleanly
    log file: /home/user/.ros/log/cfa21f58-cb4b-11e9-9ca9-0a2504d14030/mrm-mybot_spawn-1*.log
    [INFO] [1567187166.829017, 904.050000]: Controller Spawner: Waiting for service /mrm/controller_manager/switch_controller
    [INFO] [1567187166.831181, 904.050000]: Controller Spawner: Waiting for service /mrm/controller_manager/unload_controller
    [INFO] [1567187166.848968, 904.070000]: Loading controller: joint_state_controller
    [INFO] [1567187167.000380, 904.220000]: Loading controller: joint1_position_controller
    [INFO] [1567187167.268639, 904.500000]: Loading controller: joint2_position_controller
    [INFO] [1567187167.345849, 904.570000]: Controller Spawner: Loaded controllers: joint_state_controller, joint1_position_controller, joint2_position_controller
    [INFO] [1567187167.355672, 904.590000]: Started controllers: joint_state_controller, joint1_position_controller, joint2_position_controller


Now that you are using ros_control to send commands to your robot in
simulation, you can also use the ros_control joint _state_ controller to read
the state of the robot from Gazebo. The idea behind a good simulator is that
you should be able to use the same software on your real hardware as you do in
simulation. A good starting point for that is visualizing your simulated robot
in Rviz, similar to how it is done with real hardware.


ROS Developers Day 2023


We have also new **ROS topics** related to the controllers:


Let’s get back to the URDF file: **mrm.xacro**


This tutorial builds off of many of the concepts in the previous tutorials. We
will again be using the RRBot that was setup in the [ Using URDF in Gazebo
](/tutorials/?tut=ros_urdf) tutorial, as an example for the plugins covered
here.


A pre-configured RQT perspective for the rrbot can be easily launched with the
following command:


    rosservice call /rrbot/controller_manager/load_controller "name: 'joint1_position_controller'"
    rosservice call /rrbot/controller_manager/load_controller "name: 'joint2_position_controller'"


</xacro:macro>


<xacro:macro name="ur5_arm_transmission" params="prefix">


    <?xml version="1.0" ?>

    <robot name="mrm" xmlns:xacro="http://www.ros.org/wiki/xacro">

      <!-- BGN - Include -->
      <xacro:include filename="$(find mrm_description)/urdf/links_joints.xacro" />
      <xacro:include filename="$(find mrm_description)/urdf/robot_parameters.xacro" />
      <!-- END - Include -->

      <!-- BGN - Robot description -->
      <m_link_box name="${link_00_name}"
               origin_rpy="0 0 0" origin_xyz="0 0 0"
               mass="1024"
               ixx="170.667" ixy="0" ixz="0"
               iyy="170.667" iyz="0"
               izz="170.667"
               size="1 1 1" />

      <m_joint name="${link_00_name}__${link_01_name}" type="revolute"
               axis_xyz="0 0 1"
               origin_rpy="0 0 0" origin_xyz="0 0 0.5"
               parent="${link_00_name}" child="${link_01_name}" />

      <m_link_cylinder name="${link_01_name}"
               origin_rpy="0 0 0" origin_xyz="0 0 0.2"
               mass="157.633"
               ixx="13.235" ixy="0" ixz="0"
               iyy="13.235" iyz="0"
               izz="9.655"
               length="0.4" radius="0.35" />

      <m_joint name="${link_01_name}__${link_02_name}" type="revolute"
               axis_xyz="0 1 0"
               origin_rpy="0 0 0" origin_xyz="0 0 0.4"
               parent="${link_01_name}" child="${link_02_name}" />

      <m_link_cylinder name="${link_02_name}"
               origin_rpy="0 0 0" origin_xyz="0 0 0.4"


Pricing


#  Usage


For more advanced control, you can configure it to publish a sine wave to your
robot's exact joint limits:


[ The complete working example of the package we're talking about in this
section can be found as ` rrbot_control ` ](https://github.com/ros-
simulation/gazebo_ros_demos/tree/kinetic-devel/rrbot_control) ).


rosrun rviz rviz


###  Tune the PID gains


###  Use roslaunch to save your RQT perspective


[ ![The
Construct](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![The Construct](https://www.theconstruct.ai/wp-content/uploads/2020/07/The-
Construct-logo-20-500x164-1.png) ](https://www.theconstruct.ai/)


rosservice call /rrbot/controller_manager/switch_controller "{start_controllers: ['joint1_position_controller','joint2_position_controller'], stop_controllers: [], strictness: 2}"


* [ Login ](/action/login/urdf/XML/Transmission?action=login)


Great! These are the parts we are going to control!


I would like to dedicate this episode to all the ROS developers out there who
are thinking and...