Skip to content

Commit 18a761c

Browse files
authored
Update the toplevel README for humble (#587)
The README has been updated on the main branch, also with respect to the binary installation. This commit ties them together, pointing to humble-specific endpoints, where necessary.
1 parent 34931eb commit 18a761c

File tree

1 file changed

+65
-179
lines changed

1 file changed

+65
-179
lines changed

README.md

Lines changed: 65 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -125,35 +125,83 @@ Deprecation: The `ur_bringup` package is deprecated and will be removed from Iro
125125

126126
## Getting Started
127127

128-
1. [Install ROS2 Rolling](https://docs.ros.org/en/rolling/Installation/Ubuntu-Install-Debians.html).
129-
For using this driver with ROS2 `foxy`. Checkout [foxy
130-
branch](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/foxy), for using it
131-
with ROS2 ``galactic``, use the [galactic branch](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/galactic), for using it
132-
with ROS2 ``humble``, use the [galactic branch](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/humble).
128+
For getting started, you'll basically need three steps:
133129

134-
2. Make sure that `colcon`, its extensions and `vcs` are installed:
130+
1. **Install the driver** (see below). You can either install this driver from binary packages or build it from source. We recommend a
131+
binary package installation unless you want to join development and submit changes.
132+
133+
2. **Start & Setup the robot**. Once you've installed the driver, [setup the
134+
robot](https://docs.ros.org/en/ros2_packages/humble/api/ur_robot_driver/installation/robot_setup.html)
135+
136+
Please do this step carefully and extract the calibration as explained
137+
[here](https://docs.ros.org/en/ros2_packages/humble/api/ur_robot_driver/installation/robot_setup.html#extract-calibration-information).
138+
Otherwise the TCP's pose will not be correct inside the ROS ecosystem.
139+
140+
If no real robot is required, you can [use a simulated
141+
robot](https://docs.ros.org/en/ros2_packages/humble/api/ur_robot_driver/usage.html#usage-with-official-ur-simulator)
142+
that will behave almost exactly like the real robot.
143+
144+
145+
3. **Start the driver**. See the [usage
146+
documentation](https://docs.ros.org/en/ros2_packages/humble/api/ur_robot_driver/usage.html) for
147+
details.
148+
149+
### Install from binary packages
150+
1. [Install ROS2](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html). This
151+
branch supports only ROS2 Humble. For other ROS2 versions, please see the respective
152+
branches.
153+
2. Install the driver using
154+
```
155+
sudo apt-get install ros-${ROS_DISTRO}-ur-robot-driver
156+
```
157+
158+
### Build from source
159+
Before building from source please make sure that you actually need to do that. Building from source
160+
might require some special treatment, especially when it comes to dependency management.
161+
Dependencies might change from time to time. Upstream packages (such as the library) might change
162+
their features / API which require changes in this repo. Therefore, this repo's source builds might
163+
require upstream repositories to be present in a certain version as otherwise builds might fail.
164+
Starting from scratch following exactly the steps below should always work, but simply pulling and
165+
building might fail occasionally.
166+
167+
1. [Install ROS2](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html).
168+
branch supports only ROS2 Humble. For other ROS2 versions, please see the respective
169+
branches.
170+
171+
Once installed, please make sure to actually [source ROS2](https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files) before proceeding.
172+
173+
3. Make sure that `colcon`, its extensions and `vcs` are installed:
135174
```
136175
sudo apt install python3-colcon-common-extensions python3-vcstool
137176
```
138177

139-
3. Create a new ROS2 workspace:
178+
4. Create a new ROS2 workspace:
140179
```
141180
export COLCON_WS=~/workspace/ros_ur_driver
142181
mkdir -p $COLCON_WS/src
143182
```
144183

145-
4. Pull relevant packages, install dependencies, compile, and source the workspace by using:
184+
5. Clone relevant packages, install dependencies, compile, and source the workspace by using:
146185
```
147186
cd $COLCON_WS
148-
git clone -b ${ROS_DISTRO} https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git src/Universal_Robots_ROS2_Driver
187+
git clone -b humble https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git src/Universal_Robots_ROS2_Driver
149188
vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver-not-released.${ROS_DISTRO}.repos
150189
rosdep update
151-
rosdep install --ignore-src --from-paths src -y -r
190+
rosdep install --ignore-src --from-paths src -y
152191
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
153192
source install/setup.bash
154193
```
155194

156-
## Using MoveIt
195+
6. When consecutive pulls leads to build errors, please make sure to update the upstream packages before
196+
filing an issue:
197+
```
198+
cd $COLCON_WS
199+
vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver-not-released.${ROS_DISTRO}.repos
200+
rosdep update
201+
rosdep install --ignore-src --from-paths src -y
202+
```
203+
204+
## MoveIt! support
157205

158206
[MoveIt!](https://moveit.ros.org) support is built-in into this driver already.
159207
Watch MoveIt in action with the Universal Robots ROS2 driver:
@@ -162,186 +210,24 @@ Watch MoveIt in action with the Universal Robots ROS2 driver:
162210

163211
*The video shows free-space trajectory planning around a modeled collision scene object using the MoveIt2 MotionPlanning widget for Rviz2.*
164212

165-
166-
### Real robot / URSim
167-
To test the driver with the example MoveIt-setup, first start the driver as described
168-
[below](#connect-to-external-control-via-urcap).
169-
```
170-
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e launch_rviz:=true
171-
```
172-
Now you should be able to use the MoveIt Plugin in rviz2 to plan and execute trajectories with the
173-
robot as explained [here](https://moveit.picknik.ai/galactic/doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial.html).
174-
175-
## Network Setup
176-
177-
There are many possible ways to connect a UR robot. This section describes a good example using static IP addresses and a direct connection from the PC to the Robot to minimize latency introduced by network hardware. Though a good network switch usually works fine, as well.
178-
179-
1. Connect the UR control box directly to the remote PC with an ethernet cable.
180-
181-
2. Open the network settings from the UR teach pendant (Setup Robot -> Network) and enter these settings:
182-
183-
```
184-
IP address: 192.168.1.102
185-
Subnet mask: 255.255.255.0
186-
Default gateway: 192.168.1.1
187-
Preferred DNS server: 192.168.1.1
188-
Alternative DNS server: 0.0.0.0
189-
```
190-
191-
3. On the remote PC, turn off all network devices except the "wired connection", e.g. turn off wifi.
192-
193-
4. Open Network Settings and create a new Wired connection with these settings. You may want to name this new connection `UR` or something similar:
194-
195-
```
196-
IPv4
197-
Manual
198-
Address: 192.168.1.101
199-
Netmask: 255.255.255.0
200-
Gateway: 192.168.1.1
201-
```
202-
203-
5. Verify the connection from the PC with e.g. ping.
204-
205-
```
206-
ping 192.168.1.102
207-
```
208-
209-
## Connect to External Control via URCap
210-
211-
This section describes installation and launching of the URCap program from the pendant. It allows ROS to control the robot externally. Generally, you will launch the driver via ROS then start URCap from the pendant.
212-
213-
1. To enable external control of the UR robot from a remote PC you need to install the [**externalcontrol-1.0.5.urcap**](/ur_robot_driver/resources) which can be downloaded from [Universal_Robots_ExternalControl_URCap](https://github.com/UniversalRobots/Universal_Robots_ExternalControl_URCap/releases).
214-
215-
**Note:** For installing this URCap a minimal PolyScope version of 3.7 or 5.1 (in case of e-Series) is necessary.
216-
217-
2. For installing the necessary URCap and creating a program, please see the individual tutorial on how to [setup a CB3 robot](/ur_robot_driver/doc/installation/install_urcap_cb3.rst) or how to [setup an e-Series robot](/ur_robot_driver/doc/installation/install_urcap_e_series.rst)
218-
219-
3. On the remote PC, launch the suitable launch file which starts the robot driver and controllers (see details in [Usage](#usage) section).
220-
221-
4. From the Program Robot tab of the teach pendant, load `external_control.urp`. Click on the "Control by..." section of the program to check the Host IP of the external PC. If it needs to be modified, make the modification under the Installation tab (as prompted on screen). You do not need to modify the Custom Port.
222-
223-
5. When the Host IP is correct, click the play button to connect with the external PC.
224-
225-
## Usage
226-
227-
For starting the driver there are two main launch files in the `ur_robot_driver` package.
228-
229-
- `ur_control.launch.py` - starts ros2_control node including hardware interface, joint state broadcaster and a controller. This launch file also starts `dashboard_client` if real robot is used.
230-
- `ur_dashboard_client.launch.py` - start the dashboard client for UR robots.
231-
232-
Also, there are predefined launch files for all supported types of UR robots.
233-
234-
The arguments for launch files can be listed using `ros2 launch ur_robot_driver <launch_file_name>.launch.py --show-args`.
235-
The most relevant arguments are the following:
236-
237-
- `ur_type` (*mandatory*) - a type of used UR robot (*ur3*, *ur3e*, *ur5*, *ur5e*, *ur10*, *ur10e*, or *ur16e*).
238-
- `robot_ip` (*mandatory*) - IP address by which the root can be reached.
239-
- `use_fake_hardware` (default: *false*) - use simple hardware emulator from ros2_control.
240-
Useful for testing launch files, descriptions, etc. See explanation below.
241-
- `initial_positions` (default: dictionary with all joint values set to 0) - Allows passing a dictionary to set the initial joint values for the fake hardware from [ros2_control](http://control.ros.org/). It can also be set from a yaml file with the `load_yaml` commands as follows:
242-
```
243-
<xacro:property name="initial_positions" value="${load_yaml(initial_positions_file)}"/>
244-
```
245-
In this example, the **initial_positions_file** is a xacro argument that contains the absolute path to a yaml file. An example of the initial positions yaml file is as follows:
246-
```
247-
elbow_joint: 1.158
248-
shoulder_lift_joint: -0.953
249-
shoulder_pan_joint: 1.906
250-
wrist_1_joint: -1.912
251-
wrist_2_joint: -1.765
252-
wrist_3_joint: 0.0
253-
```
254-
255-
- `fake_sensor_commands` (default: *false*) - enables setting sensor values for the hardware emulators.
256-
Useful for offline testing of controllers.
257-
- `robot_controller` (default: *joint_trajectory_controller*) - controller for robot joints to be started.
258-
Available controllers: *joint_trajectory_controller*, *scaled_joint_trajectory_controller*.
259-
Note: *joint_state_broadcaster*, *speed_scaling_state_broadcaster*, *force_torque_sensor_broadcaster*, and *io_and_status_controller* will always start.
260-
261-
*HINT*: list all loaded controllers using `ros2 control list_controllers` command.
262-
263-
**NOTE**: The package can simulate hardware with the ros2_control `FakeSystem`. This emulator enables an environment for testing of "piping" of hardware and controllers, as well as testing robot's descriptions. For more details see [ros2_control documentation](https://ros-controls.github.io/control.ros.org/) for more details.
264-
265-
### Example Commands for Testing the Driver
266-
267-
Allowed UR-Type strings: `ur3`, `ur3e`, `ur5`, `ur5e`, `ur10`, `ur10e`, `ur16e`.
268-
269-
##### 1. Start hardware, simulator or mockup
270-
271-
- To do test with hardware, use:
272-
```
273-
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=<UR_TYPE> robot_ip:=<IP_OF_THE_ROBOT> launch_rviz:=true
274-
```
275-
For more details check the argument documentation with `ros2 launch ur_robot_driver ur_control.launch.py --show-arguments`
276-
277-
After starting the launch file start the external_control URCap program from the pendant, as described above.
278-
279-
- To do an offline test with URSim check details about it in [this section](#usage-with-official-ur-simulator)
280-
281-
- To use mocked hardware (capability of ros2_control), use `use_fake_hardware` argument, like:
282-
```
283-
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=true
284-
```
285-
286-
**NOTE**: Instead of using the global launch file for control stack, there are also prepeared launch files for each type of UR robots named. They accept the same arguments are the global one and are used by:
287-
```
288-
ros2 launch ur_robot_driver <ur_type>.launch.py
289-
```
290-
291-
##### 2. Sending commands to controllers
292-
293-
Before running any commands, first check the controllers' state using `ros2 control list_controllers`.
294-
295-
- Send some goal to the Joint Trajectory Controller by using a demo node from [ros2_control_demos](https://github.com/ros-controls/ros2_control_demos) package by starting the following command in another terminal:
296-
```
297-
ros2 launch ur_robot_driver test_joint_trajectory_controller.launch.py
298-
```
299-
After a few seconds the robot should move.
300-
301-
- To test another controller, simply define it using `initial_joint_controller` argument, for example when using fake hardware:
302-
```
303-
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy initial_joint_controller:=joint_trajectory_controller use_fake_hardware:=true launch_rviz:=true
304-
```
305-
And send the command using demo node:
306-
```
307-
ros2 launch ur_robot_driver test_scaled_joint_trajectory_controller.launch.py
308-
```
309-
After a few seconds the robot should move (or jump when using emulation).
310-
311-
312-
##### 3. Using only robot description
313-
314-
If you just want to test description of the UR robots, e.g., after changes you can use the following command:
315-
```
316-
ros2 launch ur_description view_ur.launch.py ur_type:=ur5e
317-
```
318-
## Usage with official UR simulator
319-
For using the driver with the URSim docker image please follow instructions [here](https://docs.ros.org/en/ros2_packages/rolling/api/ur_robot_driver/usage.html#usage-with-official-ur-simulator).
213+
See the [MoveIt!
214+
section](https://docs.ros.org/en/ros2_packages/humble/api/ur_robot_driver/usage.html#using-moveit)
215+
of the [Usage guide](https://docs.ros.org/en/ros2_packages/humble/api/ur_robot_driver/usage.html)
216+
for details.
320217

321218
## Expected Changes in the Near Future
322219

323220
- Trajectory control currently only supports position commands. In the future, velocity control will be added.
324221

325222

326223
## Contributor Guidelines
327-
Code is auto-formatted with clang-format 10 whenever a git commit is made. Please ensure these dependencies are installed:
224+
Code is auto-formatted with clang-format 14 whenever a git commit is made. Please ensure these dependencies are installed:
328225
```
329226
pip3 install pre-commit
330-
sudo apt install clang-format-10
227+
sudo apt install clang-format-14
331228
```
332229

333230
Prepare the pre-commit formatting to run like this:
334231
```
335232
pre-commit install`
336233
```
337-
338-
## CI setup
339-
340-
There are three build stages checking current and future compatibility of the driver.
341-
342-
1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
343-
344-
1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
345-
Shows that local build with dependencies is possible and if fails there we can expect that after the next package sync we will not be able to build.
346-
347-
1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.

0 commit comments

Comments
 (0)