Skip to content

Commit

Permalink
Merge branch 'master' into add_iron
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Aug 20, 2023
2 parents a7e6fe4 + 43c9e9e commit 9a4679d
Show file tree
Hide file tree
Showing 104 changed files with 417 additions and 2,466 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

This repository provides examples for functionalities and capabilities of `ros2_control` framework.
It consists of simple implementations that demonstrate different concepts.
It consists of simple implementations that demonstrate different concepts. Choose the right branch of this repository matching you ROS 2 distribution as well as the full documentation on [control.ros.org](https://control.ros.org), see [this table](#build-status).

If you want to have rather step by step manual how to do things with `ros2_control` checkout the [ros-control/roscon2022_workshop](https://github.com/ros-controls/roscon2022_workshop) repository.

Expand Down
13 changes: 8 additions & 5 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ Example 12: "Controller chaining"
Installation
=====================

You can install the demos manually or use the provided docker file.
You can install the demos locally or use the provided docker file.

Manual Install
---------------

First, you have to install `ROS 2 on your computer <https://docs.ros.org/en/rolling/Installation.html>`__.
Local installation
------------------

If you have ROS 2 installed already, choose the right version of this documentation and branch of the ``ros2_control_demos`` repository matching you ROS 2 distribution, see `this table <https://github.com/ros-controls/ros2_control_demos#build-status>`__.

Otherwise, install `ROS 2 {DISTRO} on your computer <https://docs.ros.org/en/rolling/Installation.html>`__.

.. note::

Expand All @@ -98,7 +101,7 @@ Download the ``ros2_control_demos`` repository and install its dependencies with
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone https://github.com/ros-controls/ros2_control_demos
git clone https://github.com/ros-controls/ros2_control_demos -b {REPOS_FILE_BRANCH}
cd ~/ros2_ws/
rosdep update --rosdistro=$ROS_DISTRO
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion example_1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ install(
DESTINATION include/ros2_control_demo_example_1
)
install(
DIRECTORY description/launch description/ros2_control description/urdf description/rviz
DIRECTORY description/launch description/ros2_control description/urdf
DESTINATION share/ros2_control_demo_example_1
)
install(
Expand Down
2 changes: 1 addition & 1 deletion example_1/bringup/launch/rrbot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def generate_launch_description():
]
)
rviz_config_file = PathJoinSubstitution(
[FindPackageShare("ros2_control_demo_example_1"), "rviz", "rrbot.rviz"]
[FindPackageShare("ros2_control_demo_description"), "rrbot/rviz", "rrbot.rviz"]
)

control_node = Node(
Expand Down
6 changes: 3 additions & 3 deletions example_1/description/launch/view_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def generate_launch_description():
declared_arguments.append(
DeclareLaunchArgument(
"description_package",
default_value="ros2_control_demo_example_1",
default_value="ros2_control_demo_description",
description="Description package with robot URDF/xacro files. Usually the argument \
is not set, it enables use of a custom description.",
)
Expand Down Expand Up @@ -69,7 +69,7 @@ def generate_launch_description():
PathJoinSubstitution([FindExecutable(name="xacro")]),
" ",
PathJoinSubstitution(
[FindPackageShare(description_package), "urdf", description_file]
[FindPackageShare("ros2_control_demo_example_1"), "urdf", description_file]
),
" ",
"prefix:=",
Expand All @@ -79,7 +79,7 @@ def generate_launch_description():
robot_description = {"robot_description": robot_description_content}

rviz_config_file = PathJoinSubstitution(
[FindPackageShare(description_package), "rviz", "rrbot.rviz"]
[FindPackageShare(description_package), "rrbot/rviz", "rrbot.rviz"]
)

joint_state_publisher_node = Node(
Expand Down
4 changes: 2 additions & 2 deletions example_1/description/urdf/rrbot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_desc
<xacro:arg name="prefix" default="" />

<!-- Import RRBot macro -->
<xacro:include filename="$(find ros2_control_demo_example_1)/urdf/rrbot_description.urdf.xacro" />
<xacro:include filename="$(find ros2_control_demo_description)/rrbot/urdf/rrbot_description.urdf.xacro" />

<!-- Import Rviz colors -->
<xacro:include filename="$(find ros2_control_demo_example_1)/urdf/rrbot.materials.xacro" />
<xacro:include filename="$(find ros2_control_demo_description)/rrbot/urdf/rrbot.materials.xacro" />

<!-- Import RRBot ros2_control description -->
<xacro:include filename="$(find ros2_control_demo_example_1)/ros2_control/rrbot.ros2_control.xacro" />
Expand Down
119 changes: 0 additions & 119 deletions example_1/description/urdf/rrbot_description.urdf.xacro

This file was deleted.

4 changes: 2 additions & 2 deletions example_1/doc/userdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ Files used for this demos
* Controllers yaml: `rrbot_controllers.yaml <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_1/bringup/config/rrbot_controllers.yaml>`__
* URDF file: `rrbot.urdf.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_1/description/urdf/rrbot.urdf.xacro>`__

* Description: `rrbot_description.urdf.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_1/description/urdf/rrbot_description.urdf.xacro>`__
* Description: `rrbot_description.urdf.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/ros2_control_demo_description/rrbot/urdf/rrbot_description.urdf.xacro>`__
* ``ros2_control`` tag: `rrbot.ros2_control.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_1/description/ros2_control/rrbot.ros2_control.xacro>`__

* RViz configuration: `rrbot.rviz <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_1/description/rviz/rrbot.rviz>`__
* RViz configuration: `rrbot.rviz <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/ros2_control_demo_description/rrbot/rviz/rrbot.rviz>`__
* Test nodes goals configuration:

+ `rrbot_forward_position_publisher <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_1/bringup/config/rrbot_forward_position_publisher.yaml>`__
Expand Down
1 change: 1 addition & 0 deletions example_1/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<exec_depend>joint_state_publisher_gui</exec_depend>
<exec_depend>joint_trajectory_controller</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>ros2_control_demo_description</exec_depend>
<exec_depend>ros2_controllers_test_nodes</exec_depend>
<exec_depend>ros2controlcli</exec_depend>
<exec_depend>ros2launch</exec_depend>
Expand Down
2 changes: 1 addition & 1 deletion example_12/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ install(
DESTINATION include/ros2_control_demo_example_12
)
install(
DIRECTORY description/launch description/ros2_control description/urdf description/gazebo description/rviz
DIRECTORY description/launch description/ros2_control description/urdf description/gazebo
DESTINATION share/ros2_control_demo_example_12
)
install(
Expand Down
2 changes: 1 addition & 1 deletion example_12/bringup/launch/rrbot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def generate_launch_description():
]
)
rviz_config_file = PathJoinSubstitution(
[FindPackageShare("ros2_control_demo_example_12"), "rviz", "rrbot.rviz"]
[FindPackageShare("ros2_control_demo_description"), "rrbot/rviz", "rrbot.rviz"]
)

control_node = Node(
Expand Down
6 changes: 3 additions & 3 deletions example_12/description/launch/view_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def generate_launch_description():
declared_arguments.append(
DeclareLaunchArgument(
"description_package",
default_value="ros2_control_demo_example_12",
default_value="ros2_control_demo_description",
description="Description package with robot URDF/xacro files. Usually the argument \
is not set, it enables use of a custom description.",
)
Expand Down Expand Up @@ -59,7 +59,7 @@ def generate_launch_description():
PathJoinSubstitution([FindExecutable(name="xacro")]),
" ",
PathJoinSubstitution(
[FindPackageShare(description_package), "urdf", description_file]
[FindPackageShare("ros2_control_demo_example_12"), "urdf", description_file]
),
" ",
"prefix:=",
Expand All @@ -69,7 +69,7 @@ def generate_launch_description():
robot_description = {"robot_description": robot_description_content}

rviz_config_file = PathJoinSubstitution(
[FindPackageShare(description_package), "rviz", "rrbot.rviz"]
[FindPackageShare(description_package), "rrbot/rviz", "rrbot.rviz"]
)

joint_state_publisher_node = Node(
Expand Down
Loading

0 comments on commit 9a4679d

Please sign in to comment.