Skip to content

Commit 07ce1fc

Browse files
Update Humble documentation to match the Humble state (#11)
As the Humble description is structured differently to the Jazzy+ description, the example has to be restructured, as well. --------- Co-authored-by: Felix Exner <[email protected]>
1 parent 4385328 commit 07ce1fc

20 files changed

+752
-381
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ repos:
88
- id: check-merge-conflict
99
- id: check-symlinks
1010
- id: check-yaml
11+
args: ['--unsafe']
1112
- id: end-of-file-fixer
1213
- id: mixed-line-ending
1314
- id: trailing-whitespace

my_robot_cell/doc/assemble_urdf.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The workcell macro is defined in the following manner:
5757
.. literalinclude:: ../my_robot_cell_description/urdf/my_robot_cell_macro.xacro
5858
:language: xml
5959
:linenos:
60-
:caption: my_robot_cell_description/urdf/my_robot_cell_macro.urdf.xacro
60+
:caption: my_robot_cell_description/urdf/my_robot_cell_macro.xacro
6161

6262
This macro provides an example of what a custom workcell could resemble. Your workspace will likely
6363
vary from this one. Please feel free to modify this portion of the URDF to match your own setup. In
@@ -72,7 +72,7 @@ macro. In this example, we chose to create a link named **robot_mount**.
7272
:start-at: <link name="robot_mount"/>
7373
:end-at: </joint>
7474
:linenos:
75-
:caption: my_robot_cell_description/urdf/my_robot_cell.urdf.xacro
75+
:caption: my_robot_cell_description/urdf/my_robot_cell.xacro
7676

7777
After that we are finally able to actually **create the robot arm** by calling the macro.
7878

@@ -81,7 +81,7 @@ After that we are finally able to actually **create the robot arm** by calling t
8181
:start-at: <xacro:ur_robot
8282
:end-at: </xacro:ur_robot>
8383
:linenos:
84-
:caption: my_robot_cell_description/urdf/my_robot_cell.urdf.xacro
84+
:caption: my_robot_cell_description/urdf/my_robot_cell.xacro
8585

8686
Note that the **origin** argument is transmitted in a different manner than the other arguments.
8787

my_robot_cell/doc/build_moveit_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ First, we need to start a robot, simulated or real. If you start a real robot, m
129129
.. code-block:: bash
130130
131131
# You can switch to real hardware if you prefer
132-
ros2 launch my_robot_cell_control start_robot.launch.py use_mock_hardware:=true
132+
ros2 launch my_robot_cell_control start_robot.launch.py use_fake_hardware:=true
133133
134134
135135
Second, we can start the move_group node by running the launch file the setup assistant created for us:

my_robot_cell/doc/start_ur_driver.rst

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ This URDF is very similar to the one we have already assembled. We simply need t
2323

2424
.. literalinclude:: ../my_robot_cell_control/urdf/my_robot_cell_controlled.urdf.xacro
2525
:language: xml
26-
:start-at: <xacro:include filename="$(find ur_robot_driver)/urdf/ur.ros2_control.xacro"/>
27-
:end-at: <xacro:include filename="$(find ur_robot_driver)/urdf/ur.ros2_control.xacro"/>
26+
:start-at: <xacro:include filename="$(find ur_description)/urdf/ur.ros2_control.xacro"/>
27+
:end-at: <xacro:include filename="$(find ur_description)/urdf/ur.ros2_control.xacro"/>
2828
:caption: my_robot_cell_control/urdf/my_robot_cell_controlled.urdf.xacro
2929

3030

@@ -33,7 +33,7 @@ define the necessary arguments that need to be passed to the macro,
3333
.. literalinclude:: ../my_robot_cell_control/urdf/my_robot_cell_controlled.urdf.xacro
3434
:language: xml
3535
:start-at: <xacro:arg name="robot_ip" default="0.0.0.0"/>
36-
:end-at: <xacro:arg name="mock_sensor_commands" default="false" />
36+
:end-at: <xacro:arg name="fake_sensor_commands" default="false" />
3737
:caption: my_robot_cell_control/urdf/my_robot_cell_controlled.urdf.xacro
3838

3939

@@ -57,39 +57,12 @@ For now, we just copy the default one for the ur20.
5757
cp $(ros2 pkg prefix ur_description)/share/ur_description/config/ur20/default_kinematics.yaml \
5858
my_robot_cell_control/config/my_robot_calibration.yaml
5959
60-
61-
Create robot_state_publisher launchfile
62-
---------------------------------------
63-
64-
To use the custom controlled description, we need to generate a launchfile loading that description
65-
(Since it contains less / potentially different) arguments than the "default" one. In that
66-
launchfile we need to start a ``robot_state_publisher`` (RSP) node that will get the description as a
67-
parameter and redistribute it via the ``robot_description`` topic:
68-
69-
.. literalinclude:: ../my_robot_cell_control/launch/rsp.launch.py
70-
:language: py
71-
:start-after: # Author: Felix Exner
72-
:linenos:
73-
:caption: my_robot_cell_control/launch/rsp.launch.py
74-
75-
With this we could start our workcell using
76-
77-
.. code-block:: bash
78-
79-
ros2 launch ur_robot_driver ur_control.launch.py \
80-
description_launchfile:=$(ros2 pkg prefix my_robot_cell_control)/share/my_robot_cell_control/launch/rsp.launch.py \
81-
use_mock_hardware:=true \
82-
robot_ip:=123 \
83-
ur_type:=ur20 \
84-
rviz_config_file:=$(ros2 pkg prefix my_robot_cell_description)/share/my_robot_cell_description/rviz/urdf.rviz \
85-
tf_prefix:=ur20_
86-
8760
Create start_robot launchfile
8861
-----------------------------
8962

90-
Since the command above is obviously not very convenient to start our robot, we wrap that into another
91-
launchfile that includes the ``ur_control.launch.py`` launchfile with the correct description
92-
launchfile and prefix:
63+
To launch a controlled robot with our custom description, we need to generate a launchfile. We
64+
include the ``ur_control.launch.py`` file from the driver and set its parameters to match our
65+
custom workcell.
9366

9467
.. literalinclude:: ../my_robot_cell_control/launch/start_robot.launch.py
9568
:language: py
@@ -100,7 +73,7 @@ With that we can start the robot using
10073

10174
.. code-block:: bash
10275
103-
ros2 launch my_robot_cell_control start_robot.launch.py use_mock_hardware:=true
76+
ros2 launch my_robot_cell_control start_robot.launch.py use_fake_hardware:=true
10477
10578
Testing everything
10679
------------------
@@ -121,7 +94,7 @@ We can start the system in a mocked simulation
12194
.. code-block:: bash
12295
12396
#start the driver with mocked hardware
124-
ros2 launch my_robot_cell_control start_robot.launch.py use_mock_hardware:=true
97+
ros2 launch my_robot_cell_control start_robot.launch.py use_fake_hardware:=true
12598
12699
Or to use it with a real robot:
127100

my_robot_cell/my_robot_cell_control/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(my_robot_cell_control)
44
find_package(ament_cmake REQUIRED)
55

66
install(
7-
DIRECTORY launch config urdf
7+
DIRECTORY launch config urdf rviz
88
DESTINATION share/${PROJECT_NAME}
99
)
1010

my_robot_cell/my_robot_cell_control/config/ros2_controllers.yaml

Lines changed: 0 additions & 94 deletions
This file was deleted.

my_robot_cell/my_robot_cell_control/config/update_rate.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
kinematics:
2+
shoulder:
3+
x: 0
4+
y: 0
5+
z: 0.23630000000000001
6+
roll: -0
7+
pitch: 0
8+
yaw: -0
9+
upper_arm:
10+
x: 0
11+
y: 0
12+
z: 0
13+
roll: 1.570796327
14+
pitch: 0
15+
yaw: -0
16+
forearm:
17+
x: -0.86199999999999999
18+
y: 0
19+
z: 0
20+
roll: -0
21+
pitch: 0
22+
yaw: -0
23+
wrist_1:
24+
x: -0.72870000000000001
25+
y: 0
26+
z: 0.20100000000000001
27+
roll: -0
28+
pitch: 0
29+
yaw: -0
30+
wrist_2:
31+
x: 0
32+
y: -0.1593
33+
z: -3.2672976162492252e-11
34+
roll: 1.570796327
35+
pitch: 0
36+
yaw: -0
37+
wrist_3:
38+
x: 0
39+
y: 0.15429999999999999
40+
z: -3.1647459019915597e-11
41+
roll: 1.5707963265897931
42+
pitch: 3.1415926535897931
43+
yaw: 3.1415926535897931
44+
hash: calib_4890363623803256388
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Joints limits
2+
#
3+
# Sources:
4+
#
5+
# - Universal Robots e-Series, User Manual, UR20, Version 5.14
6+
# https://s3-eu-west-1.amazonaws.com/ur-support-site/203281/706-276-00_UR20_User_Manual_en_Global.pdf
7+
joint_limits:
8+
shoulder_pan_joint:
9+
# acceleration limits are not publicly available
10+
has_acceleration_limits: false
11+
has_effort_limits: true
12+
has_position_limits: true
13+
has_velocity_limits: true
14+
max_effort: 738.0
15+
max_position: !degrees 360.0
16+
max_velocity: !degrees 120.0
17+
min_position: !degrees -360.0
18+
shoulder_lift_joint:
19+
# acceleration limits are not publicly available
20+
has_acceleration_limits: false
21+
has_effort_limits: true
22+
has_position_limits: true
23+
has_velocity_limits: true
24+
max_effort: 738.0
25+
max_position: !degrees 360.0
26+
max_velocity: !degrees 120.0
27+
min_position: !degrees -360.0
28+
elbow_joint:
29+
# acceleration limits are not publicly available
30+
has_acceleration_limits: false
31+
has_effort_limits: true
32+
has_position_limits: true
33+
has_velocity_limits: true
34+
max_effort: 433.0
35+
# we artificially limit this joint to half its actual joint position limit
36+
# to avoid (MoveIt/OMPL) planning problems, as due to the physical
37+
# construction of the robot, it's impossible to rotate the 'elbow_joint'
38+
# over more than approx +- 1 pi (the shoulder lift joint gets in the way).
39+
#
40+
# This leads to planning problems as the search space will be divided into
41+
# two sections, with no connections from one to the other.
42+
#
43+
# Refer to https://github.com/ros-industrial/universal_robot/issues/265 for
44+
# more information.
45+
max_position: !degrees 180.0
46+
max_velocity: !degrees 150.0
47+
min_position: !degrees -180.0
48+
wrist_1_joint:
49+
# acceleration limits are not publicly available
50+
has_acceleration_limits: false
51+
has_effort_limits: true
52+
has_position_limits: true
53+
has_velocity_limits: true
54+
max_effort: 107.0
55+
max_position: !degrees 360.0
56+
max_velocity: !degrees 210.0
57+
min_position: !degrees -360.0
58+
wrist_2_joint:
59+
# acceleration limits are not publicly available
60+
has_acceleration_limits: false
61+
has_effort_limits: true
62+
has_position_limits: true
63+
has_velocity_limits: true
64+
max_effort: 107.0
65+
max_position: !degrees 360.0
66+
max_velocity: !degrees 210.0
67+
min_position: !degrees -360.0
68+
wrist_3_joint:
69+
# acceleration limits are not publicly available
70+
has_acceleration_limits: false
71+
has_effort_limits: true
72+
has_position_limits: true
73+
has_velocity_limits: true
74+
max_effort: 107.0
75+
max_position: !degrees 360.0
76+
max_velocity: !degrees 210.0
77+
min_position: !degrees -360.0

0 commit comments

Comments
 (0)