You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid duplication between README and package doc.
* Updated documentation about fake_hardware and MoveIt!
* Remove trailing WS
* [documentation] do not suggest -r for rosdep install
* Added note about tool0_controller to docs.
* Add additional part about calibration to toplevel README.
* Added note about sourcing ROS in build instructions
For using this driver with ROS2 `foxy`. Checkout [foxy
148
188
branch](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/foxy), for using it
149
189
with ROS2 ``galactic``, use the [galactic branch](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/galactic), for using it
150
190
with ROS2 ``humble``, use the [galactic branch](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/humble).
151
191
152
-
2. Make sure that `colcon`, its extensions and `vcs` are installed:
192
+
Once installed, please make sure to actually [source ROS2](https://docs.ros.org/en/rolling/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files) before proceeding.
193
+
194
+
3. Make sure that `colcon`, its extensions and `vcs` are installed:
Now you should be able to use the MoveIt Plugin in rviz2 to plan and execute trajectories with the
191
-
robot as explained [here](https://moveit.picknik.ai/galactic/doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial.html).
192
-
193
-
## Network Setup
194
-
195
-
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.
196
-
197
-
1. Connect the UR control box directly to the remote PC with an ethernet cable.
198
-
199
-
2. Open the network settings from the UR teach pendant (Setup Robot -> Network) and enter these settings:
200
-
201
-
```
202
-
IP address: 192.168.1.102
203
-
Subnet mask: 255.255.255.0
204
-
Default gateway: 192.168.1.1
205
-
Preferred DNS server: 192.168.1.1
206
-
Alternative DNS server: 0.0.0.0
207
-
```
208
-
209
-
3. On the remote PC, turn off all network devices except the "wired connection", e.g. turn off wifi.
210
-
211
-
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:
212
-
213
-
```
214
-
IPv4
215
-
Manual
216
-
Address: 192.168.1.101
217
-
Netmask: 255.255.255.0
218
-
Gateway: 192.168.1.1
219
-
```
220
-
221
-
5. Verify the connection from the PC with e.g. ping.
222
-
223
-
```
224
-
ping 192.168.1.102
225
-
```
226
-
227
-
## Connect to External Control via URCap
228
-
229
-
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.
230
-
231
-
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).
232
-
233
-
**Note:** For installing this URCap a minimal PolyScope version of 3.7 or 5.1 (in case of e-Series) is necessary.
234
-
235
-
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)
236
-
237
-
3. On the remote PC, launch the suitable launch file which starts the robot driver and controllers (see details in [Usage](#usage) section).
238
-
239
-
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.
240
-
241
-
5. When the Host IP is correct, click the play button to connect with the external PC.
242
-
243
-
## Usage
244
-
245
-
For starting the driver there are two main launch files in the `ur_robot_driver` package.
246
-
247
-
-`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.
248
-
-`ur_dashboard_client.launch.py` - start the dashboard client for UR robots.
249
-
250
-
Also, there are predefined launch files for all supported types of UR robots.
251
-
252
-
The arguments for launch files can be listed using `ros2 launch ur_robot_driver <launch_file_name>.launch.py --show-args`.
253
-
The most relevant arguments are the following:
254
-
255
-
-`ur_type` (*mandatory*) - a type of used UR robot (*ur3*, *ur3e*, *ur5*, *ur5e*, *ur10*, *ur10e*, or *ur16e*).
256
-
-`robot_ip` (*mandatory*) - IP address by which the root can be reached.
257
-
-`use_fake_hardware` (default: *false*) - use simple hardware emulator from ros2_control.
258
-
Useful for testing launch files, descriptions, etc. See explanation below.
259
-
-`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:
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:
264
-
```
265
-
elbow_joint: 1.158
266
-
shoulder_lift_joint: -0.953
267
-
shoulder_pan_joint: 1.906
268
-
wrist_1_joint: -1.912
269
-
wrist_2_joint: -1.765
270
-
wrist_3_joint: 0.0
271
-
```
272
-
273
-
- `fake_sensor_commands` (default: *false*) - enables setting sensor values for the hardware emulators.
274
-
Useful for offline testing of controllers.
275
-
- `robot_controller` (default: *joint_trajectory_controller*) - controller for robot joints to be started.
276
-
Available controllers: *joint_trajectory_controller*, *scaled_joint_trajectory_controller*.
277
-
Note: *joint_state_broadcaster*, *speed_scaling_state_broadcaster*, *force_torque_sensor_broadcaster*, and *io_and_status_controller* will always start.
278
-
279
-
*HINT*: list all loaded controllers using `ros2 control list_controllers` command.
280
-
281
-
**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.
**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:
305
-
```
306
-
ros2 launch ur_robot_driver <ur_type>.launch.py
307
-
```
308
-
309
-
##### 2. Sending commands to controllers
310
-
311
-
Before running any commands, first check the controllers' state using `ros2 control list_controllers`.
312
-
313
-
- 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:
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).
Copy file name to clipboardExpand all lines: ur_robot_driver/doc/usage.rst
+17-43Lines changed: 17 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,52 +191,26 @@ To test the driver with the example MoveIt-setup, first start the driver as desc
191
191
Now you should be able to use the MoveIt Plugin in rviz2 to plan and execute trajectories with the
192
192
robot as explained `here <https://moveit.picknik.ai/galactic/doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial.html>`_.
193
193
194
-
Fake hardware on ROS2 Galactic
195
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194
+
Fake hardware
195
+
^^^^^^^^^^^^^
196
196
197
-
Currently, the ``scaled_joint_trajectory_controller`` does not work on ROS2 Galactic. There is an
198
-
`upstream Merge-Request <https://github.com/ros-controls/ros2_control/pull/635>`_ pending to fix that. Until this is merged and released, please change the
199
-
default controller in the `controllers.yaml <ur_moveit_config/config/controllers.yaml>`_ file. Make
200
-
sure that the ``default`` field is assigned ``true`` for the ``joint_trajectory_controller`` and ``false``
201
-
for the
202
-
``scaled_joint_trajectory_controller``.
203
-
204
-
.. code-block::
205
-
206
-
controller_names:
207
-
- scaled_joint_trajectory_controller
208
-
- joint_trajectory_controller
209
-
210
-
211
-
scaled_joint_trajectory_controller:
212
-
action_ns: follow_joint_trajectory
213
-
type: FollowJointTrajectory
214
-
default: false
215
-
joints:
216
-
- shoulder_pan_joint
217
-
- shoulder_lift_joint
218
-
- elbow_joint
219
-
- wrist_1_joint
220
-
- wrist_2_joint
221
-
- wrist_3_joint
222
-
223
-
224
-
joint_trajectory_controller:
225
-
action_ns: follow_joint_trajectory
226
-
type: FollowJointTrajectory
227
-
default: true
228
-
joints:
229
-
- shoulder_pan_joint
230
-
- shoulder_lift_joint
231
-
- elbow_joint
232
-
- wrist_1_joint
233
-
- wrist_2_joint
234
-
- wrist_3_joint
235
-
236
-
Then start
197
+
Currently, the ``scaled_joint_trajectory_controller`` does not work with ros2_control fake_hardware. There is an
198
+
`upstream Merge-Request <https://github.com/ros-controls/ros2_control/pull/822>`_ pending to fix that. Until this is merged and released, you'll have to fallback to the ``joint_trajectory_controller`` by passing ``initial_controller:=joint_trajectory_controller`` to the driver's startup. Also, you'll have to tell MoveIt! that you're using fake_hardware as it then has to map to the other controller:
0 commit comments