Skip to content

Commit dc6b8b2

Browse files
committed
Update sphinx docs
1 parent dff662b commit dc6b8b2

File tree

8 files changed

+23
-67
lines changed

8 files changed

+23
-67
lines changed

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_moveit_config/.setup_assistant

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,5 @@ moveit_setup_assistant_config:
66
relative_path: config/my_robot_cell.srdf
77
package_settings:
88
author_name: Felix Exner
9-
author_email: [email protected]
10-
generated_timestamp: 1713785068
11-
control_xacro:
12-
command:
13-
- position
14-
state:
15-
- position
16-
- velocity
17-
modified_urdf:
18-
xacros:
19-
- control_xacro
20-
control_xacro:
21-
command:
22-
- position
23-
state:
24-
- position
25-
- velocity
9+
author_email: [email protected]
10+
generated_timestamp: 1742223443

my_robot_cell/my_robot_cell_moveit_config/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ find_package(ament_cmake REQUIRED)
55

66
ament_package()
77

8-
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}
9-
PATTERN "setup_assistant.launch" EXCLUDE)
8+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/launch")
9+
install(
10+
DIRECTORY launch
11+
DESTINATION share/${PROJECT_NAME}
12+
PATTERN "setup_assistant.launch" EXCLUDE)
13+
endif()
14+
1015
install(DIRECTORY config DESTINATION share/${PROJECT_NAME})
1116
install(FILES .setup_assistant DESTINATION share/${PROJECT_NAME})

my_robot_cell/my_robot_cell_moveit_config/launch/move_group.launch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33

44

55
def generate_launch_description():
6-
moveit_config = MoveItConfigsBuilder(
7-
"my_robot_cell", package_name="my_robot_cell_moveit_config"
8-
).to_moveit_configs()
6+
moveit_config = MoveItConfigsBuilder("my_robot_cell", package_name="my_robot_cell_moveit_config").to_moveit_configs()
97
return generate_move_group_launch(moveit_config)

my_robot_cell/my_robot_cell_moveit_config/launch/moveit_rviz.launch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33

44

55
def generate_launch_description():
6-
moveit_config = MoveItConfigsBuilder(
7-
"my_robot_cell", package_name="my_robot_cell_moveit_config"
8-
).to_moveit_configs()
6+
moveit_config = MoveItConfigsBuilder("my_robot_cell", package_name="my_robot_cell_moveit_config").to_moveit_configs()
97
return generate_moveit_rviz_launch(moveit_config)

my_robot_cell/my_robot_cell_moveit_config/launch/setup_assistant.launch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33

44

55
def generate_launch_description():
6-
moveit_config = MoveItConfigsBuilder(
7-
"my_robot_cell", package_name="my_robot_cell_moveit_config"
8-
).to_moveit_configs()
6+
moveit_config = MoveItConfigsBuilder("my_robot_cell", package_name="my_robot_cell_moveit_config").to_moveit_configs()
97
return generate_setup_assistant_launch(moveit_config)

my_robot_cell/my_robot_cell_moveit_config/package.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<description>
77
An automatically generated package with all the configuration and launch files for using the my_robot_cell with the MoveIt Motion Planning Framework
88
</description>
9-
<maintainer email="[email protected]">Felix Exner</maintainer>
9+
<maintainer email="[email protected]">Felix Exner</maintainer>
1010

1111
<license>BSD-3-Clause</license>
1212

1313
<url type="website">http://moveit.ros.org/</url>
1414
<url type="bugtracker">https://github.com/ros-planning/moveit2/issues</url>
1515
<url type="repository">https://github.com/ros-planning/moveit2</url>
1616

17-
<author email="[email protected]">Felix Exner</author>
17+
<author email="[email protected]">Felix Exner</author>
1818

1919
<buildtool_depend>ament_cmake</buildtool_depend>
2020

@@ -38,7 +38,6 @@
3838
<exec_depend>rviz2</exec_depend>
3939
<exec_depend>rviz_common</exec_depend>
4040
<exec_depend>rviz_default_plugins</exec_depend>
41-
<exec_depend>xacro</exec_depend>
4241

4342

4443
<export>

0 commit comments

Comments
 (0)