From 3fd117339d3dee835998ceda5b2bd14ca6f9cbf9 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:13:23 -0700 Subject: [PATCH 01/40] example_2.md Change the path of the RViz configuration and added a note. --- ros2/example_2.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ros2/example_2.md b/ros2/example_2.md index ed71c8f..9bd3e7f 100644 --- a/ros2/example_2.md +++ b/ros2/example_2.md @@ -59,9 +59,11 @@ ros2 run stretch_ros_tutorials scan_filter Then run the following command to bring up a simple RViz configuration of the Stretch robot. ```{.bash .shell-prompt} -ros2 run rviz2 rviz2 -d `ros2 pkg prefix stretch_calibration`/rviz/stretch_simple_test.rviz +ros2 run rviz2 rviz2 -d `ros2 pkg prefix stretch_calibration`/share/stretch_calibration/rviz/stretch_simple_test.rviz ``` - +!!! note + If the laser scan or the filter doesn't appear, you can add it manually in Add, By Topic and you can find the filter_scan there. + Change the topic name from the LaserScan display from */scan* to */filter_scan*.

From c47e271f577de534993083f43136e967c5162ff6 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:16:16 -0700 Subject: [PATCH 02/40] example_4.md Change a typo and the path was incorrect --- ros2/example_4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2/example_4.md b/ros2/example_4.md index 8e8db34..b768420 100644 --- a/ros2/example_4.md +++ b/ros2/example_4.md @@ -9,7 +9,7 @@ Let's bring up Stretch in RViz by using the following command. ```{.bash .shell-prompt} ros2 launch stretch_core stretch_driver.launch.py -ros2 run rviz2 rviz2 -d `ros2 pkg prefix stretch_calibrtion`/rviz/stretch_simple_test.rviz +ros2 run rviz2 rviz2 -d `ros2 pkg prefix stretch_calibration`/share/stretch_calibration/rviz/stretch_simple_test.rviz ``` In a new terminal run the following commands to create a marker. From 2293d0a1102f092016dccf14b79cac2e5a5d6c3b Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:39:47 -0700 Subject: [PATCH 03/40] example_10.md Only minor edits like the tf instead of tf2 --- ros2/example_10.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ros2/example_10.md b/ros2/example_10.md index 7a2a5de..8728584 100644 --- a/ros2/example_10.md +++ b/ros2/example_10.md @@ -21,7 +21,7 @@ ros2 run rviz2 rviz2 Then run the tf2 broadcaster node to visualize three static frames. ```{.bash .shell-prompt} -ros2 run stretch_ros_tutorials tf2_broadcaster +ros2 run stretch_ros_tutorials tf_broadcaster ``` The GIF below visualizes what happens when running the previous node. @@ -222,13 +222,13 @@ ros2 launch stretch_core stretch_driver.launch.py Then run the tf2 broadcaster node to create the three static frames. ```{.bash .shell-prompt} -ros2 run stretch_ros_tutorials tf2_broadcaster +ros2 run stretch_ros_tutorials tf_broadcaster ``` Finally, run the tf2 listener node to print the transform between two links. ```{.bash .shell-prompt} -ros2 run stretch_ros_tutorials tf2_listener +ros2 run stretch_ros_tutorials tf_listener ``` Within the terminal the transform will be printed every 1 second. Below is an example of what will be printed in the terminal. There is also an image for reference of the two frames. From 69b6fde1c0a6e7d4f3d1bf8d037f86b7e1578004 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:50:04 -0700 Subject: [PATCH 04/40] Update getting_started.md Change the deprecated mode from manipulation to trajectory and added how to build in ROS2 --- ros2/getting_started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros2/getting_started.md b/ros2/getting_started.md index 3d0af01..f88818f 100644 --- a/ros2/getting_started.md +++ b/ros2/getting_started.md @@ -22,13 +22,13 @@ We will disable ROS1 by commenting out the ROS1 related lines by adding '#' in f Save this configuration using **Ctrl + S**. Close out of the current terminal and open a new one. ROS2 is now enabled! ## Refreshing the ROS2 workspace -While Stretch ROS2 is in beta, there will be frequent updates to the ROS2 software. Therefore, it makes sense to refresh the ROS2 software to the latest available release. In the ROS and ROS2 world, software is organized into "ROS Workspaces", where packages can be developed, compiled, and be made available to run from the command line. We are going to refresh the ROS2 workspace, which is called "~/ament_ws" and available in the home directory. Follow the [Create a new ROS Workspace guide](https://docs.hello-robot.com/0.2/stretch-install/docs/ros_workspace/) to run the `stretch_create_ament_workspace.sh` script. This will delete the existing "~/ament_ws", create a new one with all of the required ROS2 packages for Stretch, and compile it. +While Stretch ROS2 is in beta, there will be frequent updates to the ROS2 software. Therefore, it makes sense to refresh the ROS2 software to the latest available release. In the ROS and ROS2 world, software is organized into "ROS Workspaces", where packages can be developed, compiled, and be made available to run from the command line. We are going to refresh the ROS2 workspace, which is called "~/ament_ws" and available in the home directory. Follow the [Create a new ROS Workspace guide](https://docs.hello-robot.com/0.2/stretch-install/docs/ros_workspace/) to run the `stretch_create_ament_workspace.sh` script. This will delete the existing "~/ament_ws", create a new one with all of the required ROS2 packages for Stretch, and compile it. Also we need to take into account that building the workspace is different in ROS2, we need to type colcon build instead of catkin make for it to work. ## Testing Keyboard Teleop We can test whether the ROS2 workspace was enabled successfully by testing out the ROS2 drivers package, called "stretch_core", with keyboard teleop. In one terminal, we'll launch Stretch's ROS2 drivers using: ```{.bash .shell-prompt} -ros2 launch stretch_core stretch_driver.launch.py mode:=manipulation +ros2 launch stretch_core stretch_driver.launch.py mode:=trajectory ``` In the second terminal, launch the keyboard teleop node using: From 5759b50840bfc6dccc72bd6939534b6667eb1d17 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:55:22 -0700 Subject: [PATCH 05/40] Update follow_joint_trajectory.md Added a note and a preference of the stretch driver --- ros2/follow_joint_trajectory.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ros2/follow_joint_trajectory.md b/ros2/follow_joint_trajectory.md index b82a538..8dd66f7 100644 --- a/ros2/follow_joint_trajectory.md +++ b/ros2/follow_joint_trajectory.md @@ -1,8 +1,10 @@ ## FollowJointTrajectory Commands !!! note ROS 2 tutorials are still under active development. +!!! note 2 + For this exercise you'll need to have Ubuntu 22.04 and ROS Iron for it to work completly. -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. +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. And just as the past practice, it's preferable to have the stretch driver in trajectory mode. ## Stow Command Example From 63046cbcf459c64af8cd6b96fd9979810fec7ed0 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:57:00 -0700 Subject: [PATCH 06/40] Update follow_joint_trajectory.md --- ros2/follow_joint_trajectory.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ros2/follow_joint_trajectory.md b/ros2/follow_joint_trajectory.md index 8dd66f7..5897f04 100644 --- a/ros2/follow_joint_trajectory.md +++ b/ros2/follow_joint_trajectory.md @@ -1,6 +1,7 @@ ## FollowJointTrajectory Commands !!! note ROS 2 tutorials are still under active development. + !!! note 2 For this exercise you'll need to have Ubuntu 22.04 and ROS Iron for it to work completly. From 50047a886b35e87b04a162dba901f3f9fa61e194 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:01:18 -0700 Subject: [PATCH 07/40] Update internal_state_of_stretch.md Added an updated image --- ros2/internal_state_of_stretch.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ros2/internal_state_of_stretch.md b/ros2/internal_state_of_stretch.md index ccb3889..05aaf3c 100644 --- a/ros2/internal_state_of_stretch.md +++ b/ros2/internal_state_of_stretch.md @@ -42,5 +42,8 @@ ros2 run rqt_graph rqt_graph ``` ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/rqt_graph.png) +![image](https://github.com/hello-robot/stretch_tutorials/assets/141784078/f34876b8-775c-4c25-9e63-5aa53b2fb006) + + The graph allows a user to observe and affirm if topics are broadcasted to the correct nodes. This method can also be utilized to debug communication issues. From 9bc09f043ff615b5ce9cab0bc9d8538d73155f9a Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:04:11 -0700 Subject: [PATCH 08/40] Update internal_state_of_stretch.md Change the updated image to see changes --- ros2/internal_state_of_stretch.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ros2/internal_state_of_stretch.md b/ros2/internal_state_of_stretch.md index 05aaf3c..9a0b15e 100644 --- a/ros2/internal_state_of_stretch.md +++ b/ros2/internal_state_of_stretch.md @@ -42,7 +42,8 @@ ros2 run rqt_graph rqt_graph ``` ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/rqt_graph.png) -![image](https://github.com/hello-robot/stretch_tutorials/assets/141784078/f34876b8-775c-4c25-9e63-5aa53b2fb006) +![image](https://github.com/hello-robot/stretch_tutorials/assets/141784078/ab033d89-d861-44f4-92f3-966dba2d98de) + From 2e0bbeacb3a5a9bf7cb24c96dac9fe8358851e61 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:05:09 -0700 Subject: [PATCH 09/40] Update internal_state_of_stretch.md Now it is a better image --- ros2/internal_state_of_stretch.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ros2/internal_state_of_stretch.md b/ros2/internal_state_of_stretch.md index 9a0b15e..3c816a3 100644 --- a/ros2/internal_state_of_stretch.md +++ b/ros2/internal_state_of_stretch.md @@ -42,7 +42,8 @@ ros2 run rqt_graph rqt_graph ``` ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/rqt_graph.png) -![image](https://github.com/hello-robot/stretch_tutorials/assets/141784078/ab033d89-d861-44f4-92f3-966dba2d98de) +![image](https://github.com/hello-robot/stretch_tutorials/assets/141784078/9d6a303c-1681-4723-932c-212f5ced1044) + From 813350fa94a348e48cda5d7c5a7f7d19020c4d97 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:06:00 -0700 Subject: [PATCH 10/40] Update internal_state_of_stretch.md Deleted old image and change it for an updated one --- ros2/internal_state_of_stretch.md | 1 - 1 file changed, 1 deletion(-) diff --git a/ros2/internal_state_of_stretch.md b/ros2/internal_state_of_stretch.md index 3c816a3..ddc311b 100644 --- a/ros2/internal_state_of_stretch.md +++ b/ros2/internal_state_of_stretch.md @@ -41,7 +41,6 @@ A powerful tool to visualize the ROS communication is through the rqt_graph pack ros2 run rqt_graph rqt_graph ``` -![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/rqt_graph.png) ![image](https://github.com/hello-robot/stretch_tutorials/assets/141784078/9d6a303c-1681-4723-932c-212f5ced1044) From 25010666303dd702e7b415a0d7e9b39df13e020e Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 08:48:09 -0700 Subject: [PATCH 11/40] Update align_to_aruco.md Fixed a typo and differentiation in the angle and distance in bold. --- ros2/align_to_aruco.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros2/align_to_aruco.md b/ros2/align_to_aruco.md index 2ed21b6..4c0e879 100644 --- a/ros2/align_to_aruco.md +++ b/ros2/align_to_aruco.md @@ -84,7 +84,7 @@ The joint_states_callback is the callback method that receives the most recent j self.joint_state = joint_state ``` -The copute_difference() method is where we call the get_transform() method from the FrameListener class to compute the difference between the base_link and base_right frame with an offset of 0.5 m in the negative y-axis. +The compute_difference() method is where we call the get_transform() method from the FrameListener class to compute the difference between the base_link and base_right frame with an offset of 0.5 m in the negative y-axis. ```python def compute_difference(self): self.trans_base, self.trans_camera = self.node.get_transforms() @@ -103,7 +103,7 @@ To compute the (x, y) coordinates of the SE2 pose goal, we compute the transform base_position_y = P_base[1, 0] ``` -From this, it is relatively straightforward to compute the angle phi and the euclidean distance dist. We then compute the angle z_rot_base to perform the last angle correction. +From this, it is relatively straightforward to compute the angle **ph**i and the euclidean distance **dist**. We then compute the angle z_rot_base to perform the last angle correction. ```python phi = atan2(base_position_y, base_position_x) From 0bfd6bd839b2fe3ab97bda8ddc9555e9a91ea6c8 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 08:48:40 -0700 Subject: [PATCH 12/40] Update align_to_aruco.md --- ros2/align_to_aruco.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2/align_to_aruco.md b/ros2/align_to_aruco.md index 4c0e879..7d0c867 100644 --- a/ros2/align_to_aruco.md +++ b/ros2/align_to_aruco.md @@ -103,7 +103,7 @@ To compute the (x, y) coordinates of the SE2 pose goal, we compute the transform base_position_y = P_base[1, 0] ``` -From this, it is relatively straightforward to compute the angle **ph**i and the euclidean distance **dist**. We then compute the angle z_rot_base to perform the last angle correction. +From this, it is relatively straightforward to compute the angle **phi** and the euclidean distance **dist**. We then compute the angle z_rot_base to perform the last angle correction. ```python phi = atan2(base_position_y, base_position_x) From c08cfd68faeba9830a279c63bd5f71e665fe8d85 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 09:51:53 -0700 Subject: [PATCH 13/40] Fix a typo --- ros2/deep_perception.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2/deep_perception.md b/ros2/deep_perception.md index 5018635..1dd6f28 100644 --- a/ros2/deep_perception.md +++ b/ros2/deep_perception.md @@ -134,7 +134,7 @@ ros2 launch stretch_deep_perception stretch_detect_faces.launch.py ![detect_faces](https://user-images.githubusercontent.com/97639181/196327737-7091cd61-f79a-4ff0-a291-039ab3f7127a.gif) ## Code Breakdown -Ain't that something! If you followed the breakdown in object detection, you'll find that the only change if you are looking to detect faces, facial landmarks or estimat head pose instead of detecting objects is in using a different deep learning model that does just that. For this, we will explore how to use the OpenVINO toolkit. Let's head to the detect_faces.py [node](https://github.com/hello-robot/stretch_ros2/blob/galactic/stretch_deep_perception/stretch_deep_perception/detect_faces.py) to begin. +Ain't that something! If you followed the breakdown in object detection, you'll find that the only change if you are looking to detect faces, facial landmarks or estimate head pose instead of detecting objects is in using a different deep learning model that does just that. For this, we will explore how to use the OpenVINO toolkit. Let's head to the detect_faces.py [node](https://github.com/hello-robot/stretch_ros2/blob/galactic/stretch_deep_perception/stretch_deep_perception/detect_faces.py) to begin. In the main() method, we see a similar structure as with the object detction node. We first create an instance of the detector using the HeadPoseEstimator class from the [head_estimator.py](https://github.com/hello-robot/stretch_ros2/blob/galactic/stretch_deep_perception/stretch_deep_perception/head_estimator.py) script to configure the deep learning models. Next, we pass this to an instance of the DetectionNode class from the detection_node.py script and call the main function. ```python From f57b92796e6ca571c0302f3f5b90f70100cd7231 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:13:30 -0700 Subject: [PATCH 14/40] Note with more information Added a little more information if the people haven't used iPython before on how to exit or how to experiment with this tutorials. --- getting_started/quick_start_guide_re1.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/getting_started/quick_start_guide_re1.md b/getting_started/quick_start_guide_re1.md index 94f51f7..435eb46 100644 --- a/getting_started/quick_start_guide_re1.md +++ b/getting_started/quick_start_guide_re1.md @@ -143,7 +143,7 @@ Once the robot has homed, let's write some quick test code: ```{.bash .shell-prompt} ipython ``` - + Now let's move the robot around using the Robot API. Try typing in these interactive commands at the iPython prompt: ```{.python .no-copy} @@ -177,7 +177,8 @@ robot.end_of_arm.move_to('stretch_gripper',-50) robot.stow() robot.stop() ``` - +!!! note + If you haven't use iPython before you can copy all the code and paste it in the terminal instead of line by line! Also if you want to exit the iPython prompt write exit() ## Change Credentials Finally, we recommend that you change the login credentials for the default user, hello-robot. From cfba23f2c38e460896f2a73ed89f7c2a86b7db9a Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:15:47 -0700 Subject: [PATCH 15/40] Added a note for more information of iPython Just the same as quick start guide for RE1, added a note with more information about how to use iPython. --- getting_started/quick_start_guide_re2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/getting_started/quick_start_guide_re2.md b/getting_started/quick_start_guide_re2.md index eb3e5ae..0dbf37d 100644 --- a/getting_started/quick_start_guide_re2.md +++ b/getting_started/quick_start_guide_re2.md @@ -194,6 +194,7 @@ robot.end_of_arm.move_to('stretch_gripper',-50) robot.stow() robot.stop() ``` +!!! note If you haven't use iPython before you can copy all the code and paste it in the terminal instead of line by line! Also if you want to exit the iPython prompt write exit() ## Change Credentials From 6e5c99a9af90fb0c70d9b8178f3ed651651b7aac Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:54:38 -0700 Subject: [PATCH 16/40] minor edit --- stretch_body/tutorial_robot_motion.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stretch_body/tutorial_robot_motion.md b/stretch_body/tutorial_robot_motion.md index ea46850..5236a00 100644 --- a/stretch_body/tutorial_robot_motion.md +++ b/stretch_body/tutorial_robot_motion.md @@ -4,6 +4,7 @@ As we've seen in previous tutorials, commanding robot motion is simple and strai ```python linenums="1" import stretch_body.robot +import time robot=stretch_body.robot.Robot() robot.startup() @@ -18,6 +19,7 @@ The absolute motion can be commanded by: ```python linenums="1" import stretch_body.robot +import time robot=stretch_body.robot.Robot() robot.startup() @@ -34,6 +36,7 @@ In the above examples, we executed a `time.sleep()` after `robot.push_command()` ```python linenums="1" import stretch_body.robot +import time robot=stretch_body.robot.Robot() robot.startup() @@ -130,6 +133,7 @@ As we see here, the `robot.push_command()` call is not required as the motion be ```python import stretch_body.robot +import time from stretch_body.hello_utils import deg_to_rad robot=stretch_body.robot.Robot() @@ -152,6 +156,7 @@ Similar to the stepper joints, the Dynamixel joints accept motion profile and mo ```python import stretch_body.robot +import time robot=stretch_body.robot.Robot() robot.startup() From 1ecd0904da5ef0b2e0b174467c8b34212f6a70a9 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:54:26 -0700 Subject: [PATCH 17/40] Updated the robot status part Updated the robot status part making a difference on the subclasses that changed, meaning Prismatic Joint and Dynamixel adding there the corresponding codes and make a difference in the example of the arm class. --- stretch_body/tutorial_introduction.md | 30 +++++++++++++++++++-------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/stretch_body/tutorial_introduction.md b/stretch_body/tutorial_introduction.md index e257191..5d93b66 100644 --- a/stretch_body/tutorial_introduction.md +++ b/stretch_body/tutorial_introduction.md @@ -95,24 +95,36 @@ Parameters may be named with a suffix to help describe the unit type. For exampl ### The Robot Status -The Robot derives from the [Device class](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/device.py). It also encapsulates several other Devices: +The Robot derives from the [Device class](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/device.py) and we have subclasses that derives from this Device class such as the [Prismatic Joint](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/prismatic_joint.py) and the [Dynamixel XL460](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/dynamixel_hello_XL430.py). It also encapsulates several other Devices: -* [robot.head](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/head.py) -* [robot.arm](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/arm.py) -* [robot.lift](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/lift.py) +**Device** * [robot.base](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/base.py) * [robot.wacc](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/wacc.py) * [robot.pimu](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/pimu.py) + +**Prismatic Joint** +* [robot.arm](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/arm.py) +* [robot.lift](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/lift.py) + +**Dynamixel XL460** +* [robot.head](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/head.py) * [robot.end_of_arm](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/end_of_arm.py) All devices contain a Status dictionary. The Status contains the most recent sensor and state data of that device. For example, looking at the Arm class we see: ```python -class Arm(Device): - def __init__(self): +class Arm(PrismaticJoint): + def __init__(self,usb=None): + +``` +As we can see the arm class is part of the PrismaticJoint class but this is also part of the Device class as we can see here: + +```python +class PrismaticJoint(Device): + def __init__(self,name,usb=None): ... - self.status = {'pos': 0.0, 'vel': 0.0, 'force':0.0, \ - 'motor':self.motor.status,'timestamp_pc':0} + self.status = {'timestamp_pc':0,'pos':0.0, 'vel':0.0, \ + 'force':0.0,'motor':self.motor.status} ``` The Status dictionaries are automatically updated by a background thread of the Robot class at around 25Hz. The Status data can be accessed via the Robot class as below: @@ -189,4 +201,4 @@ robot.stop() The Dynamixel servos do not use the Hello Robot communication protocol. As such, the head, wrist, and gripper will move immediately upon issuing a motion command. ------ -

All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.
\ No newline at end of file +
All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.
From 680fd24b3f7738f1367fb4fbb53f77b8e0f84b16 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:57:15 -0700 Subject: [PATCH 18/40] MInor visualization edit --- stretch_body/tutorial_introduction.md | 1 - 1 file changed, 1 deletion(-) diff --git a/stretch_body/tutorial_introduction.md b/stretch_body/tutorial_introduction.md index 5d93b66..be14641 100644 --- a/stretch_body/tutorial_introduction.md +++ b/stretch_body/tutorial_introduction.md @@ -115,7 +115,6 @@ All devices contain a Status dictionary. The Status contains the most recent sen ```python class Arm(PrismaticJoint): def __init__(self,usb=None): - ``` As we can see the arm class is part of the PrismaticJoint class but this is also part of the Device class as we can see here: From e8ea325b9486b2fcaba8c6362ad9ae8447bca07e Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:26:01 -0700 Subject: [PATCH 19/40] Minor edit There was an incorrect description in rate = rospy.rate(), there wasn't an explanation, instead there was again the explanation of rospy.spin() --- ros1/example_4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros1/example_4.md b/ros1/example_4.md index 534bd17..0a65e08 100644 --- a/ros1/example_4.md +++ b/ros1/example_4.md @@ -172,7 +172,7 @@ The next line, `rospy.init_node(NAME, ...)`, is very important as it tells rospy Instantiate class with `Balloon()`. -Give control to ROS with `rospy.spin()`. This will allow the callback to be called whenever new messages come in. If we don't put this line in, then the node will not work, and ROS will not process any messages. +The `rospy.rate()` is the rate at which the node is going to publish information (10 Hz). ```python while not rospy.is_shutdown(): From 1f3074c42bb903f7c56d58b86ce69ef91c413cc0 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:28:09 -0700 Subject: [PATCH 20/40] Minor change I change the name of the launch file because it hasn't the name "sample" --- ros1/example_8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros1/example_8.md b/ros1/example_8.md index 518f8de..e9bb6d3 100644 --- a/ros1/example_8.md +++ b/ros1/example_8.md @@ -9,7 +9,7 @@ This example will showcase how to save the interpreted speech from Stretch's [Re Begin by running the `respeaker.launch` file in a terminal. ```{.bash .shell-prompt} -roslaunch respeaker_ros sample_respeaker.launch +roslaunch respeaker_ros respeaker.launch ``` Then run the [speech_text.py](https://github.com/hello-robot/stretch_tutorials/blob/noetic/src/speech_text.py) node. In a new terminal, execute: From 47e8a502da1489b64b3a27d2b315c15d4a4a64a7 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:32:30 -0700 Subject: [PATCH 21/40] Added the missing link I just added in the Code Breakdown part the missing link to watch the full script in github --- ros1/autodocking_nav_stack.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros1/autodocking_nav_stack.md b/ros1/autodocking_nav_stack.md index e5d75d8..f8c4651 100644 --- a/ros1/autodocking_nav_stack.md +++ b/ros1/autodocking_nav_stack.md @@ -71,7 +71,7 @@ The third child of the root node is the `Move to dock` action node. This is a si The fourth and final child of the sequence node is another `fallback` node with two children - the `Charging?` condition node and the `Move to predock` action node with an `inverter` decorator node (+/- sign). The `Charging?` condition node is a subscriber that checks if the 'present' attribute of the `BatteryState` message is True. If the robot has backed up correctly into the docking station and the charger port latched, this node should return SUCCESS and the autodocking would succeed. If not, the robot moves back to the predock pose through the `Move to predock` action node and tries again. ## Code Breakdown -Let's jump into the code to see how things work under the hood. Follow along [here]() (TODO after merge) to have a look at the entire script. +Let's jump into the code to see how things work under the hood. Follow along [here](https://github.com/hello-robot/stretch_ros/blob/noetic/stretch_demos/nodes/autodocking_bt.py) (TODO after merge) to have a look at the entire script. We start off by importing the dependencies. The ones of interest are those relating to py-trees and the various behaviour classes in autodocking.autodocking_behaviours, namely, MoveBaseActionClient, CheckTF and VisualServoing. We also created custom ROS action messages for the ArucoHeadScan action defined in the action directory of stretch_demos package. ```python From bc8a192f316429c3637846ae07db2e7872b5ac80 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 9 Aug 2023 15:07:17 -0700 Subject: [PATCH 22/40] Update joint limits The joint limits are updated now, I found them in the stretch_main.xacro and stretch_dex_wrist.xacro from the stretch_description/urdf file --- ros1/follow_joint_trajectory.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ros1/follow_joint_trajectory.md b/ros1/follow_joint_trajectory.md index 3a5f6b9..0e32373 100644 --- a/ros1/follow_joint_trajectory.md +++ b/ros1/follow_joint_trajectory.md @@ -293,12 +293,12 @@ You can also actuate a single joint for the Stretch. Below is the list of joints ```{.bash .no-copy} ############################# JOINT LIMITS ############################# -joint_lift: lower_limit = 0.15, upper_limit = 1.10 # in meters +joint_lift: lower_limit = 0.00, upper_limit = 1.10 # in meters wrist_extension: lower_limit = 0.00, upper_limit = 0.50 # in meters joint_wrist_yaw: lower_limit = -1.75, upper_limit = 4.00 # in radians -joint_head_pan: lower_limit = -2.80, upper_limit = 2.90 # in radians -joint_head_tilt: lower_limit = -1.60, upper_limit = 0.40 # in radians -joint_gripper_finger_left: lower_limit = -0.35, upper_limit = 0.165 # in radians +joint_head_pan: lower_limit = -3.90, upper_limit = 1.50 # in radians +joint_head_tilt: lower_limit = -1.53, upper_limit = 0.79 # in radians +joint_gripper_finger_left: lower_limit = -0.6, upper_limit = 0.6 # in radians # INCLUDED JOINTS IN POSITION MODE translate_mobile_base: No lower or upper limit. Defined by a step size in meters @@ -410,4 +410,4 @@ trajectory_goal.trajectory.header.stamp = rospy.Time(0.0) trajectory_goal.trajectory.header.frame_id = 'base_link' ``` -Set `trajectory_goal` as a `FollowJointTrajectoryGoal` and define the joint names as a list. Then `trajectory_goal.trajectory.points` set by your list of points. Specify the coordinate frame that we want (*base_link*) and set the time to be now. \ No newline at end of file +Set `trajectory_goal` as a `FollowJointTrajectoryGoal` and define the joint names as a list. Then `trajectory_goal.trajectory.points` set by your list of points. Specify the coordinate frame that we want (*base_link*) and set the time to be now. From d488ab938a9ffc86a96adb80c44a515812b57519 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:25:12 -0700 Subject: [PATCH 23/40] Fix an error in the program trajectories code There was something missing after the follow trajectory command and it was the push command and a time sleep to work. --- stretch_body/tutorial_splined_trajectories.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stretch_body/tutorial_splined_trajectories.md b/stretch_body/tutorial_splined_trajectories.md index dc54315..1e02bd2 100644 --- a/stretch_body/tutorial_splined_trajectories.md +++ b/stretch_body/tutorial_splined_trajectories.md @@ -61,6 +61,7 @@ Programming a splined trajectory is straightforward. For example, try the follow import stretch_body.robot r=stretch_body.robot.Robot() r.startup() +#r.arm.motor.disable_sync_mode() **If you want to try running the code with this command you'll need to coment the r.push_command() and it will work as well #Define the waypoints times = [0.0, 10.0, 20.0] @@ -73,6 +74,8 @@ for waypoint in zip(times, positions, velocities): #Begin execution r.arm.follow_trajectory() +r.push_command() +time.sleep(0.1) #Wait unti completion while r.arm.is_trajectory_active(): @@ -87,7 +90,7 @@ This will cause the arm to move from its current position to 0.45m, then back to * This will execute a Cubic spline as we did not pass in accelerations to in `r.arm.trajectory.add` * The call to `r.arm.follow_trajectory` is non-blocking and the trajectory generation is handled by a background thread of the Robot class -If you're interested in exploring the trajectory API further the [code for the `stretch_trajectory_jog.py`](https://github.com/hello-robot/stretch_body/blob/master/tools/bin/stretch_trajectory_jog.py) is a great reference to get started. +If you're interested in exploring the trajectory API further. the [code for the `stretch_trajectory_jog.py`](https://github.com/hello-robot/stretch_body/blob/master/tools/bin/stretch_trajectory_jog.py) is a great reference to get started. ## Advanced: Controller Parameters From cd7aea1dfaa489d0e1cb8ac8a4e695c791e16e84 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:42:13 -0700 Subject: [PATCH 24/40] Minimal thing --- stretch_body/tutorial_robot_motion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stretch_body/tutorial_robot_motion.md b/stretch_body/tutorial_robot_motion.md index 5236a00..ef42a8c 100644 --- a/stretch_body/tutorial_robot_motion.md +++ b/stretch_body/tutorial_robot_motion.md @@ -53,7 +53,7 @@ robot.push_command() time.sleep(2.0) robot.arm.move_to(0.0) robot.arm.wait_until_at_setpoint() - + robot.stop() ``` From 08124a5b88def586e61ac95f985e912f31509db8 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:43:06 -0700 Subject: [PATCH 25/40] Minimal things --- stretch_body/tutorial_robot_motion.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stretch_body/tutorial_robot_motion.md b/stretch_body/tutorial_robot_motion.md index ef42a8c..3c1cf25 100644 --- a/stretch_body/tutorial_robot_motion.md +++ b/stretch_body/tutorial_robot_motion.md @@ -11,7 +11,7 @@ robot.startup() robot.arm.move_by(0.1) robot.push_command() time.sleep(2.0) - + robot.stop() ``` @@ -26,7 +26,7 @@ robot.startup() robot.arm.move_to(0.1) robot.push_command() time.sleep(2.0) - + robot.stop() ``` @@ -121,7 +121,7 @@ robot.arm.wait_until_at_setpoint() robot.arm.move_to(0.5) robot.push_command() robot.arm.wait_until_at_setpoint() - + robot.stop() ``` @@ -148,7 +148,7 @@ robot.head.move_to('head_pan',deg_to_rad(90.0)) robot.head.move_to('head_tilt',deg_to_rad(45.0)) time.sleep(3.0) - + robot.stop() ``` @@ -177,7 +177,7 @@ a = robot.params['head_pan']['motion']['slow']['accel'] robot.head.move_to('head_pan',deg_to_rad(90.0),v_r=v, a_r=a) time.sleep(3.0) - + robot.stop() ``` From 01e333e28ef38483c95742f77a620228c26ea18b Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:07:42 -0700 Subject: [PATCH 26/40] Update some outputs and change some inputs The --baud in the input commands weren't working anymore so if I tried the same commands without them it functions normally and the outputs for some commands are also different. --- stretch_body/tutorial_dynamixel_servos.md | 83 +++++++++++++---------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/stretch_body/tutorial_dynamixel_servos.md b/stretch_body/tutorial_dynamixel_servos.md index 899f796..e3eb3df 100644 --- a/stretch_body/tutorial_dynamixel_servos.md +++ b/stretch_body/tutorial_dynamixel_servos.md @@ -32,7 +32,7 @@ REx_dynamixel_jog.py /dev/hello-dynamixel-head 11 Output: ```{.bash .no-copy} -[Dynamixel ID:011] ping Succeeded. Dynamixel model number : 1080 +[Dynamixel ID:011] ping Succeeded. Dynamixel model number : 1080. Baud 115200 ------ MENU ------- m: menu a: increment position 50 tick @@ -52,6 +52,10 @@ t: set max temp i: set id d: disable torque e: enable torque +x: put in multi-turn mode +y: put in position mode +w: put in pwm mode +f: put in vel mode ------------------- ``` @@ -67,12 +71,14 @@ Output: ```{.bash .no-copy} For use with S T R E T C H (TM) RESEARCH EDITION from Hello Robot Inc. ----- Rebooting Head ---- +Rebooting: head_pan [Dynamixel ID:011] Reboot Succeeded. +Rebooting: head_tilt [Dynamixel ID:012] Reboot Succeeded. ----- Rebooting Wrist ---- -[Dynamixel ID:013] Reboot Succeeded. +Rebooting: stretch_gripper [Dynamixel ID:014] Reboot Succeeded. +Rebooting: wrist_yaw +[Dynamixel ID:013] Reboot Succeeded. ``` ### Identify Servos on the Bus @@ -80,38 +86,42 @@ For use with S T R E T C H (TM) RESEARCH EDITION from Hello Robot Inc. If it is unclear which servos are on the bus, and at what baud rate, you can use the `REx_dynamixel_id_scan.py` tool. Here we see that the two head servos are at ID `11` and `12` at baud `57600`. ```{.bash .shell-prompt} -REx_dynamixel_id_scan.py /dev/hello-dynamixel-head --baud 57600 +REx_dynamixel_id_scan.py /dev/hello-dynamixel-head ``` Output: ```{.bash .no-copy} Scanning bus /dev/hello-dynamixel-head at baud rate 57600 ---------------------------------------------------------- -[Dynamixel ID:000] ping Failed. -[Dynamixel ID:001] ping Failed. -[Dynamixel ID:002] ping Failed. -[Dynamixel ID:003] ping Failed. -[Dynamixel ID:004] ping Failed. -[Dynamixel ID:005] ping Failed. -[Dynamixel ID:006] ping Failed. -[Dynamixel ID:007] ping Failed. -[Dynamixel ID:008] ping Failed. -[Dynamixel ID:009] ping Failed. -[Dynamixel ID:010] ping Failed. -[Dynamixel ID:011] ping Succeeded. Dynamixel model number : 1080 -[Dynamixel ID:012] ping Succeeded. Dynamixel model number : 1060 -[Dynamixel ID:013] ping Failed. -[Dynamixel ID:014] ping Failed. -[Dynamixel ID:015] ping Failed. -[Dynamixel ID:016] ping Failed. -[Dynamixel ID:017] ping Failed. -[Dynamixel ID:018] ping Failed. -[Dynamixel ID:019] ping Failed. -[Dynamixel ID:020] ping Failed. -[Dynamixel ID:021] ping Failed. -[Dynamixel ID:022] ping Failed. -[Dynamixel ID:023] ping Failed. -[Dynamixel ID:024] ping Failed. +Scanning bus /dev/hello-dynamixel-head +Checking ID 0 +Checking ID 1 +Checking ID 2 +Checking ID 3 +Checking ID 4 +Checking ID 5 +Checking ID 6 +Checking ID 7 +Checking ID 8 +Checking ID 9 +Checking ID 10 +Checking ID 11 +[Dynamixel ID:011] ping Succeeded. Dynamixel model number : 1080. Baud 115200 +Checking ID 12 +[Dynamixel ID:012] ping Succeeded. Dynamixel model number : 1060. Baud 115200 +Checking ID 13 +Checking ID 14 +Checking ID 15 +Checking ID 16 +Checking ID 17 +Checking ID 18 +Checking ID 19 +Checking ID 20 +Checking ID 21 +Checking ID 22 +Checking ID 23 +Checking ID 24 + ``` ### Setting the Servo Baud Rate @@ -125,10 +135,8 @@ REx_dynamixel_set_baud.py /dev/hello-dynamixel-wrist 13 115200 Output: ```{.bash .no-copy} --------------------- -Checking servo current baud for 57600 ----- -Identified current baud of 57600. Changing baud to 115200 -Success at changing baud + +Success at changing baud. Current baud is 115200 for servo 13 on bus /dev/hello-dynamixel-wrist ``` !!! note @@ -139,15 +147,15 @@ Success at changing baud Dynamixel servos come with `ID=1` from the factory. When adding your servos to the end-of-arm tool, you may want to set the servo ID using the `REx_dynamixel_id_change.py` tool. For example: ```{.bash .shell-prompt} -REx_dynamixel_id_change.py /dev/hello-dynamixel-wrist 1 13 --baud 115200 +REx_dynamixel_id_change.py /dev/hello-dynamixel-wrist 1 13 ``` Output: ```{.bash .no-copy} -[Dynamixel ID:001] ping Succeeded. Dynamixel model number : 1080 +[Dynamixel ID:001] ping Succeeded. Dynamixel model number : 1080. Baud 115200 Ready to change ID 1 to 13. Hit enter to continue: -[Dynamixel ID:013] ping Succeeded. Dynamixel model number : 1080 +[Dynamixel ID:013] ping Succeeded. Dynamixel model number : 1080. Baud 115200 Success at setting ID to 13 ``` @@ -219,6 +227,7 @@ stretch_params.py | grep head_pan | grep '_t ' Output: ```{.bash .no-copy} +stretch_body.robot_params.nominal_params param.head_pan.range_pad_t [50.0, -50.0] stretch_configuration_params.yaml param.head_pan.range_t [0, 3827] stretch_configuration_params.yaml param.head_pan.zero_t 1250 ``` From 5554378d7dd38728b995d152882ba97c798fb1f8 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:15:21 -0700 Subject: [PATCH 27/40] Added some output changes It's a minimal thing but I added the new outputs of usb_name and the force_N_per --- stretch_body/tutorial_parameter_management.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stretch_body/tutorial_parameter_management.md b/stretch_body/tutorial_parameter_management.md index 05f87f6..01ec140 100644 --- a/stretch_body/tutorial_parameter_management.md +++ b/stretch_body/tutorial_parameter_management.md @@ -15,7 +15,9 @@ a.params ```{.python .no-copy} Out[7]: -{'chain_pitch': 0.0167, +{'usb_name': '/dev/hello-motor-arm', + 'force_N_per_A': 55.9 + 'chain_pitch': 0.0167, 'chain_sprocket_teeth': 10, 'gr_spur': 3.875, 'i_feedforward': 0, @@ -42,7 +44,9 @@ a.robot_params['lift'] ```{.python .no-copy} Out[9]: -{'calibration_range_bounds': [1.094, 1.106], +{'usb_name': '/dev/hello-motor-lift', + 'force_N_per_A': 75.0 + 'calibration_range_bounds': [1.094, 1.106], 'contact_model': 'effort_pct', 'contact_model_homing': 'effort_pct', 'contact_models': {'effort_pct': {'contact_thresh_calibration_margin': 10.0, @@ -149,4 +153,4 @@ robot.write_user_param_to_YAML('base.wheel_separation_m', d_avg) This will update the file `stretch_user_params.yaml`. ------ -
All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.
\ No newline at end of file +
All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.
From 5109f651794af0b881674cab32c695bad0f25502 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:20:37 -0700 Subject: [PATCH 28/40] Erase something I didn't think it will affect that much the documentation, feel free to change it. --- stretch_body/tutorial_dynamixel_servos.md | 1 - 1 file changed, 1 deletion(-) diff --git a/stretch_body/tutorial_dynamixel_servos.md b/stretch_body/tutorial_dynamixel_servos.md index e3eb3df..d6c8224 100644 --- a/stretch_body/tutorial_dynamixel_servos.md +++ b/stretch_body/tutorial_dynamixel_servos.md @@ -227,7 +227,6 @@ stretch_params.py | grep head_pan | grep '_t ' Output: ```{.bash .no-copy} -stretch_body.robot_params.nominal_params param.head_pan.range_pad_t [50.0, -50.0] stretch_configuration_params.yaml param.head_pan.range_t [0, 3827] stretch_configuration_params.yaml param.head_pan.zero_t 1250 ``` From aa3fdb029e1fb58d0fadce2a798e09d0cb411eff Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:42:44 -0700 Subject: [PATCH 29/40] Remove moveit link from readme --- ros1/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ros1/README.md b/ros1/README.md index f070023..487d027 100644 --- a/ros1/README.md +++ b/ros1/README.md @@ -17,12 +17,11 @@ This tutorial track is for users looking to get familiar with programming Stretc | 4 | [Internal State of Stretch](internal_state_of_stretch.md) | Monitor the joint states of Stretch. | | 5 | [RViz Basics](rviz_basics.md) | Visualize topics in Stretch. | | 6 | [Navigation Stack](navigation_stack.md) | Motion planning and control for the mobile base using Nav stack. | -| 7 | [MoveIt! Basics](moveit_basics.md) | Motion planning and control for the arm using MoveIt. | -| 8 | [Follow Joint Trajectory Commands](follow_joint_trajectory.md) | Control joints using joint trajectory server. | -| 9 | [Perception](perception.md) | Use the Realsense D435i camera to visualize the environment. | -| 10 | [ArUco Marker Detection](aruco_marker_detection.md) | Localize objects using ArUco markers. | -| 11 | [ReSpeaker Microphone Array](respeaker_microphone_array.md) | Learn to use the ReSpeaker Microphone Array. | -| 12 | [FUNMAP](https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap) | Fast Unified Navigation, Manipulation and Planning. | +| 7 | [Follow Joint Trajectory Commands](follow_joint_trajectory.md) | Control joints using joint trajectory server. | +| 8 | [Perception](perception.md) | Use the Realsense D435i camera to visualize the environment. | +| 9 | [ArUco Marker Detection](aruco_marker_detection.md) | Localize objects using ArUco markers. | +| 10 | [ReSpeaker Microphone Array](respeaker_microphone_array.md) | Learn to use the ReSpeaker Microphone Array. | +| 11 | [FUNMAP](https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap) | Fast Unified Navigation, Manipulation and Planning. | ## Other Examples From dc7985805bef5ee51e7d6bcef5a0be366219c909 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 10 Aug 2023 16:33:23 -0700 Subject: [PATCH 30/40] Change Title from Example 10 --- ros2/example_10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2/example_10.md b/ros2/example_10.md index 8728584..92659ee 100644 --- a/ros2/example_10.md +++ b/ros2/example_10.md @@ -1,4 +1,4 @@ -# Example 10 +## Example 10 !!! note ROS 2 tutorials are still under active development. From 3f6e105b1ca275228d4a0ac0c08d93375734302c Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:59:48 -0700 Subject: [PATCH 31/40] Updated the readme for ros melodic part, so they can see the ros1 with Noetic. --- ros1_melodic/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ros1_melodic/README.md b/ros1_melodic/README.md index 381bcbf..5be155b 100644 --- a/ros1_melodic/README.md +++ b/ros1_melodic/README.md @@ -1,3 +1,5 @@ +## Deprecated ROS Melodic with Stretch, watch ROS1 documentation with ROS Noetic! + ![](../images/banner.png) # Tutorial Track: Stretch ROS1 From 40bb0e9ed690d3bb62cb0f9c15941c1fe0ab8af7 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:07:16 -0700 Subject: [PATCH 32/40] Create perception tutorial for ROS2.md --- ros2/perception.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 ros2/perception.md diff --git a/ros2/perception.md b/ros2/perception.md new file mode 100644 index 0000000..7f1569d --- /dev/null +++ b/ros2/perception.md @@ -0,0 +1,48 @@ +## Perception Introduction + +The Stretch robot is equipped with the [Intel RealSense D435i camera](https://www.intelrealsense.com/depth-camera-d435i/), an essential component that allows the robot to measure and analyze the world around it. In this tutorial, we are going to showcase how to visualize the various topics published by the camera. + +Begin by running the stretch `driver.launch` file. + +```{.bash .shell-prompt} +ros2 launch stretch_core stretch_driver.launch.py +``` + +To activate the [RealSense camera](https://www.intelrealsense.com/depth-camera-d435i/) and publish topics to be visualized, run the following launch file in a new terminal. + +```{.bash .shell-prompt} +ros2 launch stretch_core d435i_low_resolution.launch.py +``` + +Within this tutorial package, there is an [RViz config file](https://github.com/hello-robot/stretch_tutorials/blob/noetic/rviz/perception_example.rviz) with the topics for perception already in the Display tree. You can visualize these topics and the robot model by running the command below in a new terminal. + +```{.bash .shell-prompt} +ros2 run rviz2 rviz2 -d /home/hello-robot/ament_ws/src/stretch_tutorials/rviz/perception_example.rviz +``` + +### PointCloud2 Display + +A list of displays on the left side of the interface can visualize the camera data. Each display has its properties and status that notify a user if topic messages are received. + +For the `PointCloud2` display, a [sensor_msgs/pointCloud2](http://docs.ros.org/en/lunar/api/sensor_msgs/html/msg/PointCloud2.html) message named `/camera/depth/color/points` is received and the GIF below demonstrates the various display properties when visualizing the data. + +

+ +

+ +### Image Display +The `Image` display when toggled creates a new rendering window that visualizes a [sensor_msgs/Image](http://docs.ros.org/en/lunar/api/sensor_msgs/html/msg/Image.html) messaged, */camera/color/image_raw*. This feature shows the image data from the camera; however, the image comes out sideways. Thus, you can select the */camera/color/image_raw_upright_view* from the **Image Topic** options to get an upright view of the image. + +

+ +

+ +### DepthCloud Display +The `DepthCloud` display is visualized in the main RViz window. This display takes in the depth image and RGB image provided by RealSense to visualize and register a point cloud. + +

+ +

+ +## Deep Perception +Hello Robot also has a ROS package that uses deep learning models for various detection demos. A link to the tutorials to try and run this models is provided: [stretch_deep_perception](https://docs.hello-robot.com/0.2/stretch-tutorials/ros2/deep_perception/). From dda63e747c4da3d3d2c67de7cdf5f8e60bc4fe58 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:10:25 -0700 Subject: [PATCH 33/40] Change teleop stretch with a node title for mobile base velocity control It's because it's note a teleop but just movement --- mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 2f831d4..65fdb12 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -130,7 +130,7 @@ nav: - FUNMAP: https://github.com/hello-robot/stretch_ros/tree/master/stretch_funmap - Gazebo Basics: ./ros1/gazebo_basics.md - Other Examples: - - Teleoperate Stretch with a Node: ./ros1/example_1.md + - Mobile Base Velocity Control: ./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 @@ -168,7 +168,7 @@ nav: # - Other Nav Stack Features: ./ros2/other_nav_features.md # - Gazebo Basics: ./ros2/gazebo_basics.md - Other Examples: - - Teleoperate Stretch with a Node: ./ros2/example_1.md + - Mobile Base Velocity Control: ./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 From b97e7173c91e99b3b5024b5593c466c4cb1cd329 Mon Sep 17 00:00:00 2001 From: hello-jesus <141784078+hello-jesus@users.noreply.github.com> Date: Wed, 23 Aug 2023 15:24:12 -0700 Subject: [PATCH 34/40] Updated the names and ways to run the commands, also quit the vertical image description because it doesn't appear. --- ros2/perception.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ros2/perception.md b/ros2/perception.md index 7f1569d..2519b63 100644 --- a/ros2/perception.md +++ b/ros2/perception.md @@ -2,7 +2,7 @@ The Stretch robot is equipped with the [Intel RealSense D435i camera](https://www.intelrealsense.com/depth-camera-d435i/), an essential component that allows the robot to measure and analyze the world around it. In this tutorial, we are going to showcase how to visualize the various topics published by the camera. -Begin by running the stretch `driver.launch` file. +Begin by running the stretch `driver.launch.py` file. ```{.bash .shell-prompt} ros2 launch stretch_core stretch_driver.launch.py @@ -17,7 +17,7 @@ ros2 launch stretch_core d435i_low_resolution.launch.py Within this tutorial package, there is an [RViz config file](https://github.com/hello-robot/stretch_tutorials/blob/noetic/rviz/perception_example.rviz) with the topics for perception already in the Display tree. You can visualize these topics and the robot model by running the command below in a new terminal. ```{.bash .shell-prompt} -ros2 run rviz2 rviz2 -d /home/hello-robot/ament_ws/src/stretch_tutorials/rviz/perception_example.rviz +ros2 run rviz2 rviz2 -d `ros2 pkg prefix --share stretch_tutorials`/rviz/perception_example.rviz ``` ### PointCloud2 Display @@ -31,7 +31,7 @@ For the `PointCloud2` display, a [sensor_msgs/pointCloud2](http://docs.ros.org/e

### Image Display -The `Image` display when toggled creates a new rendering window that visualizes a [sensor_msgs/Image](http://docs.ros.org/en/lunar/api/sensor_msgs/html/msg/Image.html) messaged, */camera/color/image_raw*. This feature shows the image data from the camera; however, the image comes out sideways. Thus, you can select the */camera/color/image_raw_upright_view* from the **Image Topic** options to get an upright view of the image. +The `Image` display when toggled creates a new rendering window that visualizes a [sensor_msgs/Image](http://docs.ros.org/en/lunar/api/sensor_msgs/html/msg/Image.html) messaged, */camera/color/image_raw*. This feature shows the image data from the camera; however, the image comes out sideways.

@@ -45,4 +45,4 @@ The `DepthCloud` display is visualized in the main RViz window. This display tak

## Deep Perception -Hello Robot also has a ROS package that uses deep learning models for various detection demos. A link to the tutorials to try and run this models is provided: [stretch_deep_perception](https://docs.hello-robot.com/0.2/stretch-tutorials/ros2/deep_perception/). +Hello Robot also has a ROS package that uses deep learning models for various detection demos. A link to the tutorials is provided: [stretch_deep_perception](https://docs.hello-robot.com/0.2/stretch-tutorials/ros2/deep_perception/). From 2fb1270b2bb4345286d54a84cb86c419597ac1d7 Mon Sep 17 00:00:00 2001 From: Jesus Eduardo Rodriguez <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 24 Aug 2023 14:46:27 -0700 Subject: [PATCH 35/40] Modify the iPython note writing, it was not the correct way. --- getting_started/quick_start_guide_re2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/getting_started/quick_start_guide_re2.md b/getting_started/quick_start_guide_re2.md index 0dbf37d..87851e9 100644 --- a/getting_started/quick_start_guide_re2.md +++ b/getting_started/quick_start_guide_re2.md @@ -194,7 +194,8 @@ robot.end_of_arm.move_to('stretch_gripper',-50) robot.stow() robot.stop() ``` -!!! note If you haven't use iPython before you can copy all the code and paste it in the terminal instead of line by line! Also if you want to exit the iPython prompt write exit() +!!! note + If you haven't use iPython before you can copy all the code and paste it in the terminal instead of line by line! Also if you want to exit the iPython prompt write exit() ## Change Credentials From 67d598ea77ea9356d36d0d3653c8f67be54d9c96 Mon Sep 17 00:00:00 2001 From: Jesus Eduardo Rodriguez <141784078+hello-jesus@users.noreply.github.com> Date: Thu, 24 Aug 2023 14:53:23 -0700 Subject: [PATCH 36/40] Combine both initial notes, I think is better to have 1 with all the information. --- ros2/follow_joint_trajectory.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ros2/follow_joint_trajectory.md b/ros2/follow_joint_trajectory.md index 5897f04..ad474d8 100644 --- a/ros2/follow_joint_trajectory.md +++ b/ros2/follow_joint_trajectory.md @@ -1,9 +1,6 @@ ## FollowJointTrajectory Commands !!! note - ROS 2 tutorials are still under active development. - -!!! note 2 - For this exercise you'll need to have Ubuntu 22.04 and ROS Iron for it to work completly. + ROS 2 tutorials are still under active development. For this exercise you'll need to have Ubuntu 22.04 and ROS Iron for it to work completly. 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. And just as the past practice, it's preferable to have the stretch driver in trajectory mode. From b25e889ced2e9601db077e9164f52f211f618946 Mon Sep 17 00:00:00 2001 From: Jesus Eduardo Rodriguez <141784078+hello-jesus@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:18:48 -0700 Subject: [PATCH 37/40] Fix the 3 GIFs that weren't showing adding them from the ROS1 tutorials --- ros2/example_10.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ros2/example_10.md b/ros2/example_10.md index 92659ee..576b37b 100644 --- a/ros2/example_10.md +++ b/ros2/example_10.md @@ -27,7 +27,7 @@ ros2 run stretch_ros_tutorials tf_broadcaster The GIF below visualizes what happens when running the previous node.

- +

**OPTIONAL**: If you would like to see how the static frames update while the robot is in motion, run the stow command node and observe the tf frames in RViz. @@ -35,9 +35,8 @@ The GIF below visualizes what happens when running the previous node. ```{.bash .shell-prompt} ros2 run stretch_ros_tutorials stow_command ``` -

- +

### The Code @@ -247,7 +246,7 @@ rotation: ```

- +

### The Code From e28dea9e8b4ff777c7200f444d182fb9690e2657 Mon Sep 17 00:00:00 2001 From: Jesus Eduardo Rodriguez <141784078+hello-jesus@users.noreply.github.com> Date: Mon, 28 Aug 2023 16:40:04 -0700 Subject: [PATCH 38/40] Commented the MoveIt2 tutorials from the README file (overview in the documentation) --- ros2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros2/README.md b/ros2/README.md index f02c104..f3e81aa 100644 --- a/ros2/README.md +++ b/ros2/README.md @@ -18,10 +18,10 @@ This tutorial track is for users looking to get familiar with programming Stretc | 2 | [Follow Joint Trajectory Commands](follow_joint_trajectory.md) | Control joints using joint trajectory server. | | 3 | [Internal State of Stretch](internal_state_of_stretch.md) | Monitor the joint states of Stretch. | | 4 | [RViz Basics](rviz_basics.md) | Visualize topics in Stretch. | -| 5 | [MoveIt2 Basics](moveit_basics.md) | Motion planning and control for the arm using MoveIt. | +