From e5e7aab37c98597f1a7cc84e2c0bfed44fa52288 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Tue, 14 Jun 2022 09:55:34 -0700 Subject: [PATCH 1/7] Minor edits to README file. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8626e37..5843dbc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Introduction -This repo provides instructions on the installation and use of code on the Stretch RE1 robot. The goal is to provide a user familiar with ROS with the tools to operate a Stretch robot. +This repo provides instructions on installing and using code on the Stretch RE1 robot. The goal is to provide a user familiar with ROS with the tools to operate a Stretch robot. ## Stretch ROS Tutorials 1. [Getting Started](getting_started.md) From 4b2ab2b542008b3416333960af704082cecc3b3e Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Tue, 14 Jun 2022 11:05:16 -0700 Subject: [PATCH 2/7] Provided an addtional guide for creating a workspace --- getting_started.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/getting_started.md b/getting_started.md index 5594c7e..4c17c82 100644 --- a/getting_started.md +++ b/getting_started.md @@ -2,10 +2,10 @@ ## Ubuntu -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. +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. ## Installing Noetic on Stretch -Instructions on installing Noetic can be found in our open source [installation guide](https://github.com/hello-robot/stretch_ros/blob/dev/noetic/install_noetic.md). Once your system is setup, clone the [stretch_ros_tutorials](https://github.com/hello-sanchez/stretch_ros_tutorials.git) to your workspace. Then build the packages in your workspace. +Instructions on installing Noetic can be found in our open-source [installation guide](https://github.com/hello-robot/stretch_ros/blob/dev/noetic/install_noetic.md). Then create a catkin workspace for your ROS packages. Here is an [installation guide for creating a workspace](http://wiki.ros.org/catkin/Tutorials/create_a_workspace). Once your system is set up, clone the [stretch_ros_tutorials](https://github.com/hello-sanchez/stretch_ros_tutorials.git) to your workspace and build the package in your workspace. This can be done by copying the commands below and pasting them into your terminal. ``` cd ~/catkin_ws/src @@ -16,29 +16,35 @@ catkin_make ## ROS Setup on Local Computer -Hello Robot is currently running Stretch on Ubuntu 20.04 and on ROS Noetic. To begin the setup, begin with [installing Ubnutu desktop](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview) on your local machine. Then follow the [installation guide for ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu) on your system. +Hello Robot is currently running Stretch on Ubuntu 20.04 and ROS Noetic. To begin the setup, start with [installing Ubuntu desktop](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview) on your local machine. Then follow the [installation guide for ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu) on your system. -Currently, the Realsense2_description package isn't installed by rosdep and requires a user to manually install the package. Run the following command in your terminal +Currently, the Realsense2_description package isn't installed by rosdep and requires a user to install the package manually. Run the following command in your terminal -```bash +``` sudo apt-get install ros-noetic-realsense2-camera ``` -After your system is setup, clone the [stretch_ros](https://github.com/hello-robot/stretch_ros.git), [stretch_ros_tutorials](https://github.com/hello-sanchez/stretch_ros_tutorials.git), and [realsense_gazebo_plugin packages]( https://github.com/pal-robotics/realsense_gazebo_plugin) to your preferred workspace. Then install dependencies and build the packages. -```bash +After your system is setup, clone the [stretch_ros](https://github.com/hello-robot/stretch_ros.git), [stretch_ros_tutorials](https://github.com/hello-sanchez/stretch_ros_tutorials.git), and [realsense_gazebo_plugin packages]( https://github.com/pal-robotics/realsense_gazebo_plugin) to your preferred workspace. +``` cd ~/catkin_ws/src git clone https://github.com/hello-robot/stretch_ros git clone https://github.com/pal-robotics/realsense_gazebo_plugin git clone https://github.com/hello-sanchez/stretch_ros_tutorials.git +``` + + +Change the directory to that of your catkin workspace and install system dependencies of the ROS packages. Then build your workspace. You can do all this by running the following commands in your terminal. +``` cd ~/catkin_ws rosdep install --from-paths src --ignore-src -r -y catkin_make ``` -Then source your workspace with the following command -```bash +Then source your workspace and `.bashrc` file with the following command +``` echo "source /home/USER_NAME/catkin_ws/devel/setup.bash" +source ~/.bashrc ``` ## RoboMaker @@ -46,6 +52,6 @@ echo "source /home/USER_NAME/catkin_ws/devel/setup.bash" ![image](images/aws-robomaker.png) -If a you are unable to dual boot and install ubuntu on your local machine, an alternative is to use [AWS RoboMaker](https://aws.amazon.com/robomaker/). AWS RoboMaker extends the ROS framework with cloud services. The service provides a robotics simulation service, allowing for testing of the Stretch RE1 platform. If you are a first-time user of AWS RoboMaker, follow the [guide here](https://github.com/aws-robotics/aws-robomaker-robotics-curriculum/blob/main/getting-started-with-aws-robomaker/_modules/mod-2a-aws.md) to get up and running with the service. +If you cannot dual boot and install ubuntu on your local machine, an alternative is to use [AWS RoboMaker](https://aws.amazon.com/robomaker/). AWS RoboMaker extends the ROS framework with cloud services. The service provides a robotics simulation service, allowing for testing the Stretch RE1 platform. If you are a first-time user of AWS RoboMaker, follow the [guide here](https://github.com/aws-robotics/aws-robomaker-robotics-curriculum/blob/main/getting-started-with-aws-robomaker/_modules/mod-2a-aws.md) to get up and running with the service. **Next Tutorial:** [Gazebo Basics](gazebo_basics.md) From 6fcd0b04ae7bdb033341cbbb8cb43688d1163c31 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Tue, 14 Jun 2022 11:13:58 -0700 Subject: [PATCH 3/7] Minor format edits to the file --- getting_started.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/getting_started.md b/getting_started.md index 4c17c82..795a432 100644 --- a/getting_started.md +++ b/getting_started.md @@ -24,7 +24,7 @@ Currently, the Realsense2_description package isn't installed by rosdep and requ sudo apt-get install ros-noetic-realsense2-camera ``` -After your system is setup, clone the [stretch_ros](https://github.com/hello-robot/stretch_ros.git), [stretch_ros_tutorials](https://github.com/hello-sanchez/stretch_ros_tutorials.git), and [realsense_gazebo_plugin packages]( https://github.com/pal-robotics/realsense_gazebo_plugin) to your preferred workspace. +After your system is setup, clone the [stretch_ros](https://github.com/hello-robot/stretch_ros.git), [stretch_ros_tutorials](https://github.com/hello-sanchez/stretch_ros_tutorials.git), and [realsense_gazebo_plugin packages]( https://github.com/pal-robotics/realsense_gazebo_plugin) to your **src** folder in your preferred workspace. ``` cd ~/catkin_ws/src git clone https://github.com/hello-robot/stretch_ros @@ -33,7 +33,7 @@ git clone https://github.com/hello-sanchez/stretch_ros_tutorials.git ``` -Change the directory to that of your catkin workspace and install system dependencies of the ROS packages. Then build your workspace. You can do all this by running the following commands in your terminal. +Change the directory to that of your catkin workspace and install system dependencies of the ROS packages. Then build your workspace. ``` cd ~/catkin_ws rosdep install --from-paths src --ignore-src -r -y @@ -41,7 +41,7 @@ catkin_make ``` -Then source your workspace and `.bashrc` file with the following command +Once `caktin_make` has finished compiling,source your workspace and **.bashrc** file ``` echo "source /home/USER_NAME/catkin_ws/devel/setup.bash" source ~/.bashrc From c5b1e233720b437aa412f49acedecdbeef84a049 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Tue, 14 Jun 2022 11:26:16 -0700 Subject: [PATCH 4/7] Minor format edits to file --- gazebo_basics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gazebo_basics.md b/gazebo_basics.md index c9d75f4..d49887e 100644 --- a/gazebo_basics.md +++ b/gazebo_basics.md @@ -2,7 +2,7 @@ ### Empty World Simulation To spawn the Stretch in gazebo's default empty world run the following command in your terminal. -```bash +``` roslaunch stretch_gazebo gazebo.launch ``` This will bringup the robot in the gazebo simulation similar to the image shown below. @@ -12,14 +12,14 @@ This will bringup the robot in the gazebo simulation similar to the image shown ### Custom World Simulation In gazebo, you are able to spawn Stretch in various worlds. First, source the gazebo world files by running the following command in a terminal -```BASH +``` echo "source /usr/share/gazebo/setup.sh" ``` Then using the world argument, you can spawn the stretch in the willowgarage world by running the following -```bash +``` roslaunch stretch_gazebo gazebo.launch world:=worlds/willowgarage.world ``` From 25e38717c3a58013de0742c98c3a1c2171756186 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Tue, 14 Jun 2022 11:33:02 -0700 Subject: [PATCH 5/7] Fixed typos and mae minor format edits to file. --- teleoperating_stretch.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/teleoperating_stretch.md b/teleoperating_stretch.md index d736bfb..1172833 100644 --- a/teleoperating_stretch.md +++ b/teleoperating_stretch.md @@ -30,18 +30,19 @@ If you're done, hold down the Shutdown PC button for 2 seconds. This will cause ### Keyboard Teleoperating -To teleoperate a Stretch's **mobile base** with the keyboard, you first need to set the ros parameter to *navigation* mode in order for the robot to receive *Twist* messages. Begin by running `roscore` in a terminal. Then in a new terminal, type the following commands +To teleoperate a Stretch's mobile base with the keyboard, you first need to set the ros parameter to *navigation* mode for the robot to receive *Twist* messages. Begin by running `roscore` in a terminal. Then in a new terminal, type the following commands -```bash +``` rosparam set /stretch_driver/mode "navigation" roslaunch stretch_core stretch_driver.launch ``` The first line will set the stretch driver mode to *navigation* before running the `stretch_driver.launch` file. Then in a new terminal launch the teleop_twist_keyboard node with the argument remapping the *cmd_vel* topic name to *stretch/cmd_vel*. -```bash +``` rosrun teleop_twist_keyboard teleop_twist_keyboard.py cmd_vel:=stretch/cmd_vel ``` + Below are the keyboard commands that allow a user to move Stretch. ``` Reading from the keyboard and Publishing to Twist! @@ -89,7 +90,7 @@ roslaunch stretch_gazebo gazebo.launch In a new terminal, type the following -```bash +``` roslaunch stretch_gazebo teleop_keyboard.launch ``` The same keyboard commands will be presented to a user to move the robot. @@ -97,7 +98,7 @@ The same keyboard commands will be presented to a user to move the robot. ### Xbox Controller Teleoperating An alternative for robot base teleoperation is to use an Xbox controller. Stop the keyboard teleoperation node by typing **Ctrl** + **c** in the terminal where the command was executed. Then connect the Xbox controller device to your local machine and run the following command. -```bash +``` roslaunch stretch_gazebo teleop_joy.launch ``` Note that the teleop_twist_joy package has a deadman switch by default which disables the drive commands to be published unless pressed. For a Logitech F310 joystick, this button is A. From c7ba3ad7b26f117597498acd94af0056ca2207f8 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Tue, 14 Jun 2022 11:38:31 -0700 Subject: [PATCH 6/7] Fixed typos and made minor format edits to file. --- internal_state_of_stretch.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal_state_of_stretch.md b/internal_state_of_stretch.md index 99f2491..91b41e0 100644 --- a/internal_state_of_stretch.md +++ b/internal_state_of_stretch.md @@ -1,17 +1,17 @@ ## Getting the State of the Robot -Begin by starting up the stretch driver launch file by typing the following in a terminal. -```bash +Begin by starting up the stretch driver launch file. +``` roslaunch stretch_core stretch_driver.launch ``` Then utilize the ROS command-line tool, [rostopic](http://wiki.ros.org/rostopic), to display Stretch's internal state information. For instance, to view the current state of the robot's joints, simply type the following in a terminal. -```bash +``` rostopic echo /joint_states -n1 ``` -Note that the flag, `-n1`, at the end of the command, defines the count of how many times you wish to publish the current topic information. If you prefer to continuously print the topic for debugging purposes, then remove the flag. +Note that the flag, `-n1`, at the end of the command defines the count of how many times you wish to publish the current topic information. Remove the flag if you prefer to continuously print the topic for debugging purposes. -Your terminal will then output the information associated with the `/joint_states` topic. Your `header`, `position`, `velocity`, and `effort` information may vary from what is printed below. +Your terminal will output the information associated with the `/joint_states` topic. Your `header`, `position`, `velocity`, and `effort` information may vary from what is printed below. ``` header: seq: 70999 @@ -29,7 +29,7 @@ effort: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ``` Let's say you are interested in only seeing the `header` component of the `/joint_states` topic, you can output this within the rostopic command-line tool by typing the following command. -```bash +``` rostopic echo /joint_states/header -n1 ``` Your terminal will then output something similar to this: @@ -43,9 +43,9 @@ frame_id: '' --- ``` -Additionally, if you were to type `rostopic echo /` in the terminal, then press your *Tab* key on your keyboard, you will see the list of active topics being published. +Additionally, if you were to type `rostopic echo /` in the terminal, then press your *Tab* key on your keyboard, you will see the list of published active topics. -A powerful tool to visualize the ROS communication is the ROS [rqt_graph package](http://wiki.ros.org/rqt_graph). You can see a graph of topics being communicated between nodes by typing the following. +A powerful tool to visualize the ROS communication is the ROS [rqt_graph package](http://wiki.ros.org/rqt_graph). By typing the following, you can see a graph of topics being communicated between nodes. ``` rqt_graph From 7b54d1b2b25c3525dbc017d3f562f06829431f51 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Tue, 14 Jun 2022 11:46:11 -0700 Subject: [PATCH 7/7] Fixed typos and made minor format edits. --- rviz_basics.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rviz_basics.md b/rviz_basics.md index 5c4e259..f723f31 100644 --- a/rviz_basics.md +++ b/rviz_basics.md @@ -2,29 +2,29 @@ You can utilize RViz to visualize Stretch's sensor information. To begin, run the stretch driver launch file. -```bash +``` roslaunch stretch_core stretch_driver.roslaunch ``` Then run the following command to bring up a simple RViz configuration of the Stretch robot. -```bash +``` rosrun rviz rviz -d `rospack find stretch_core`/rviz/stretch_simple_test.rviz ``` An RViz window should open, allowing you to see the various DisplayTypes in the display tree on the left side of the window. ![image](images/simple_rviz.png) -If you want the visualize Stretch's [tf transform tree](http://wiki.ros.org/rviz/DisplayTypes/TF), you need to add the display type to the RViz window. First, click on the *Add* button and include the *TF* type to the display. You will then see all of the transform frames of the Stretch robot and the visualization can be toggled off and on by clicking the checkbox next to the tree. Below is a gif for reference. +If you want the visualize Stretch's [tf transform tree](http://wiki.ros.org/rviz/DisplayTypes/TF), you need to add the display type to the RViz window. First, click the *Add* button and include the *TF* type in the display. You will then see all of the transform frames of the Stretch robot, and the visualization can be toggled off and on by clicking the checkbox next to the tree. Below is a gif for reference. ![image](images/rviz_adding_tf.gif) There are further tutorials for RViz and can be found [here](http://wiki.ros.org/rviz/Tutorials). -## Running RViz and Gazebo +## Running RViz and Gazebo (Simulation) Let's bringup stretch in the willowgarage world from the [gazebo basics tutorial](gazebo_basics.md) and RViz by using the following command. -```bash +``` roslaunch stretch_gazebo gazebo.launch world:=worlds/willowgarage.world rviz:=true ``` the `rviz` flag will open an RViz window to visualize a variety of ROS topics.