From c0282b66d8e9657854916fb18326d506e2e459a1 Mon Sep 17 00:00:00 2001 From: Felix Durchdewald Date: Thu, 18 Jan 2024 14:04:43 +0100 Subject: [PATCH] adapted documentation to new package --- .vscode/c_cpp_properties.json | 20 ++++++++++ .vscode/settings.json | 10 +++++ .../examples/my_robot_cell/assemble_urdf.rst | 36 +++++++++++++----- .../my_robot_cell/build_moveit_config.rst | 20 +++++++++- .../my_robot_cell/start_ur_driver.rst | 37 +++++++++++++++++++ 5 files changed, 111 insertions(+), 12 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..920fd51 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,20 @@ +{ + "configurations": [ + { + "browse": { + "databaseFilename": "${default}", + "limitSymbolsToIncludedHeaders": false + }, + "includePath": [ + "/opt/ros/foxy/include/**", + "/usr/include/**" + ], + "name": "ROS", + "intelliSenseMode": "gcc-x64", + "compilerPath": "/usr/bin/gcc", + "cStandard": "gnu11", + "cppStandard": "c++14" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e28b16c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "python.autoComplete.extraPaths": [ + "/opt/ros/foxy/lib/python3.8/site-packages", + "" + ], + "python.analysis.extraPaths": [ + "/opt/ros/foxy/lib/python3.8/site-packages", + "" + ] +} \ No newline at end of file diff --git a/ur_documentation/docs/source/examples/my_robot_cell/assemble_urdf.rst b/ur_documentation/docs/source/examples/my_robot_cell/assemble_urdf.rst index b83995f..a11f22f 100644 --- a/ur_documentation/docs/source/examples/my_robot_cell/assemble_urdf.rst +++ b/ur_documentation/docs/source/examples/my_robot_cell/assemble_urdf.rst @@ -21,34 +21,50 @@ First, we'll have to **include** the macro to generate the robot arm: :linenos: :caption: my_robot_cell_description/urdf/my_robot_cell.urdf.xacro -This line only loaded the macro for generating the robot. +The second **include** contains our costum workspace: + +.. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_description/urdf/my_robot_cell.urdf.xacro + :language: xml + :start-at: + :end-at: + :linenos: + :caption: my_robot_cell_description/urdf/my_robot_cell.urdf.xacro + +Those lines only loadeded the macros for generating the robot and the workcell. Later, we will call the macro to create the arm. Therefore, we need to declare certain arguments that must be passed to the macro. .. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_description/urdf/my_robot_cell.urdf.xacro :language: xml :start-at: - :end-at: + :end-at: :linenos: :caption: my_robot_cell_description/urdf/my_robot_cell.urdf.xacro -The following section contains all items within the workcell that are not part of the robot arm. If you are not experienced in writing URDFs, you may want to refer to this `tutorial `_. +The macro we are calling now contains all items within the workcell that are not part of the robot arm. If you are not experienced in writing URDFs, you may want to refer to this `tutorial `_. .. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_description/urdf/my_robot_cell.urdf.xacro :language: xml - :start-at: - :end-before: - :linenos: + :start-at: + :end-at: + :linenos: :caption: my_robot_cell_description/urdf/my_robot_cell.urdf.xacro -This section of the URDF provides an example of what a custom workcell could resemble. Your workspace will likely vary from this one. Please feel free to modify this portion of the URDF to match your own setup. In this instance, our workspace comprises a table in front of a wall, featuring a monitor, and the **ur20** robot arm mounted on top. +The loaded macro is defined in the following manner: + +.. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_description/urdf/my_robot_cell_macro.xacro + :language: xml + :linenos: + :caption: my_robot_cell_description/urdf/my_robot_cell_macro.urdf.xacro + +This macro provides an example of what a custom workcell could resemble. Your workspace will likely vary from this one. Please feel free to modify this portion of the URDF to match your own setup. In this instance, our workspace comprises a table in front of a wall, featuring a monitor, and the **ur20** robot arm mounted on top. -The final step before generating the robot is to create its parent link. +Ensure that your custom workcell includes the parent link, which must be passed to the **ur_robot** macro. In this example, we chose to create a link named **robot_mount**. -.. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_description/urdf/my_robot_cell.urdf.xacro +.. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_description/urdf/my_robot_cell_macro.xacro :language: xml :start-at: - :end-before: :linenos: :caption: my_robot_cell_description/urdf/my_robot_cell.urdf.xacro diff --git a/ur_documentation/docs/source/examples/my_robot_cell/build_moveit_config.rst b/ur_documentation/docs/source/examples/my_robot_cell/build_moveit_config.rst index 6f9bc6b..f4f454a 100644 --- a/ur_documentation/docs/source/examples/my_robot_cell/build_moveit_config.rst +++ b/ur_documentation/docs/source/examples/my_robot_cell/build_moveit_config.rst @@ -18,7 +18,7 @@ Please note that MoveIt itself provides a detailed `tutorial + :end-at: + :linenos: + :caption: my_robot_cell_control/urdf/my_robot_cell_control.urdf.xacro + + +define the necessary arguments that need to be passed to the macro, + +.. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_control/urdf/my_robot_cell_control.urdf.xacro + :language: py + :start-at: + :end-at: + :linenos: + :caption: my_robot_cell_control/urdf/my_robot_cell_control.urdf.xacro + + +and then call the macro by providing all the specified arguments. + +.. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_control/urdf/my_robot_cell_control.urdf.xacro + :language: py + :start-at: + :linenos: + :caption: my_robot_cell_control/urdf/my_robot_cell_control.urdf.xacro + + Now that everything is in place, we can proceed to start up a driver instance. To initialize the ``ur_robot_driver`` using our customized workcell description, we need to create a launch file. .. literalinclude:: ../../../../../my_robot_cell/my_robot_cell_control/launch/start_robot.launch.py