Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/kilted-binary-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Kilted Binary Main
on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '34 12 * * 0'

jobs:
kilted_binary_main:
uses: ./.github/workflows/reusable_ici.yml
with:
ros_distro: kilted
ros_repo: main
ref_for_scheduled_build: main
21 changes: 21 additions & 0 deletions .github/workflows/kilted-binary-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Kilted Binary Testing
on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '34 12 * * 0'

jobs:
kilted_binary_testing:
uses: ./.github/workflows/reusable_ici.yml
with:
ros_distro: kilted
ros_repo: testing
ref_for_scheduled_build: main
2 changes: 2 additions & 0 deletions .github/workflows/reusable_ici.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
UPSTREAM_WORKSPACE: ${{ inputs.upstream_workspace }}
ROS_DISTRO: ${{ inputs.ros_distro }}
ROS_REPO: ${{ inputs.ros_repo }}
CMAKE_ARGS: -DMY_ROBOT_CELL_CONTROL_BUILD_INTEGRATION_TESTS=ON
ADDITIONAL_DEBS: docker.io netcat-openbsd curl # Needed for integration tests
- name: prepare target_ws for cache
if: ${{ always() && ! matrix.env.CCOV }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rolling-binary-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches:
- main
schedule:
- cron: '34 12 * * *'
- cron: '34 12 * * 0'

jobs:
rolling_binary_main:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rolling-binary-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches:
- main
schedule:
- cron: '34 12 * * *'
- cron: '34 12 * * 0'

jobs:
rolling_binary_testing:
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# Universal Robots ROS 2 tutorials
This package contains tutorials around the ROS 2 packages for Universal Robots.

## Branches & ROS distributions
This package intends to show use-cases and examples for the ROS 2 packages for Universal Robots.
The main branch of this repository will be used to show examples for the latest ROS 2 distribution,
ROS Rolling. For older ROS 2 distributions. This is valid for all active ROS 2 distributions, as
long as there is no specialized branch for that distribution. The following table shows the
branches and their corresponding ROS 2 distributions:

| ROS 2 Distro | Branch | Documentation |
|--------------|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Rolling** | [main](https://github.com/UniversalRobots/Universal_Robots_ROS2_Tutorials/tree/main) | [![Documentation](https://img.shields.io/badge/docs-latest-blue)](https://docs.universal-robots.com/Universal_Robots_ROS_Documentation/rolling/doc/ur_tutorials/tutorial_index.html) |
| **Jazzy** | [jazzy](https://github.com/UniversalRobots/Universal_Robots_ROS2_Tutorials/tree/jazzy) | [![Documentation](https://img.shields.io/badge/docs-jazzy-blue)](https://docs.universal-robots.com/Universal_Robots_ROS_Documentation/jazzy/doc/ur_tutorials/tutorial_index.html) |
| **Humble** | [humble](https://github.com/UniversalRobots/Universal_Robots_ROS2_Tutorials/tree/humble) | -- |

## Getting started
To use the tutorials from this repository, please make sure to [install ROS
2](https://docs.ros.org/en/rolling/Installation.html) on your system. Currently, only ROS Jazzy and
Rolling are supported.
2](https://docs.ros.org/en/rolling/Installation.html) on your system.

With that, please create a workspace, clone this repo into the workspace, install the dependencies
and build the workspace.
Expand Down
8 changes: 8 additions & 0 deletions my_dual_robot_cell/my_dual_robot_cell_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ install(
DESTINATION share/${PROJECT_NAME}
)

if(BUILD_TESTING)
find_package(launch_testing_ament_cmake REQUIRED)
add_launch_test(test/example_move.py
TIMEOUT
300
)
endif()

ament_package()
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,20 @@ controller_manager:
alice_joint_trajectory_controller:
type: joint_trajectory_controller/JointTrajectoryController

bob_trajectory_controller:
bob_joint_trajectory_controller:
type: joint_trajectory_controller/JointTrajectoryController

alice_scaled_joint_trajectory_controller:
type: ur_controllers/ScaledJointTrajectoryController
alice_forward_velocity_controller:
type: forward_command_controller/ForwardCommandController

bob_scaled_joint_trajectory_controller:
type: ur_controllers/ScaledJointTrajectoryController

forward_velocity_controller:
type: velocity_controllers/JointGroupVelocityController
bob_forward_velocity_controller:
type: forward_command_controller/ForwardCommandController

alice_forward_position_controller:
type: position_controllers/JointGroupPositionController
type: forward_command_controller/ForwardCommandController

bob_forward_position_controller:
type: position_controllers/JointGroupPositionController
type: forward_command_controller/ForwardCommandController


alice_speed_scaling_state_broadcaster:
Expand Down Expand Up @@ -114,6 +111,8 @@ alice_joint_trajectory_controller:
alice_wrist_1_joint: { trajectory: 0.2, goal: 0.1 }
alice_wrist_2_joint: { trajectory: 0.2, goal: 0.1 }
alice_wrist_3_joint: { trajectory: 0.2, goal: 0.1 }
speed_scaling:
state_interface: alice_speed_scaling/speed_scaling_factor

bob_joint_trajectory_controller:
ros__parameters:
Expand Down Expand Up @@ -141,62 +140,8 @@ bob_joint_trajectory_controller:
bob_wrist_1_joint: { trajectory: 0.2, goal: 0.1 }
bob_wrist_2_joint: { trajectory: 0.2, goal: 0.1 }
bob_wrist_3_joint: { trajectory: 0.2, goal: 0.1 }

alice_scaled_joint_trajectory_controller:
ros__parameters:
joints:
- alice_shoulder_pan_joint
- alice_shoulder_lift_joint
- alice_elbow_joint
- alice_wrist_1_joint
- alice_wrist_2_joint
- alice_wrist_3_joint
command_interfaces:
- position
state_interfaces:
- position
- velocity
state_publish_rate: 100.0
action_monitor_rate: 20.0
allow_partial_joints_goal: false
constraints:
stopped_velocity_tolerance: 0.2
goal_time: 0.0
alice_shoulder_pan_joint: { trajectory: 0.2, goal: 0.1 }
alice_shoulder_lift_joint: { trajectory: 0.2, goal: 0.1 }
alice_elbow_joint: { trajectory: 0.2, goal: 0.1 }
alice_wrist_1_joint: { trajectory: 0.2, goal: 0.1 }
alice_wrist_2_joint: { trajectory: 0.2, goal: 0.1 }
alice_wrist_3_joint: { trajectory: 0.2, goal: 0.1 }
speed_scaling_interface_name: alice_speed_scaling/speed_scaling_factor

bob_scaled_joint_trajectory_controller:
ros__parameters:
joints:
- bob_shoulder_pan_joint
- bob_shoulder_lift_joint
- bob_elbow_joint
- bob_wrist_1_joint
- bob_wrist_2_joint
- bob_wrist_3_joint
command_interfaces:
- position
state_interfaces:
- position
- velocity
state_publish_rate: 100.0
action_monitor_rate: 20.0
allow_partial_joints_goal: false
constraints:
stopped_velocity_tolerance: 0.2
goal_time: 0.0
bob_shoulder_pan_joint: { trajectory: 0.2, goal: 0.1 }
bob_shoulder_lift_joint: { trajectory: 0.2, goal: 0.1 }
bob_elbow_joint: { trajectory: 0.2, goal: 0.1 }
bob_wrist_1_joint: { trajectory: 0.2, goal: 0.1 }
bob_wrist_2_joint: { trajectory: 0.2, goal: 0.1 }
bob_wrist_3_joint: { trajectory: 0.2, goal: 0.1 }
speed_scaling_interface_name: bob_speed_scaling/speed_scaling_factor
speed_scaling:
state_interface: bob_speed_scaling/speed_scaling_factor

alice_forward_velocity_controller:
ros__parameters:
Expand Down Expand Up @@ -229,6 +174,7 @@ alice_forward_position_controller:
- alice_wrist_1_joint
- alice_wrist_2_joint
- alice_wrist_3_joint
interface_name: position

bob_forward_position_controller:
ros__parameters:
Expand All @@ -239,3 +185,4 @@ bob_forward_position_controller:
- bob_wrist_1_joint
- bob_wrist_2_joint
- bob_wrist_3_joint
interface_name: position
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ def controller_spawner(controllers, active=True):
return Node(
package="controller_manager",
executable="spawner",
parameters=[
ParameterFile(controllers_file, allow_substs=True),
],
arguments=[
"--controller-manager",
"/controller_manager",
Expand Down Expand Up @@ -189,6 +192,9 @@ def controller_spawner(controllers, active=True):
alice_initial_joint_controller_spawner_started = Node(
package="controller_manager",
executable="spawner",
parameters=[
ParameterFile(controllers_file, allow_substs=True),
],
arguments=[
alice_initial_joint_controller,
"-c",
Expand All @@ -201,6 +207,9 @@ def controller_spawner(controllers, active=True):
bob_initial_joint_controller_spawner_started = Node(
package="controller_manager",
executable="spawner",
parameters=[
ParameterFile(controllers_file, allow_substs=True),
],
arguments=[
bob_initial_joint_controller,
"-c",
Expand All @@ -213,6 +222,9 @@ def controller_spawner(controllers, active=True):
alice_initial_joint_controller_spawner_stopped = Node(
package="controller_manager",
executable="spawner",
parameters=[
ParameterFile(controllers_file, allow_substs=True),
],
arguments=[
alice_initial_joint_controller,
"-c",
Expand All @@ -226,6 +238,9 @@ def controller_spawner(controllers, active=True):
bob_initial_joint_controller_spawner_stopped = Node(
package="controller_manager",
executable="spawner",
parameters=[
ParameterFile(controllers_file, allow_substs=True),
],
arguments=[
bob_initial_joint_controller,
"-c",
Expand Down Expand Up @@ -396,14 +411,14 @@ def generate_launch_description():
declared_arguments.append(
DeclareLaunchArgument(
"alice_initial_joint_controller",
default_value="alice_scaled_joint_trajectory_controller",
default_value="alice_joint_trajectory_controller",
description="Initially loaded robot controller for the alice robot arm.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"bob_initial_joint_controller",
default_value="bob_scaled_joint_trajectory_controller",
default_value="bob_joint_trajectory_controller",
description="Initially loaded robot controller for the bob robot arm.",
)
)
Expand Down
4 changes: 3 additions & 1 deletion my_dual_robot_cell/my_dual_robot_cell_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>forward_command_controller</exec_depend>
<exec_depend>joint_state_broadcaster</exec_depend>
<exec_depend>joint_trajectory_controller</exec_depend>
<exec_depend>position_controllers</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>my_dual_robot_cell_description</exec_depend>
<exec_depend>ur_controllers</exec_depend>
Expand All @@ -24,6 +24,8 @@
<exec_depend>xacro</exec_depend>
<exec_depend>controller_manager</exec_depend>

<test_depend>launch_testing_ament_cmake</test_depend>
<test_depend>ros2run</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
Loading
Loading