Skip to content

Commit 4c5bbb8

Browse files
authored
fix typo in example7 doc (ros-controls#379)
1 parent de156b3 commit 4c5bbb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

example_7/doc/userdoc.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ The hardware plugin for the tutorial robot is a class called ``RobotSystem`` tha
217217
// ...
218218
}
219219

220-
The ``on_init`` method is called once during ros2_control initialization if the ``RobotSystem`` was specified in the URDF. In this method, communication between the robot hardware needs to be setup and memory dynamic should be allocated. Since the tutorial robot is simulated, explicit will communication not be established. Instead, vectors will be initialized that represent the state all the hardware, e.g. a vector of doubles describing joint angles, etc.
220+
The ``on_init`` method is called once during ros2_control initialization if the ``RobotSystem`` was specified in the URDF. In this method, communication between the robot hardware needs to be setup and memory dynamic should be allocated. Since the tutorial robot is simulated, explicit communication will not be established. Instead, vectors will be initialized that represent the state all the hardware, e.g. a vector of doubles describing joint angles, etc.
221221

222222
.. code-block:: c++
223223

@@ -232,7 +232,7 @@ The ``on_init`` method is called once during ros2_control initialization if the
232232

233233
Notably, the behavior of ``on_init`` is expected to vary depending on the URDF file. The ``SystemInterface::on_init(info)`` call fills out the ``info`` object with specifics from the URDF. For example, the ``info`` object has fields for joints, sensors, gpios, and more. Suppose the sensor field has a name value of ``tcp_force_torque_sensor``. Then the ``on_init`` must try to establish communication with that sensor. If it fails, then an error value is returned.
234234

235-
Next, ``export_state_interfaces`` and ``export_command_interfaces`` methods are called in succession. The ``export_state_interfaces`` method returns a vector of ``StateInterface``, describing the ``state_interfaces`` for each joint. The ``StateInterface`` objects are read only data handles. Their constructors require an interface nae, interface type, and a pointer to a double data value. For the ``RobotSystem``, the data pointers reference class member variables. This way, the data can be access from every method.
235+
Next, ``export_state_interfaces`` and ``export_command_interfaces`` methods are called in succession. The ``export_state_interfaces`` method returns a vector of ``StateInterface``, describing the ``state_interfaces`` for each joint. The ``StateInterface`` objects are read only data handles. Their constructors require an interface name, interface type, and a pointer to a double data value. For the ``RobotSystem``, the data pointers reference class member variables. This way, the data can be access from every method.
236236

237237
.. code-block:: c++
238238

@@ -342,7 +342,7 @@ In ros2_control, controllers are implemented as plugins that conforms to the ``C
342342

343343
Certain interface methods are called during transitions between these states. During the main control loop, the controller is in the active state.
344344

345-
The following code blocks will explain the requirements for writing a new hardware interface.
345+
The following code blocks will explain the requirements for writing a new controller.
346346

347347
The controller plugin for the tutorial robot is a class called ``RobotController`` that inherits from ``controller_interface::ControllerInterface``. The ``RobotController`` must implement nine public methods. The last six are `managed node <https://design.ros2.org/articles/node_lifecycle.html>`__ transitions callbacks.
348348

0 commit comments

Comments
 (0)