@@ -348,7 +348,7 @@ to match other elements of ``sas``.
348348 :lines: 17
349349
350350Running the launch file
351- -----------------------
351+ +++++++++++++++++++++++
352352
353353.. code-block :: console
354354
@@ -398,3 +398,99 @@ Accessing through Python
398398 └── src
399399 ├── sas_robot_driver_myrobot.cpp
400400 └── sas_robot_driver_myrobot_node.cpp
401+
402+
403+ :download: `joint_interface_example.py <../../../sas_tutorial_workspace/src/sas_robot_driver_myrobot/scripts/joint_interface_example.py >`
404+
405+ .. literalinclude :: ../../../sas_tutorial_workspace/src/sas_robot_driver_myrobot/scripts/joint_interface_example.py
406+ :language: python
407+ :linenos:
408+ :lines: 27-
409+
410+
411+
412+ With the :file: `launch ` file running in one terminal, open another one and run
413+
414+ .. code-block :: console
415+
416+ ros2 topic echo /myrobot_1/get/joint_states
417+
418+ Then, in yet another terminal, run the sample Python script
419+
420+ .. code-block :: console
421+
422+ ros2 run sas_robot_driver_myrobot joint_interface_example.py
423+
424+ The output of :file: `joint_interface_example.py ` will be only descriptive.
425+
426+ .. dropdown :: joint_interface_example.py output
427+
428+ .. code-block :: console
429+
430+ **************************************************************************
431+ sas::Clock (c) Murilo M. Marinho (murilomarinho.info) 2016-2023 LGPLv3
432+ **************************************************************************
433+ **************************************************************************************
434+ sas::RobotDriverClient (c) Murilo M. Marinho (murilomarinho.info) 2016-2023 LGPLv3
435+ **************************************************************************************
436+ [INFO] [1743579389.703532605] [sas_robot_driver_myrobot_joint_space_example_node_cpp]: ::Initializing RobotDriverClient with prefix myrobot_1
437+ topic prefix = myrobot_1
438+ joint positions = [0. 0. 0. 0. 0. 0.]
439+
440+
441+ While the magic happens in ROS2, therefore in the terminal in which we executed ``ros2 topic echo ``
442+
443+ .. dropdown :: ros2 topic echo output
444+
445+ .. code-block :: console
446+
447+ header:
448+ stamp:
449+ sec: 1743579392
450+ nanosec: 471990465
451+ frame_id: ''
452+ name: []
453+ position:
454+ - 0.17141407117840998
455+ - 0.17141407117840998
456+ - 0.17141407117840998
457+ - 0.17141407117840998
458+ - 0.17141407117840998
459+ - 0.17141407117840998
460+ velocity: []
461+ effort: []
462+ ---
463+ header:
464+ stamp:
465+ sec: 1743579392
466+ nanosec: 474015460
467+ frame_id: ''
468+ name: []
469+ position:
470+ - 0.17141407117840998
471+ - 0.17141407117840998
472+ - 0.17141407117840998
473+ - 0.17141407117840998
474+ - 0.17141407117840998
475+ - 0.17141407117840998
476+ velocity: []
477+ effort: []
478+ ---
479+ header:
480+ stamp:
481+ sec: 1743579392
482+ nanosec: 475985122
483+ frame_id: ''
484+ name: []
485+ position:
486+ - 0.17141407117840998
487+ - 0.17141407117840998
488+ - 0.17141407117840998
489+ - 0.17141407117840998
490+ - 0.17141407117840998
491+ - 0.17141407117840998
492+ velocity: []
493+ effort: []
494+
495+
496+
0 commit comments