Skip to content

Commit

Permalink
Merge pull request #375 from tiffanyec/training_updates
Browse files Browse the repository at this point in the history
ROS2 Training updates
  • Loading branch information
DavidMerzJr committed Mar 16, 2022
2 parents e6761c7 + 92c35fc commit e3cbc89
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gh_pages/_source/session2/ros2/2-Launch-Files.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ You may also choose to launch `myworkcell_core` node with the others or keep it

You should see an error that the launch file was not found. This is because it only exists in the `src/` directory, and the `ros2` tool will only work with files in the `install/` directory. Therefore, the launch file must be _installed_.

1. Add an installation rule to `CMakeLists.txt`, after the `find_package` section, and before the `BUILD_TESTING` section:
1. Add an installation rule to `CMakeLists.txt` in your `myworkcell_support` package, after the `find_package` section, and before the `BUILD_TESTING` section:

``` cmake
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}/)
Expand Down
3 changes: 3 additions & 0 deletions gh_pages/_source/session2/ros2/3-Parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ So far we haven't used the request field, `base_frame`, for anything. In this ex
- If you didn't build with the `--symlink-install` option, you will need to re-build after editing the launch file, to copy the updates into the "install" directory.
- The response frame doesn't change, because we haven't updated vision_node (yet) to handle the request frame. Vision_node always returns the same frame (for now).
* Set the base_frame back to "world"

## Challenge Exercise
* Imagine a human is cooporating with the robot in this scenario. Try adding a new parameter for the human-operational frame.
3 changes: 3 additions & 0 deletions gh_pages/_source/session3/ros2/0-Intro-to-URDF.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,6 @@ Your goal is to describe a workcell that features:
_Note the syntax used to specify a starting parameter value to the node (`--ros-args -p param_name:=param_value`). Also the use of `cat file.urdf` to pass the file contents as a string._

1. The default RViz setup only shows a minimal amount of info. You can add various Display elements to customize the display to show exactly what is needed. Inside RViz add a _RobotModel_ display and a _TF_ display using the button in the lower left. Expand the settings for the added _RobotModel_ display and select `/robot_description` for the field labeled _Description Topic_. Also make sure in the _Global Options_ that _Fixed Frame_ is set to `world`. Consider saving this configuration (File -> Save Config) to the default RViz config file, so you don't need to repeat these setup steps again later.

## Challenge Exercise
* Try adding legs to the table. How does this affect the collision geometry?
1 change: 0 additions & 1 deletion gh_pages/_source/session3/ros2/0a-Intro-to-ROS1.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,3 @@ This exercise is not part of the main "Scan-N-Plan" application. It helps gain
* Use a ROS2 publisher and a ROS1 subscriber (opposite direction).
* Use [command-line args](http://wiki.ros.org/Remapping%20Arguments) to remap the ROS1 topic instead of the ROS2 topic.
* Create a pair of launch files to automatically restart the ROS1 and ROS2 nodes. There is no good way to automatically start both ROS1 and ROS2 nodes from a single unified launch file.

3 changes: 3 additions & 0 deletions gh_pages/_source/session3/ros2/1-Workcell-XACRO.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ Specifically, you will need to:

* If you didn't save your RViz config last time, you may need to repeat the configuration steps: set the 'Fixed Frame' to 'world' and add the RobotModel and TF displays to the tree view on the left.
* Try moving the joint sliders in the separate GUI window that appears to see the UR5 robot move.

## Challenge Exercise
* Try adding another instance of the robot model in the scene in a different position and orienatation.
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,6 @@ Specifically, edit the service callback inside the vision_node to transform the
```

1. Change the "base_frame" parameter in `workcell.launch.py` (e.g. to "table"), relaunch the file, and note the different pose result. Change the "base_frame" parameter back to "world" when you're done.

## Challenge Exercises
* Try creating a second service to return the transformation from the camera to the table.
3 changes: 3 additions & 0 deletions gh_pages/_source/session3/ros2/3-Build-a-MoveIt-Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,6 @@ In this exercise, you will generate a MoveIt package for the UR5 workcell you bu
```

> _Don't worry too much about how to use RViz. We'll work through that in the next exercise._
## Challenge Exercises
* Imagine you have misrepresented your robot and need to add an additional joint. Would it be faster to make minor edits to all configuration files or to re-do the MoveIt package creation process? Try each method and compare.
1 change: 1 addition & 0 deletions gh_pages/_source/session3/ros2/4-Motion-Planning-RVIZ.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Motion Planning using RViz
> In this exercise, we will (finally) learn how to use the MoveIt! RViz plugin to plan and execute motion on a simulated robot. We will explore the different options and constraints associated with both MoveIt! and the RViz plugin.

## Launch the Planning Environment

1. Source your ROS2 workspace.
Expand Down
14 changes: 10 additions & 4 deletions gh_pages/_source/session4/ros1/1-Descartes-Path-Planning.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,29 @@ Left to you are the details of:
1. Translating those paths into something Descartes can understand.

### Setup workspace
1. Clone the Descartes repository into your workspace src/ directory.
1. Clone the Descartes repository into your ROS1 workspace src/ directory.

```bash
cd ~/catkin_ws/src
git clone -b melodic-devel https://github.com/ros-industrial-consortium/descartes.git
```

1. Copy over the `ur5_demo_descartes` package into your workspace src/ directory.
1. Clone the Universal Robot repository into your workspace src/ directory
```bash
git clone https://github.com/ros-industrial/universal_robot.git
```

1. Copy over the `ur5_demo_descartes` and the ROS1 version of `myworkcell_support` packages into your workspace src/ directory.

```bash
cp -r ~/industrial_training/exercises/4.1/src/ur5_demo_descartes .
cp -r ~/industrial_training/exercises/4.1/ros1/src/ur5_demo_descartes .
cp -r ~/industrial_training/exercises/4.1/ros1/src/myworkcell_support .
```

1. Copy over the `descartes_node_unfinished.cpp` into your core package's src/ folder and rename it `descartes_node.cpp`.

```bash
cp ~/industrial_training/exercises/4.1/src/descartes_node_unfinished.cpp myworkcell_core/src/descartes_node.cpp
cp ~/industrial_training/exercises/4.1/ros1/src/descartes_node_unfinished.cpp myworkcell_core/src/descartes_node.cpp
```

1. Add dependencies for the following packages in the `CMakeLists.txt` & `package.xml` files, as in previous exercises.
Expand Down

0 comments on commit e3cbc89

Please sign in to comment.