You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
4.2 KiB

2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
  1. # Tutorial: Stretch Body Command Line Tools
  2. Stretch Body includes the package [hello-robot-stretch-body-tools](https://github.com/hello-robot/stretch_body/tree/master/tools) - a suite of command line tools that allow direct interaction with hardware subsystems.
  3. These tools are useful when developing and debugging applications. They also serve as code examples when developing applications for Stretch_Body.
  4. These tools can be found by tab completion of 'stretch_' from a terminal.
  5. ```{.bash .shell-prompt}
  6. stretch_
  7. stretch_about.py
  8. stretch_about_text.py
  9. stretch_arm_home.py
  10. stretch_arm_jog.py
  11. stretch_audio_test.py
  12. stretch_base_jog.py
  13. stretch_gripper_home.py
  14. stretch_gripper_jog.py
  15. stretch_hardware_echo.py
  16. stretch_head_jog.py
  17. stretch_lift_home.py
  18. stretch_lift_jog.py
  19. stretch_params.py
  20. stretch_pimu_jog.py
  21. stretch_pimu_scope.py
  22. stretch_realsense_visualizer.py
  23. stretch_respeaker_test.py
  24. stretch_robot_battery_check.py
  25. stretch_robot_dynamixel_reboot.py
  26. stretch_robot_home.py
  27. stretch_robot_jog.py
  28. stretch_robot_keyboard_teleop.py
  29. stretch_robot_monitor.py
  30. stretch_robot_stow.py
  31. stretch_robot_system_check.py
  32. stretch_robot_urdf_visualizer.py
  33. stretch_rp_lidar_jog.py
  34. stretch_trajectory_jog.py
  35. stretch_version.sh
  36. stretch_wacc_jog.py
  37. stretch_wacc_scope.py
  38. stretch_wrist_yaw_home.py
  39. stretch_wrist_yaw_jog.py
  40. stretch_xbox_controller_teleop.py
  41. ```
  42. All tools accept the '--help' flag as a command line argument to describe its function. For example:
  43. ```{.bash .shell-prompt}
  44. stretch_pimu_scope.py --help
  45. ```
  46. Output:
  47. ```{.bash .no-copy}
  48. For use with S T R E T C H (R) RESEARCH EDITION from Hello Robot Inc.
  49. ---------------------------------------------------------------------
  50. usage: stretch_pimu_scope.py [-h] [--cliff] [--at_cliff] [--voltage] [--current] [--temp] [--ax] [--ay] [--az] [--mx] [--my] [--mz] [--gx] [--gy] [--gz] [--roll] [--pitch] [--heading] [--bump]
  51. Visualize Pimu (Power+IMU) board data with an oscilloscope
  52. optional arguments:
  53. -h, --help show this help message and exit
  54. --cliff Scope base cliff sensors
  55. --at_cliff Scope base at_cliff signal
  56. --voltage Scope bus voltage (V)
  57. --current Scope bus current (A)
  58. --temp Scope base internal temperature (C)
  59. --ax Scope base accelerometer AX
  60. --ay Scope base accelerometer AY
  61. --az Scope base accelerometer AZ
  62. --mx Scope base magnetometer MX
  63. --my Scope base magnetometer MY
  64. --mz Scope base magnetometer MZ
  65. --gx Scope base gyro GX
  66. --gy Scope base gyro GY
  67. --gz Scope base gyro GZ
  68. --roll Scope base imu Roll
  69. --pitch Scope base imu Pitch
  70. --heading Scope base imu Heading
  71. --bump Scope base imu bump level
  72. ```
  73. ## Commonly Used Tools
  74. These are the tools a typical user is expected to interact with regularly and would benefit from becoming familiar with.
  75. | **Tool** | **Utility** |
  76. | ------------------------------------- | ------------------------------------------------------------ |
  77. | **stretch_robot_home.py** | Commonly run after booting up the robot in-order to calibrate the joints |
  78. | **stretch_robot_system_check.py** | Scans for all hardware devices and ensures they are present on the bus and reporting valid values. Useful to verify that the robot is in good working order prior to commanding motion. It will report all success in green, failures in red. |
  79. | **stretch_robot_stow.py** | Useful to return the robot arm and tool to a safe position within the base footprint. It can also be useful if a program fails to exit cleanly and the robot joints are not backdriveable. It will restore them to their 'Safety' state. |
  80. | **stretch_robot_battery_check.py** | Quick way to check the battery voltage / current consumption |
  81. | **stretch_xbox_controller_teleop.py** | Useful to quickly test if a robot can achieve a task by manually teleoperating the robot |
  82. | **stretch_robot_dynamixel_reboot.py** | Resets all Dynamixels in the robot, which might be necessary if a servo overheats during use and enters an error state. |
  83. Take a minute to explore each of these tools from the console.
  84. ------
  85. <div align="center"> All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.</div>