diff --git a/dev/source/docs/ros2-interfaces.rst b/dev/source/docs/ros2-interfaces.rst index 077d606e91..47a422a46b 100644 --- a/dev/source/docs/ros2-interfaces.rst +++ b/dev/source/docs/ros2-interfaces.rst @@ -160,10 +160,66 @@ Commands ArduPilot exposes service servers for the following purposes: -* Pre-arm check -* Arming -* Changing modes -* Takeoff (copter only) +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Service NameService TypeDescription
/ap/arm_motorsardupilot_msgs/srv/ArmMotorsArm or disarm the vehicle
/ap/experimental/takeoffardupilot_msgs/srv/TakeoffCommand a copter to take off
/ap/get_parametersrcl_interfaces/srv/GetParametersGet a parameter; works with "ros2 param get ..."
/ap/mode_switchardupilot_msgs/srv/ModeSwitchChange the drive/flight mode
/ap/prearm_checkstd_srvs/srv/TriggerCheck if the vehicle can be armed
/ap/set_parametersrcl_interfaces/srv/SetParametersSet a parameter; works with "ros2 param set ..."
+ +After building ``ardupilot_msgs`` and sourcing your workspace, you can inspect the message definitions likes so: + +.. code-block:: bash + + ros2 interface show ardupilot_msgs/srv/ArmMotors + +To check the vehicle can be armed using the ROS 2 CLI: + +.. code-block:: bash + + ros2 service call /ap/prearm_check std_srvs/srv/Trigger + +To arm the vehicle using the ROS 2 CLI: + +.. code-block:: bash + + ros2 service call /ap/arm_motors ardupilot_msgs/srv/ArmMotors "{arm: true}" + Odometry ========