Skip to content

Commit 596674c

Browse files
Added usuage of rqt_joint_trajectory_controller in documentation of e… (#734)
1 parent 0104876 commit 596674c

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

example_1/doc/userdoc.rst

+45
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,51 @@ Tutorial steps
428428
429429
You can adjust the goals in `rrbot_joint_trajectory_publisher <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_1/bringup/config/rrbot_joint_trajectory_publisher.yaml>`__.
430430

431+
7. Alternatively, you can use the :ref:`rqt_joint_trajectory_controller <rqt_joint_trajectory_controller_userdoc>` GUI to control the robot. First, load and switch to the Joint Trajectory Controller with a single command:
432+
433+
.. tabs::
434+
435+
.. group-tab:: Local
436+
437+
.. code-block:: shell
438+
439+
ros2 control load_controller joint_trajectory_position_controller $(ros2 pkg prefix ros2_control_demo_example_1 --share)/config/rrbot_jtc.yaml --set-state inactive && ros2 control switch_controllers --activate joint_trajectory_position_controller --deactivate forward_position_controller
440+
441+
.. group-tab:: Docker
442+
443+
(from the docker terminal, see above)
444+
445+
.. code-block:: shell
446+
447+
ros2 control load_controller joint_trajectory_position_controller --set-state inactive && ros2 control switch_controllers --activate joint_trajectory_position_controller --deactivate forward_position_controller
448+
449+
Then, launch the rqt_joint_trajectory_controller GUI:
450+
451+
.. tabs::
452+
453+
.. group-tab:: Local
454+
455+
.. code-block:: shell
456+
457+
ros2 run rqt_joint_trajectory_controller rqt_joint_trajectory_controller
458+
459+
.. group-tab:: Docker
460+
461+
(from the docker terminal, see above)
462+
463+
.. code-block:: shell
464+
465+
ros2 run rqt_joint_trajectory_controller rqt_joint_trajectory_controller
466+
467+
This will open a graphical interface that allows you to:
468+
469+
- Select the controller from a dropdown menu
470+
- Set target positions for each joint using sliders
471+
- Control the execution time of trajectories
472+
- Send the trajectory commands to the robot
473+
474+
The rqt_joint_trajectory_controller provides an intuitive way to test different joint positions without having to manually construct trajectory messages.
475+
431476
Files used for this demos
432477
-------------------------
433478

example_1/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<exec_depend>ros2_controllers_test_nodes</exec_depend>
3333
<exec_depend>ros2controlcli</exec_depend>
3434
<exec_depend>ros2launch</exec_depend>
35+
<exec_depend>rqt_joint_trajectory_controller</exec_depend>
3536
<exec_depend>rviz2</exec_depend>
3637
<exec_depend>xacro</exec_depend>
3738

0 commit comments

Comments
 (0)