Skip to content

Commit

Permalink
Add ROS interface doc (#3)
Browse files Browse the repository at this point in the history
* Add ROS interface doc

* Split into ROS 1/2 guides

* Add simple ros run usage
  • Loading branch information
lukeschmitt-tr authored Jul 2, 2024
1 parent c00830e commit bf124a3
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/operation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Operation
=========

.. toctree::
:maxdepth: 3
:maxdepth: 1

operation/rc_controller.rst
operation/ros_interface.rst
11 changes: 11 additions & 0 deletions docs/operation/ros_interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
=======================
ROS Interface Operation
=======================

Follow the links below to your ROS version's operation guide.

.. toctree::
:maxdepth: 1

ros_interface/ros1.rst
ros_interface/ros2.rst
91 changes: 91 additions & 0 deletions docs/operation/ros_interface/ros1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
=========================
ROS 1 Interface Operation
=========================

SLATE Base Node
===============

The SLATE interfaces with ROS using the **slate_base_node** from the **interbotix_slate_driver** package.

Publishers
----------

The **slate_base_node** publishes to the following topics:

* ``odom``

* **Type**: ``nav_msgs/msg/Odometry``
* **Description**: The odometry of the base.

* ``battery_state``

* **Type**: ``sensor_msgs/msg/BatteryState``
* **Description**: Battery state information including present voltage and state of charge.

Subscribers
-----------

The **slate_base_node** subscribes to the following topics:

* ``cmd_vel``

* **Type**: ``geometry_msgs/msg/Twist``
* **Description**: Velocity commands

Services
--------

The **slate_base_node** provides the following service servers:

* ``set_text``

* **Type**: ``std_srvs/srv/SetString``
* **Description**: Sets the text on the SLATE screen.

* ``set_motor_torque_status``

* **Type**: ``std_srvs/srv/SetBool``
* **Description**: If true, enables torque on the drive wheels.
If false, disables torque on the drive wheels.

.. note::

Torque is enabled on the drive wheels by default.

* ``enable_charging``

* **Type**: ``std_srvs/srv/SetBool``
* **Description**: If true, enables charging via the contact charger.

Parameters
----------

The **slate_base_node** has the following parameters:

* ``publish_tf``:

* **Type**: bool
* **Description**: Setting this to true publishes the odom->base_link TF following REP 105.
* **Default**: ``false``

* ``odom_frame_name``:

* **Type**: string
* **Description**: The name of the odometry frame when publishing the odom->base_link TF.
* **Default**: ``"odom"``

* ``base_frame_name``:

* **Type**: string
* **Description**: The name of the base_link frame when publishing the odom->base_link TF.
* **Default**: ``"base_link"``

Usage
=====

Using rosrun
------------

.. code-block:: bash
$ rosrun interbotix_slate_driver slate_base_node
91 changes: 91 additions & 0 deletions docs/operation/ros_interface/ros2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
=========================
ROS 2 Interface Operation
=========================

SLATE Base Node
===============

The SLATE interfaces with ROS using the **slate_base_node** from the **interbotix_slate_driver** package.

Publishers
----------

The **slate_base_node** publishes to the following topics:

* ``odom``

* **Type**: ``nav_msgs/msg/Odometry``
* **Description**: The odometry of the base.

* ``battery_state``

* **Type**: ``sensor_msgs/msg/BatteryState``
* **Description**: Battery state information including present voltage and state of charge.

Subscribers
-----------

The **slate_base_node** subscribes to the following topics:

* ``cmd_vel``

* **Type**: ``geometry_msgs/msg/Twist``
* **Description**: Velocity commands

Services
--------

The **slate_base_node** provides the following service servers:

* ``set_text``

* **Type**: ``std_srvs/srv/SetString``
* **Description**: Sets the text on the SLATE screen.

* ``set_motor_torque_status``

* **Type**: ``std_srvs/srv/SetBool``
* **Description**: If true, enables torque on the drive wheels.
If false, disables torque on the drive wheels.

.. note::

Torque is enabled on the drive wheels by default.

* ``enable_charging``

* **Type**: ``std_srvs/srv/SetBool``
* **Description**: If true, enables charging via the contact charger.

Parameters
----------

The **slate_base_node** has the following parameters:

* ``publish_tf``:

* **Type**: bool
* **Description**: Setting this to true publishes the odom->base_link TF following REP 105.
* **Default**: ``false``

* ``odom_frame_name``:

* **Type**: string
* **Description**: The name of the odometry frame when publishing the odom->base_link TF.
* **Default**: ``"odom"``

* ``base_frame_name``:

* **Type**: string
* **Description**: The name of the base_link frame when publishing the odom->base_link TF.
* **Default**: ``"base_link"``

Usage
=====

Using ros2run
-------------

.. code-block:: bash
$ ros2 run interbotix_slate_driver slate_base_node

0 comments on commit bf124a3

Please sign in to comment.