diff --git a/README.md b/README.md index 0fb808a..073c174 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ The Stretch Tutorials reposotory provides tutorials on programming the Stretch R |--------------------------------------------------------|-------------------------------------------------------------------| | [Getting to Know Stretch](./getting_started/README.md) | Everything a new user of Stretch needs to get started | | [Stretch Body](./stretch_body/README.md) | Learn how to program Stretch using its low level Python interface | -| [ROS 1](./ros1/README.md) | Learn how to program Stretch using its ROS1 interface | -| [ROS 2](./ros2/README.md) | Learn how to program Stretch using its ROS2 interface | +| [ROS 1 (Melodic)](./ros1_melodic/README.md) | Learn how to program Stretch using its ROS1 (Melodic) interface | +| [ROS 1 (Noetic)](./ros1/README.md) | Learn how to program Stretch using its ROS1 (Noetic) interface | +| [ROS 2 (Beta)](./ros2/README.md) | Learn how to program Stretch using its ROS2 interface | ------
All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.
diff --git a/getting_started/best_practices.md b/getting_started/best_practices.md index e2ef5ed..899b8e4 100644 --- a/getting_started/best_practices.md +++ b/getting_started/best_practices.md @@ -6,11 +6,11 @@ Keeping Stretch charged is important to the long-term health of its batteries - === "Stretch RE1" - [RE1 Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/battery_maintenance_guide_re1/). + [RE1 Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/docs/battery_maintenance_guide_re1/) === "Stretch RE2" - [RE2 Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/battery_maintenance_guide_re2). + [RE2 Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/docs/battery_maintenance_guide_re2/) ## Keeping the Robot Healthy diff --git a/getting_started/images/clip-clamp.png b/getting_started/images/clip-clamp.png new file mode 100644 index 0000000..a215a50 Binary files /dev/null and b/getting_started/images/clip-clamp.png differ diff --git a/getting_started/images/trunk_re2.png b/getting_started/images/trunk_re2.png new file mode 100644 index 0000000..6923d23 Binary files /dev/null and b/getting_started/images/trunk_re2.png differ diff --git a/getting_started/quick_start_guide_re1.md b/getting_started/quick_start_guide_re1.md index 72ffe65..2abc09a 100644 --- a/getting_started/quick_start_guide_re1.md +++ b/getting_started/quick_start_guide_re1.md @@ -34,7 +34,7 @@ The provided battery charger can be plugged and unplugged at any time during ope | SUPPLY | 1) Power the robot during tethered use
2) Repair damaged batteries. | | REPAIR | Repair damaged batteries. | -Please review the [Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/battery_maintenance_guide_re1/) for proper care and charging of Stretch batteries. +Please review the [Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/docs/battery_maintenance_guide_re1//) for proper care and charging of Stretch batteries. ![](./images/NOCO_Genius10_UI_rs.png) diff --git a/getting_started/quick_start_guide_re2.md b/getting_started/quick_start_guide_re2.md index dc1b839..b4a90ad 100644 --- a/getting_started/quick_start_guide_re2.md +++ b/getting_started/quick_start_guide_re2.md @@ -18,13 +18,7 @@ A few items you'll want to know about before getting started. The entire robot powers up and down with the On/Off switch. When powering down, we recommend selecting 'Power Off' from the Ubuntu Desktop prior to hitting the Off switch -![](./images/trunk_rs.png) - -### LED Lightbar - - The LED lightbar on the base indicates the battery voltage according to its color. It should be green, indicating a full charge. If it is orange or red the batteries require charging. - -![](./images/lightbar_voltage.png) +![](./images/trunk_re2.png) ### Charging the Battery @@ -37,7 +31,7 @@ The provided battery charger can be plugged and unplugged at any time during ope | SUPPLY | 1) Power the robot during tethered use
2) Repair damaged batteries. | | REPAIR | Repair damaged batteries. | -Please review the [Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/battery_maintenance_guide_re1/) for proper care and charging of Stretch batteries. +Please review the [Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/docs/battery_maintenance_guide_re2/) for proper care and charging of Stretch batteries. ![](./images/NOCO_Genius10_UI_rs.png) @@ -49,6 +43,26 @@ To allow motion once again, hold the button down for two seconds. After the beep ![](./images/runstop_rs.png) +### LED Lightbar + +The LED lightbar in the base provides a simple way to quickly ascertain the robot state. At all times its color indicates the battery voltage. + +![](./images/lightbar_voltage.png) + +More information on the voltage display is available in the [Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/docs/battery_maintenance_guide_re2/#state-of-battery-charge) + +The lightbar will also flash as follows: + +| Mode | Flashing | +|--------------------|-----------------------| +| Normal Operation | None | +| Runstopped | Rapid flash at 1 Hz | +| Charger plugged in | Slow strobe at 0.5 Hz | + +Try runstopping the robot and plugging in the charger to become familiar with these modes. + + + ### Safe Handling Like any robot, it is possible to break Stretch if you're not careful. Use common sense when applying forces to its joints, transporting it, etc. @@ -65,7 +79,12 @@ The [Stretch Unpowered Best Practices Video](https://youtu.be/mQdOGEksdYM) provi **Things to be mindful of**: * Manually moving the head and wrist. They will move but they want to go at their own speed. -* The arm will slowly descend when the robot is powered off. If the arm is retracted it may rest the tool on the base. If desired to hold the arm up when un-powered, the provided 'clip-clamp' can be clipped onto the mast below the shoulder to support it. +* The lift will slowly descend when the robot is powered off. If the arm is retracted it may come to rest the tool on the base. If desired to hold the arm up when un-powered, the provided 'clip-clamp' can be clipped onto the mast below the shoulder to support it. + +**NOTE**: The RE2 lift descends faster than the RE1. For the RE2 we recommend always attaching the clip-clamp as shown below prior to powering down the NUC computer + +![](./images/clip-clamp.png) + **Things that can hurt the robot**: @@ -159,6 +178,8 @@ Python 3.8.10 (default, Jun 22 2022, 20:18:18) Now let's move the robot around using the [Stretch Body Robot API](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/robot.py). Try typing in these interactive commands at the iPython prompt: ```python +>>$ ipython +... import stretch_body.robot robot=stretch_body.robot.Robot() robot.startup() diff --git a/mkdocs.yml b/mkdocs.yml index 4e24442..fc1a504 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -111,92 +111,94 @@ nav: - Changing Tools: ./stretch_body/tutorial_tool_change.md - Custom Wrist DOF: ./stretch_body/tutorial_custom_wrist_dof.md - Safety Features: ./stretch_body/tutorial_safe_coding.md - - ROS1 (Melodic): - - Overview: ./ros1_melodic/README.md - - Basics: - - Getting Started: ./ros1_melodic/getting_started.md - - Gazebo Basics: ./ros1_melodic/gazebo_basics.md - - Teleoperating Stretch: ./ros1_melodic/teleoperating_stretch.md - - Internal State of Stretch: ./ros1_melodic/internal_state_of_stretch.md - - RViz Basics: ./ros1_melodic/rviz_basics.md - - Navigation Stack: ./ros1_melodic/navigation_stack.md - - MoveIt! Basics: ./ros1_melodic/moveit_basics.md - - Follow Joint Trajectory Commands: ./ros1_melodic/follow_joint_trajectory.md - - Perception: ./ros1_melodic/perception.md - - ArUco Marker Detection: ./ros1_melodic/aruco_marker_detection.md - - ReSpeaker Microphone Array: ./ros1_melodic/respeaker_microphone_array.md - - FUNMAP: https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap - - Other Examples: - - Teleoperate Stretch with a Node: ./ros1_melodic/example_1.md - - Filter Laser Scans: ./ros1_melodic/example_2.md - - Mobile Base Collision Avoidance: ./ros1_melodic/example_3.md - - Give Stretch a Balloon: ./ros1_melodic/example_4.md - - Print Joint States: ./ros1_melodic/example_5.md - - Store Effort Values: ./ros1_melodic/example_6.md - - Capture Image: ./ros1_melodic/example_7.md - - Voice to Text: ./ros1_melodic/example_8.md - - Voice Teleoperation of Base: ./ros1_melodic/example_9.md - - Tf2 Broadcaster and Listener: ./ros1_melodic/example_10.md - - PointCloud Transformation: ./ros1_melodic/example_11.md - - ArUco Tag Locator: ./ros1_melodic/example_12.md - - 2D Navigation Goals: ./ros1_melodic/example_13.md - - ROS1 (Noetic): - - Overview: ./ros1/README.md - - Basics: - - Getting Started: ./ros1/getting_started.md - - Gazebo Basics: ./ros1/gazebo_basics.md - - Teleoperating Stretch: ./ros1/teleoperating_stretch.md - - Internal State of Stretch: ./ros1/internal_state_of_stretch.md - - RViz Basics: ./ros1/rviz_basics.md - - Navigation Stack: ./ros1/navigation_stack.md - - MoveIt! Basics: ./ros1/moveit_basics.md - - Follow Joint Trajectory Commands: ./ros1/follow_joint_trajectory.md - - Perception: ./ros1/perception.md - - ArUco Marker Detection: ./ros1/aruco_marker_detection.md - - ReSpeaker Microphone Array: ./ros1/respeaker_microphone_array.md - - FUNMAP: https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap - - Other Examples: - - Teleoperate Stretch with a Node: ./ros1/example_1.md - - Filter Laser Scans: ./ros1/example_2.md - - Mobile Base Collision Avoidance: ./ros1/example_3.md - - Give Stretch a Balloon: ./ros1/example_4.md - - Print Joint States: ./ros1/example_5.md - - Store Effort Values: ./ros1/example_6.md - - Capture Image: ./ros1/example_7.md - - Voice to Text: ./ros1/example_8.md - - Voice Teleoperation of Base: ./ros1/example_9.md - - Tf2 Broadcaster and Listener: ./ros1/example_10.md - - PointCloud Transformation: ./ros1/example_11.md - - ArUco Tag Locator: ./ros1/example_12.md - - 2D Navigation Goals: ./ros1/example_13.md - - ROS2: - - Overview: ./ros2/README.md - - Basics: - - Getting Started: ./ros2/getting_started.md - - Gazebo Basics: ./ros2/gazebo_basics.md - - Teleoperating Stretch: ./ros2/teleoperating_stretch.md - - Internal State of Stretch: ./ros2/internal_state_of_stretch.md - - RViz Basics: ./ros2/rviz_basics.md - - Navigation Stack: ./ros2/navigation_stack.md - - MoveIt! Basics: ./ros2/moveit_basics.md - - Follow Joint Trajectory Commands: ./ros2/follow_joint_trajectory.md - # - Perception: ./ros2/perception.md - # - ArUco Marker Detection: ./ros2/aruco_marker_detection.md - # - ReSpeaker Microphone Array: ./ros2/respeaker_microphone_array.md - # - FUNMAP: https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap - # - ROS testing: ./ros2/ros_testing.md - # - Other Nav Stack Features: ./ros2/other_nav_features.md - - Other Examples: - - Teleoperate Stretch with a Node: ./ros2/example_1.md - - Filter Laser Scans: ./ros2/example_2.md - - Mobile Base Collision Avoidance: ./ros2/example_3.md - - Give Stretch a Balloon: ./ros2/example_4.md - # - Print Joint States: ./ros2/example_5.md - # - Store Effort Values: ./ros2/example_6.md - # - Capture Image: ./ros2/example_7.md - # - Voice to Text: ./ros2/example_8.md - # - Voice Teleoperation of Base: ./ros2/example_9.md - - Tf2 Broadcaster and Listener: ./ros2/example_10.md - # - PointCloud Transformation: ./ros2/example_11.md - # - ArUco Tag Locator: ./ros2/example_12.md + + - ROS: + - ROS1 (Melodic): + - Overview: ./ros1_melodic/README.md + - Basics: + - Getting Started: ./ros1_melodic/getting_started.md + - Gazebo Basics: ./ros1_melodic/gazebo_basics.md + - Teleoperating Stretch: ./ros1_melodic/teleoperating_stretch.md + - Internal State of Stretch: ./ros1_melodic/internal_state_of_stretch.md + - RViz Basics: ./ros1_melodic/rviz_basics.md + - Navigation Stack: ./ros1_melodic/navigation_stack.md + - MoveIt! Basics: ./ros1_melodic/moveit_basics.md + - Follow Joint Trajectory Commands: ./ros1_melodic/follow_joint_trajectory.md + - Perception: ./ros1_melodic/perception.md + - ArUco Marker Detection: ./ros1_melodic/aruco_marker_detection.md + - ReSpeaker Microphone Array: ./ros1_melodic/respeaker_microphone_array.md + - FUNMAP: https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap + - Other Examples: + - Teleoperate Stretch with a Node: ./ros1_melodic/example_1.md + - Filter Laser Scans: ./ros1_melodic/example_2.md + - Mobile Base Collision Avoidance: ./ros1_melodic/example_3.md + - Give Stretch a Balloon: ./ros1_melodic/example_4.md + - Print Joint States: ./ros1_melodic/example_5.md + - Store Effort Values: ./ros1_melodic/example_6.md + - Capture Image: ./ros1_melodic/example_7.md + - Voice to Text: ./ros1_melodic/example_8.md + - Voice Teleoperation of Base: ./ros1_melodic/example_9.md + - Tf2 Broadcaster and Listener: ./ros1_melodic/example_10.md + - PointCloud Transformation: ./ros1_melodic/example_11.md + - ArUco Tag Locator: ./ros1_melodic/example_12.md + - 2D Navigation Goals: ./ros1_melodic/example_13.md + - ROS1 (Noetic): + - Overview: ./ros1/README.md + - Basics: + - Getting Started: ./ros1/getting_started.md + - Gazebo Basics: ./ros1/gazebo_basics.md + - Teleoperating Stretch: ./ros1/teleoperating_stretch.md + - Internal State of Stretch: ./ros1/internal_state_of_stretch.md + - RViz Basics: ./ros1/rviz_basics.md + - Navigation Stack: ./ros1/navigation_stack.md + - MoveIt! Basics: ./ros1/moveit_basics.md + - Follow Joint Trajectory Commands: ./ros1/follow_joint_trajectory.md + - Perception: ./ros1/perception.md + - ArUco Marker Detection: ./ros1/aruco_marker_detection.md + - ReSpeaker Microphone Array: ./ros1/respeaker_microphone_array.md + - FUNMAP: https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap + - Other Examples: + - Teleoperate Stretch with a Node: ./ros1/example_1.md + - Filter Laser Scans: ./ros1/example_2.md + - Mobile Base Collision Avoidance: ./ros1/example_3.md + - Give Stretch a Balloon: ./ros1/example_4.md + - Print Joint States: ./ros1/example_5.md + - Store Effort Values: ./ros1/example_6.md + - Capture Image: ./ros1/example_7.md + - Voice to Text: ./ros1/example_8.md + - Voice Teleoperation of Base: ./ros1/example_9.md + - Tf2 Broadcaster and Listener: ./ros1/example_10.md + - PointCloud Transformation: ./ros1/example_11.md + - ArUco Tag Locator: ./ros1/example_12.md + - 2D Navigation Goals: ./ros1/example_13.md + - ROS2 (Galactic, Beta): + - Overview: ./ros2/README.md + - Basics: + - Getting Started: ./ros2/getting_started.md + - Gazebo Basics: ./ros2/gazebo_basics.md + - Teleoperating Stretch: ./ros2/teleoperating_stretch.md + - Internal State of Stretch: ./ros2/internal_state_of_stretch.md + - RViz Basics: ./ros2/rviz_basics.md + - Navigation Stack: ./ros2/navigation_stack.md + - MoveIt! Basics: ./ros2/moveit_basics.md + - Follow Joint Trajectory Commands: ./ros2/follow_joint_trajectory.md + # - Perception: ./ros2/perception.md + # - ArUco Marker Detection: ./ros2/aruco_marker_detection.md + # - ReSpeaker Microphone Array: ./ros2/respeaker_microphone_array.md + # - FUNMAP: https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap + # - ROS testing: ./ros2/ros_testing.md + # - Other Nav Stack Features: ./ros2/other_nav_features.md + - Other Examples: + - Teleoperate Stretch with a Node: ./ros2/example_1.md + - Filter Laser Scans: ./ros2/example_2.md + - Mobile Base Collision Avoidance: ./ros2/example_3.md + - Give Stretch a Balloon: ./ros2/example_4.md + # - Print Joint States: ./ros2/example_5.md + # - Store Effort Values: ./ros2/example_6.md + # - Capture Image: ./ros2/example_7.md + # - Voice to Text: ./ros2/example_8.md + # - Voice Teleoperation of Base: ./ros2/example_9.md + - Tf2 Broadcaster and Listener: ./ros2/example_10.md + # - PointCloud Transformation: ./ros2/example_11.md + # - ArUco Tag Locator: ./ros2/example_12.md diff --git a/ros2/README.md b/ros2/README.md index a959d18..f688646 100644 --- a/ros2/README.md +++ b/ros2/README.md @@ -1,5 +1,7 @@ ![](../images/banner.png) -# Tutorial Track: Stretch ROS2 +# Tutorial Track: Stretch ROS2 (Beta) + +NOTE: ROS2 support for Stretch is currently under active development and is considered 'beta'. This tutorial track is for users looking to become familiar with programming the Stretch RE1 and RE2 via ROS2. We recommend going through the tutorials in the following order: @@ -15,12 +17,12 @@ This tutorial track is for users looking to become familiar with programming the | 6 | [Navigation Stack](navigation_stack.md) | | | 7 | [MoveIt! Basics](moveit_basics.md) | | | 8 | [Follow Joint Trajectory Commands](follow_joint_trajectory.md) | | - +| 13 | [ROS testing](coming_soon.md) | | +| 14 | [Other Nav Stack Features](coming_soon.md) | | ## Other Examples diff --git a/ros2/coming_soon.md b/ros2/coming_soon.md new file mode 100644 index 0000000..1279d65 --- /dev/null +++ b/ros2/coming_soon.md @@ -0,0 +1,2 @@ +![](../images/banner.png) +ROS 2 tutorials are still under active development. Coming soon. \ No newline at end of file diff --git a/ros2/example_1.md b/ros2/example_1.md index 640d41f..9ded7ed 100644 --- a/ros2/example_1.md +++ b/ros2/example_1.md @@ -1,5 +1,5 @@ ## Example 1 - +**NOTE**: ROS 2 tutorials are still under active development.

diff --git a/ros2/example_10.md b/ros2/example_10.md index 14c4d37..8e10282 100644 --- a/ros2/example_10.md +++ b/ros2/example_10.md @@ -1,4 +1,6 @@ # Example 10 +**NOTE**: ROS 2 tutorials are still under active development. + This tutorial provides you an idea of what tf2 can do in the Python track. We will elaborate how to create a tf2 static broadcaster and listener. diff --git a/ros2/example_2.md b/ros2/example_2.md index 7d91c34..38741d5 100644 --- a/ros2/example_2.md +++ b/ros2/example_2.md @@ -1,4 +1,7 @@ + ## Example 2 +**NOTE**: ROS 2 tutorials are still under active development. + The aim of this example is to provide instruction on how to filter scan messages. diff --git a/ros2/example_3.md b/ros2/example_3.md index 96c4f46..6b272f2 100644 --- a/ros2/example_3.md +++ b/ros2/example_3.md @@ -1,4 +1,7 @@ + ## Example 3 +**NOTE**: ROS 2 tutorials are still under active development. + The aim of example 3 is to combine the two previous examples and have Stretch utilize its laser scan data to avoid collision with objects as it drives forward. diff --git a/ros2/example_4.md b/ros2/example_4.md index 7d48b48..45a4c54 100644 --- a/ros2/example_4.md +++ b/ros2/example_4.md @@ -1,4 +1,7 @@ + ## Example 4 +**NOTE**: ROS 2 tutorials are still under active development. + ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/balloon.png) diff --git a/ros2/follow_joint_trajectory.md b/ros2/follow_joint_trajectory.md index 21717ba..e181701 100644 --- a/ros2/follow_joint_trajectory.md +++ b/ros2/follow_joint_trajectory.md @@ -1,4 +1,5 @@ ## FollowJointTrajectory Commands +**NOTE**: ROS 2 tutorials are still under active development. Stretch driver offers a [`FollowJointTrajectory`](http://docs.ros.org/en/api/control_msgs/html/action/FollowJointTrajectory.html) action service for its arm. Within this tutorial we will have a simple FollowJointTrajectory command sent to a Stretch robot to execute. diff --git a/ros2/gazebo_basics.md b/ros2/gazebo_basics.md index 53efdfa..9158281 100644 --- a/ros2/gazebo_basics.md +++ b/ros2/gazebo_basics.md @@ -1,5 +1,7 @@ # Spawning Stretch in Simulation (Gazebo) +**NOTE**: ROS 2 tutorials are still under active development. + ### NOTE Simulation support for Stretch in ROS 2 is under active development. Please reach out to us if you want to work with Stretch in a simulated environment like Gazebo/Ignition in ROS 2. diff --git a/ros2/getting_started.md b/ros2/getting_started.md index a804924..55ffb67 100644 --- a/ros2/getting_started.md +++ b/ros2/getting_started.md @@ -1,5 +1,7 @@ # Getting Started +**NOTE**: ROS 2 tutorials are still under active development. + ## Installing Ubuntu 20.04 with ROS 2 Galactic on Stretch Hello Robot utilizes Ubuntu, an open source Linux operating system, for the Stretch RE1 platform. If you are unfamiliar with the operating system, we encourage you to review a [tutorial](https://ubuntu.com/tutorials/command-line-for-beginners#1-overview) provided by Ubuntu. Additionally, the Linux command line, BASH, is used to execute commands and is needed to run ROS on the Stretch robot. Here is a [tutorial](https://ryanstutorials.net/linuxtutorial/) on getting started with BASH. diff --git a/ros2/internal_state_of_stretch.md b/ros2/internal_state_of_stretch.md index 9030cd2..f637ef0 100644 --- a/ros2/internal_state_of_stretch.md +++ b/ros2/internal_state_of_stretch.md @@ -1,5 +1,7 @@ ## Getting the State of the Robot +**NOTE**: ROS 2 tutorials are still under active development. + Begin by starting up the stretch driver launch file by typing the following in a terminal. ```bash ros2 launch stretch_core stretch_driver.launch.py diff --git a/ros2/moveit_basics.md b/ros2/moveit_basics.md index 9793847..d6bc90a 100644 --- a/ros2/moveit_basics.md +++ b/ros2/moveit_basics.md @@ -1,5 +1,8 @@ # MoveIt! Basics - +``` ## MoveIt! Without Hardware To begin running MoveIt! on stretch, checkout to the feature/hybrid_planning branch and run the demo launch file. diff --git a/ros2/navigation_stack.md b/ros2/navigation_stack.md index 6028bca..ae5c79d 100644 --- a/ros2/navigation_stack.md +++ b/ros2/navigation_stack.md @@ -1,5 +1,6 @@ ## Navigation Stack with Actual robot + ### NOTE Nav 2 support for Stretch in ROS 2 is under active development. Please reach out to us if you want to use Nav 2 with Stretch in ROS 2. diff --git a/ros2/rviz_basics.md b/ros2/rviz_basics.md index 319964a..c962868 100644 --- a/ros2/rviz_basics.md +++ b/ros2/rviz_basics.md @@ -1,5 +1,7 @@ ## Visualizing with RViz +**NOTE**: ROS 2 tutorials are still under active development. + You can utilize RViz to visualize Stretch's sensor information. To begin, run the stretch driver launch file. ```bash diff --git a/stretch_body/tutorial_contact_models.md b/stretch_body/tutorial_contact_models.md index f170443..c85eae5 100644 --- a/stretch_body/tutorial_contact_models.md +++ b/stretch_body/tutorial_contact_models.md @@ -48,16 +48,19 @@ You should see that the arm stops on contact when it extends, however it doesn't The four stepper joints (base, arm, and lift) all support guarded contact settings when executing motion. This is evident in their `move_to` and `move_by` methods. For example, we see in the Arm's base class of [PrismaticJoint](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/prismatic_joint.py): ```python - def move_by(self,x_m,v_m=None, a_m=None, stiffness=None, contact_thresh_pos=None, contact_thresh_neg=None, req_calibration=True,contact_model=None) + def move_by(self,x_m,v_m=None, a_m=None, stiffness=None, contact_thresh_pos_N=None,contact_thresh_neg_N=None, req_calibration=True,contact_thresh_pos=None,contact_thresh_neg=None) ``` -In this method you can optionally specify a contact threshold in the positive direction (`contact_thresh_pos`) and the negative direction `contact_thresh_neg`, as well a contact model (`contact_model` - which we'll learn about below). Note that these optional parameters will default to `None`, in which case the motion will adopt the default settings as defined the robot's parameters: +In this method you can optionally specify a contact threshold in the positive direction (`contact_thresh_pos`) and the negative direction `contact_thresh_neg`. + +**NOTE**: these optional parameters will default to `None`, in which case the motion will adopt the default settings as defined the robot's parameters + +**NOTE**: The parameters `contact_thresh_pos_N` and `contact_thresh_neg_N` are deprecate and no-longer supported. ```bash >>$ stretch_params.py | grep arm | grep contact -... -stretch_body.robot_params.nominal_params param.arm.contact_model effort_pct +... stretch_configuration_params.yaml param.arm.contact_models.effort_pct.contact_thresh_default [-45.0, 45.0] ... ``` @@ -68,17 +71,13 @@ A contact model is simply a function that, given a user specified contact thresh ### The Effort-Pct Contact Model -[Effort-Pct](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/prismatic_joint.py#L142) is the default contact model for Stretch RE2. It simply scales the maximum range of motor currents into the range of [-100,100]. Thus, if you desire to have the robot arm extend but stop at 50% of its maximum current, you would write: +[Effort-Pct](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/prismatic_joint.py) is the default contact model for Stretch RE2. It simply scales the maximum range of motor currents into the range of [-100,100]. Thus, if you desire to have the robot arm extend but stop at 50% of its maximum current, you would write: ```python -robot.arm.move_by(0.1,contact_thresh_pos=50.0, contact_model='effort_pct') +robot.arm.move_by(0.1,contact_thresh_pos=50.0) ``` -### The Pseudo-N Contact Model - -[Pseudo-N](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/prismatic_joint.py#L122) was the original contact model for Stretch RE1. We call it 'pseudo-N' as its contact thresholds are very rough approximations of Newtons. This simple model simply scales the motor current by the actuator parameter `force_N_per_A`. - -Pseudo-N remains the default contact model for RE1 models. However, we recommend that newly developed RE1 code use the Effort-Pct model. + ## Adjusting Contact Behaviors @@ -97,11 +96,11 @@ robot.startup() cpos = 30.0 cneg = -30.0 -robot.arm.move_to(0.0, contact_thresh_pos=cpos, contact_thresh_neg=cneg,contact_model='effort_pct') +robot.arm.move_to(0.0, contact_thresh_pos=cpos, contact_thresh_neg=cneg) robot.push_command() robot.arm.wait_until_at_setpoint() -robot.arm.move_to(0.5,contact_thresh_pos=cpos, contact_thresh_neg=cneg,contact_model='effort_pct') +robot.arm.move_to(0.5,contact_thresh_pos=cpos, contact_thresh_neg=cneg) robot.push_command() robot.arm.wait_until_at_setpoint(timeout=5.0) diff --git a/stretch_body/tutorial_custom_wrist_dof.md b/stretch_body/tutorial_custom_wrist_dof.md index 87e9e17..6b29654 100644 --- a/stretch_body/tutorial_custom_wrist_dof.md +++ b/stretch_body/tutorial_custom_wrist_dof.md @@ -5,7 +5,7 @@ In this tutorial we explore how to add additional degrees of freedom to the Stre Stretch exposes a Dynamixel X-Series TTL control bus at the end of its arm. It uses the [Dynamixel XL430-W250](https://emanual.robotis.com/docs/en/dxl/x/xl430-w250/) for the [WristYaw](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/wrist_yaw.py) and the [StretchGripper](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/stretch_gripper.py) degrees of freedom that come standard with the robot. -See the [Hardware User Guide](https://docs.hello-robot.com/hardware_user_guide/#wrist) to learn how to mechanically attach additional DOFs to the robot. +See the [Hardware User Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/docs/hardware_guide_re2/#wrist-tool-plate) to learn how to mechanically attach additional DOFs to the robot. **Note: Stretch is compatible with [any Dynamixel X Series servo](https://emanual.robotis.com/docs/en/dxl/x/) that utilizes the TTL level Multidrop Bus.** diff --git a/stretch_body/tutorial_splined_trajectories.md b/stretch_body/tutorial_splined_trajectories.md index 469390e..db311ca 100644 --- a/stretch_body/tutorial_splined_trajectories.md +++ b/stretch_body/tutorial_splined_trajectories.md @@ -100,7 +100,8 @@ Sometimes the robot motion isn't quite what is expected when executing a splined For example, the arm trajectory below has a large excursion outside of the joints range of motion (white). This is because the second waypoint expects a non-zero velocity when the arm reaches full extension. - + +![](./images/bad_trajectory.png) Often the trajectory waypoints will be generated from a motion planner. It is important that this planner incorporates the position, velocity, and acceleration constraints of the joint. These can be found by, for example diff --git a/stretch_body/tutorial_stretch_body_api.md b/stretch_body/tutorial_stretch_body_api.md index 8a2449b..2467706 100644 --- a/stretch_body/tutorial_stretch_body_api.md +++ b/stretch_body/tutorial_stretch_body_api.md @@ -1,7 +1,7 @@ # Stretch Body API Reference Stretch Body is the Python interface to working with the Stretch RE1. This page serves as a reference of the interfaces defined in the `stretch_body` library. -See the [Stretch Body Tutorials](shttps://docs.hello-robot.com/0.2/stretch-tutorials/stretch_body/) for additional information on working with this library. +See the [Stretch Body Tutorials](https://docs.hello-robot.com/0.2/stretch-tutorials/stretch_body/) for additional information on working with this library. ## The Robot Class