diff --git a/README.md b/README.md index 729094f5c..b8add40db 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,11 @@ The repository has three goals: The repository is inspired by the [ros_control_boilerplate](https://github.com/PickNikRobotics/ros_control_boilerplate) repository from Dave Coleman. The simulation has three parts/packages: -1. The first package, `ros2_control_demo_hardware`, implements the hardware interfaces described in the roadmap. +1. The first package, `ros2_control_demo_bringup`, holds launch files and runtime configurations for demo robots. +2. The second package, `ros2_control_demo_description`, stored URDF-description files, rviz configurations and meshes for the demo robots. +3. The third package, `ros2_control_demo_hardware`, implements the hardware interfaces described in the roadmap. The examples simulate a simple *RRbot* internally to provide sufficient test and demonstration data and reduce external dependencies. This package does not have any dependencies except `ros2` core packages and can, therefore, be used on SoC-hardware of headless systems. -2. The second package, `ros2_control_demo_hardware_gazebo`, uses a Gazebo simulator to simulate the *RRBot* and its physics. -This package is useful to test the connection of `ros2_control` to the Gazebo simulator and to detect any missing plugins. -3. The third package `ros2_control_demo_robot` holds examples for *RRbot* URDF-description, launch files and controllers. This repository demonstrates the following `ros2_control` concepts: @@ -80,19 +79,19 @@ Each example is started with a single launch file which starts up the robot hard The `rviz2` setup can be recreated following these steps: - The robot models can be visualized using `RobotModel` display using `/robot_description` topic. -- Or you can simply open the configuration from `rviz` folder in `ros2_control_demo_robot` package manually or directly by executing: +- Or you can simply open the configuration from `rviz` folder in `ros2_control_demo_description` package manually or directly by executing: ``` - rviz2 --display-config `ros2 pkg prefix ros2_control_demo_robot`/share/ros2_control_demo_robot/rviz/rrbot.rviz + rviz2 --display-config `ros2 pkg prefix ros2_control_demo_description`/share/ros2_control_demo_description/rviz/rrbot.rviz ``` *RRBot*, or ''Revolute-Revolute Manipulator Robot'', is a simple 3-linkage, 2-joint arm that we will use to demonstrate various features. It essentially a double inverted pendulum and demonstrates some fun control concepts within a simulator and was originally introduced for Gazebo tutorials. -The *RRbot* URDF files can be found in the `description` folder of `ros2_control_demo_robot` package. +The *RRbot* URDF files can be found in the `urdf` folder of `ros2_control_demo_description` package. ### Example 1: "Industrial Robots with only one interface" 1. Open another terminal and start the roslaunch file: ``` - ros2 launch ros2_control_demo_robot rrbot_system_position_only.launch.py + ros2 launch ros2_control_demo_bringup rrbot_system_position_only.launch.py ``` 2. Open another terminal and check that `RRBotSystemPositionOnlyHardware` loaded properly: diff --git a/doc/index.rst b/doc/index.rst index ae44f10be..df5e297a6 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -22,7 +22,7 @@ Start up the multi interface rrbot system: .. code-block:: bash - ros2 launch ros2_control_demo_robot rrbot_system_multi_interface.launch.py + ros2 launch ros2_control_demo_bringup rrbot_system_multi_interface.launch.py List the available interfaces diff --git a/ros2_control_demo_bringup/launch/diffbot_system.launch.py b/ros2_control_demo_bringup/launch/diffbot_system.launch.py index 3ad966f8b..ad42175f6 100644 --- a/ros2_control_demo_bringup/launch/diffbot_system.launch.py +++ b/ros2_control_demo_bringup/launch/diffbot_system.launch.py @@ -26,15 +26,15 @@ def generate_launch_description(): # Get URDF via xacro robot_description_path = os.path.join( - get_package_share_directory("ros2_control_demo_robot"), - "description", + get_package_share_directory("ros2_control_demo_description"), + "urdf", "diffbot_system.urdf.xacro", ) robot_description_config = xacro.process_file(robot_description_path) robot_description = {"robot_description": robot_description_config.toxml()} diffbot_diff_drive_controller = os.path.join( - get_package_share_directory("ros2_control_demo_robot"), + get_package_share_directory("ros2_control_demo_bringup"), "config", "diffbot_diff_drive_controller.yaml", ) diff --git a/ros2_control_demo_bringup/launch/rrbot.launch.py b/ros2_control_demo_bringup/launch/rrbot.launch.py index 1082fed3d..c52ec982e 100644 --- a/ros2_control_demo_bringup/launch/rrbot.launch.py +++ b/ros2_control_demo_bringup/launch/rrbot.launch.py @@ -49,7 +49,6 @@ def generate_launch_description(): declared_arguments.append( DeclareLaunchArgument( "description_file", - default_value="", description="URDF/XACRO description file with the robot.", ) ) @@ -182,14 +181,12 @@ def generate_launch_description(): arguments=[robot_controller, "-c", "/controller_manager"], ) - return LaunchDescription( - declared_arguments.append( - [ - control_node, - robot_state_pub_node, - rviz_node, - joint_state_broadcaster_spawner, - robot_controller_spawner, - ] - ) - ) + nodes = [ + control_node, + robot_state_pub_node, + rviz_node, + joint_state_broadcaster_spawner, + robot_controller_spawner, + ] + + return LaunchDescription(declared_arguments + nodes) diff --git a/ros2_control_demo_description/CMakeLists.txt b/ros2_control_demo_description/CMakeLists.txt index a4e1e7345..31d2879ba 100644 --- a/ros2_control_demo_description/CMakeLists.txt +++ b/ros2_control_demo_description/CMakeLists.txt @@ -10,7 +10,7 @@ endif() find_package(ament_cmake REQUIRED) install( - DIRECTORY launch rviz urdf + DIRECTORY launch meshes rviz urdf DESTINATION share/${PROJECT_NAME} ) diff --git a/ros2_control_demo_description/urdf/diffbot_system.urdf.xacro b/ros2_control_demo_description/urdf/diffbot_system.urdf.xacro index 7041cf01e..9bc10c156 100644 --- a/ros2_control_demo_description/urdf/diffbot_system.urdf.xacro +++ b/ros2_control_demo_description/urdf/diffbot_system.urdf.xacro @@ -6,16 +6,16 @@ https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/diffbot_de --> - + - + - + - + diff --git a/ros2_control_demo_description/urdf/rrbot/gazebo/rrbot.gazebo.xacro b/ros2_control_demo_description/urdf/rrbot/gazebo/rrbot.gazebo.xacro index 226dcd246..6fef4631c 100644 --- a/ros2_control_demo_description/urdf/rrbot/gazebo/rrbot.gazebo.xacro +++ b/ros2_control_demo_description/urdf/rrbot/gazebo/rrbot.gazebo.xacro @@ -10,7 +10,7 @@ https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_desc - $(find ros2_control_demo_robot)/config/rrbot_gazebo_forward_controller_position.yaml + $(find ros2_control_demo_bringup)/config/rrbot_gazebo_forward_controller_position.yaml diff --git a/ros2_control_demo_hardware/package.xml b/ros2_control_demo_hardware/package.xml index 9cb9eace8..4fa7e8fac 100644 --- a/ros2_control_demo_hardware/package.xml +++ b/ros2_control_demo_hardware/package.xml @@ -3,7 +3,7 @@ ros2_control_demo_hardware 0.0.0 - Demo package of `ros2_control` Hardware. This package provides example on how to define hardware of your own robot for ROS2 control. The package is used with `demo_robot` from package `ros2_control_demo_robot`. + Demo package of `ros2_control` Hardware. This package provides example on how to define hardware of your own robot for ROS2 control. The package is used with `demo_robot` from package `ros2_control_demo_description`. Denis Štogl