Skip to content

Commit 91e456a

Browse files
authored
Feature: Offboard MoveIt Tutorial (#442)
* Add instructions to run MoveIt on a secondary computer * Specify the creation of a second terminal * Add jazzy off-board MoveIt tutorial * Add example
1 parent 386e9bc commit 91e456a

File tree

4 files changed

+132
-2
lines changed

4 files changed

+132
-2
lines changed

docs_versioned_docs/version-ros2humble/ros/tutorials/manipulation/gazebo.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Manipulation in Gazebo Ignition
33
sidebar_label: Manipulation in Simulation
4-
sidebar_position: 3
4+
sidebar_position: 1
55
toc_min_heading_level: 2
66
toc_max_heading_level: 4
77
---
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Manipulation across Multiple Machines
3+
sidebar_label: Multiple Machines
4+
sidebar_position: 2
5+
toc_min_heading_level: 2
6+
toc_max_heading_level: 4
7+
---
8+
9+
MoveIt! can require significant resources to generate complex manipulator trajectories. Ideally, a single powerful computer would handle the robot's nodes, sensor drivers, manipulator controllers, and MoveIt!. However, if a secondary computer is available onboard the robot and on the same local network, it could be used to handle some of the load of the primary platform computer.
10+
11+
# MoveIt on Secondary Computer
12+
The manipulators' controllers can be launched on the primary platform computer, while the motion planning can be launched independently on the secondary computer.
13+
14+
The secondary computer does not need to be connected over ethernet to the primary platform computer, but doing so simplifies the networking setup which will not be covered in this tutorial. For more information on setting up networks with the ROS 2 middleware see the [networking section](../../networking/overview.mdx).
15+
16+
## Setup
17+
The secondary computer must have the same environment as the primary platform computer. Ensure that they both have the same version of packages, and if workspaces are required to build packages from source, they should be mirrored and built on the two computers. Then a `clearpath` setup directory must be created with the same `robot.yaml` as the one on the robot, see [offboard computer setup instructions](../../installation/offboard_pc.mdx) for more details. For the remainder of this tutorial, the `clearpath` setup directory will be assumed to be in the `home` directory.
18+
19+
## Launching MoveIt!
20+
Source all required workspaces on the secondary computer and generate all description, configuration, and launch files.
21+
```bash
22+
source /opt/ros/humble/setup.bash
23+
```
24+
25+
### Generate Environment Setup
26+
Generate the environment setup bash file. This file will contain any environment variables required to setup the networking between the multiple computer setup.
27+
```bash
28+
ros2 run clearpath_generator_common generate_bash -s $HOME/clearpath/
29+
```
30+
31+
This script will generate the `$HOME/clearpath/setup.bash` with the environment required to communicate with the primary platform computer.
32+
33+
### Generate Description Files
34+
Then, generate the description files:
35+
```bash
36+
ros2 run clearpath_generator_common generate_description -s $HOME/clearpath/
37+
ros2 run clearpath_generator_common generate_semantic_description -s $HOME/clearpath/
38+
```
39+
These scripts will generate the `robot.urdf.xacro`, `robot.srdf.xacro`, and `robot.srdf` files in the `$HOME/clearpath` directory which contain necessary robot description information to launch MoveIt!.
40+
41+
### Generate Launch and Configuration Files
42+
Then, generate the MoveIt! launch file and parameter file:
43+
```bash
44+
ros2 run clearpath_generator_robot generate_launch -s $HOME/clearpath/
45+
ros2 run clearpath_generator_robot generate_param -s $HOME/clearpath/
46+
```
47+
48+
These scripts will generate the `manipulators/launch/manipulators.launch.py` and `manipulators/config/moveit.config` files.
49+
50+
### Launch
51+
Once these files are all generated, launch MoveIt! by passing it the path to the directory:
52+
```
53+
ros2 launch clearpath_manipulators moveit.launch.py setup_path:=$HOME/clearpath/
54+
```
55+
56+
## Launching RViz
57+
Once MoveIt! is running, open RViz with the MoveIt MotionPlanning plugin, with the appropriate namespace, and interactive markers. To do so, create a new terminal, source the workspace, and call the `view_moveit` launch file:
58+
```
59+
ros2 launch clearpath_viz view_moveit.launch.py namespace:=''
60+
```
61+
62+
Make sure to pass the same namespace as the robot's. For example, a robot with namespace `a300_0001` will have topics such as `/a300_0001/platform/mcu/status` and `/a300_0001/manipulators/arm_0_joint_trajectory_controller/controller_state`. To launch its viewing command:
63+
```
64+
ros2 launch clearpath_viz view_moveit.launch.py namespace:='a300_0001'
65+
```

docs_versioned_docs/version-ros2jazzy/ros/tutorials/manipulation/gazebo.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Manipulation in Gazebo Harmonic
33
sidebar_label: Manipulation in Simulation
4-
sidebar_position: 3
4+
sidebar_position: 1
55
toc_min_heading_level: 2
66
toc_max_heading_level: 4
77
---
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Manipulation across Multiple Machines
3+
sidebar_label: Multiple Machines
4+
sidebar_position: 2
5+
toc_min_heading_level: 2
6+
toc_max_heading_level: 4
7+
---
8+
9+
MoveIt! can require significant resources to generate complex manipulator trajectories. Ideally, a single powerful computer would handle the robot's nodes, sensor drivers, manipulator controllers, and MoveIt!. However, if a secondary computer is available onboard the robot and on the same local network, it could be used to handle some of the load of the primary platform computer.
10+
11+
# MoveIt on Secondary Computer
12+
The manipulators' controllers can be launched on the primary platform computer, while the motion planning can be launched independently on the secondary computer.
13+
14+
The secondary computer does not need to be connected over ethernet to the primary platform computer, but doing so simplifies the networking setup which will not be covered in this tutorial. For more information on setting up networks with the ROS 2 middleware see the [networking section](../../networking/overview.mdx).
15+
16+
## Setup
17+
The secondary computer must have the same environment as the primary platform computer. Ensure that they both have the same version of packages, and if workspaces are required to build packages from source, they should be mirrored and built on the two computers. Then a `clearpath` setup directory must be created with the same `robot.yaml` as the one on the robot, see [offboard computer setup instructions](../../installation/offboard_pc.mdx) for more details. For the remainder of this tutorial, the `clearpath` setup directory will be assumed to be in the `home` directory.
18+
19+
## Launching MoveIt!
20+
Source all required workspaces on the secondary computer and generate all description, configuration, and launch files.
21+
```bash
22+
source /opt/ros/jazzy/setup.bash
23+
```
24+
25+
### Generate Environment Setup
26+
Generate the environment setup bash file. This file will contain any environment variables required to setup the networking between the multiple computer setup.
27+
```bash
28+
ros2 run clearpath_generator_common generate_bash -s $HOME/clearpath/
29+
```
30+
31+
This script will generate the `$HOME/clearpath/setup.bash` with the environment required to communicate with the primary platform computer.
32+
33+
### Generate Description Files
34+
Then, generate the description files:
35+
```bash
36+
ros2 run clearpath_generator_common generate_description -s $HOME/clearpath/
37+
ros2 run clearpath_generator_common generate_semantic_description -s $HOME/clearpath/
38+
```
39+
These scripts will generate the `robot.urdf.xacro`, `robot.srdf.xacro`, and `robot.srdf` files in the `$HOME/clearpath` directory which contain necessary robot description information to launch MoveIt!.
40+
41+
### Generate Launch and Configuration Files
42+
Then, generate the MoveIt! launch file and parameter file:
43+
```bash
44+
ros2 run clearpath_generator_robot generate_launch -s $HOME/clearpath/
45+
ros2 run clearpath_generator_robot generate_param -s $HOME/clearpath/
46+
```
47+
48+
These scripts will generate the `manipulators/launch/manipulators.launch.py` and `manipulators/config/moveit.config` files.
49+
50+
### Launch
51+
Once these files are all generated, launch MoveIt! by passing it the path to the directory:
52+
```
53+
ros2 launch clearpath_manipulators moveit.launch.py setup_path:=$HOME/clearpath/
54+
```
55+
56+
## Launching RViz
57+
Once MoveIt! is running, open RViz with the MoveIt MotionPlanning plugin, with the appropriate namespace, and interactive markers. To do so, create a new terminal, source the workspace, and call the `view_moveit` launch file:
58+
```
59+
ros2 launch clearpath_viz view_moveit.launch.py namespace:=''
60+
```
61+
62+
Make sure to pass the same namespace as the robot's. For example, a robot with namespace `a300_0001` will have topics such as `/a300_0001/platform/mcu/status` and `/a300_0001/manipulators/arm_0_joint_trajectory_controller/controller_state`. To launch its viewing command:
63+
```
64+
ros2 launch clearpath_viz view_moveit.launch.py namespace:='a300_0001'
65+
```

0 commit comments

Comments
 (0)