Skip to content

Commit 205597c

Browse files
Release/Flexiv ROS 2 Humble v1.8 (#52)
1 parent a5efbb0 commit 205597c

35 files changed

+108
-790
lines changed

.github/workflows/humble-binary-build.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v3
24+
with:
25+
submodules: recursive
2426
- name: Install dependencies
2527
run: |
2628
sudo apt-get update && sudo apt-get install -y \
@@ -36,9 +38,18 @@ jobs:
3638
ros-humble-joint-state-publisher \
3739
ros-humble-joint-state-publisher-gui \
3840
ros-humble-robot-state-publisher
41+
- name: Build and install flexiv_rdk
42+
shell: bash
43+
run: |
44+
cd flexiv_hardware/rdk/thirdparty
45+
bash build_and_install_dependencies.sh ~/rdk_install
46+
cd ..
47+
mkdir -p build && cd build
48+
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
49+
cmake --build . --target install --config Release
3950
- name: Build and run tests
4051
id: action-ros-ci
41-
uses: ros-tooling/action-ros-ci@v0.3
52+
uses: ros-tooling/action-ros-ci@v0.4
4253
with:
4354
target-ros2-distro: ${{ env.ROS_DISTRO }}
4455
package-name: |
@@ -51,5 +62,12 @@ jobs:
5162
flexiv_robot_states_broadcaster
5263
flexiv_test_nodes
5364
gpio_controller
54-
joint_impedance_controller
65+
colcon-defaults: |
66+
{
67+
"build": {
68+
"cmake-args": [
69+
"-DCMAKE_PREFIX_PATH=~/rdk_install"
70+
]
71+
}
72+
}
5573
skip-tests: true

README.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,12 @@ The main launch file to start the robot driver is the `rizon.launch.py` - it loa
113113
114114
- `robot_sn` (*required*) - Serial number of the robot to connect to. Remove any space, for example: Rizon4s-123456
115115
- `rizon_type` (default: *Rizon4*) - type of the Flexiv Rizon robot. (Rizon4, Rizon4M, Rizon4R, Rizon4s, Rizon10 or Rizon10s)
116+
- `rdk_control_mode` (default: *joint_position*) - Flexiv RDK control mode for ROS 2 joint position and velocity interfaces. Options: *joint_position* or *joint_impedance*
116117
- `load_gripper` (default: *false*) - loads the Flexiv Grav gripper as the end-effector of the robot and the gripper control node.
117118
- `use_fake_hardware` (default: *false*) - starts `FakeSystem` instead of real hardware. This is a simple simulation that mimics joint command to their states.
118119
- `start_rviz` (deafult: *true*) - starts RViz automatically with the launch file.
119120
- `fake_sensor_commands` (default: *false*) - enables fake command interfaces for sensors used for simulations. Used only if `use_fake_hardware` parameter is true.
120-
- `robot_controller` (default: *rizon_arm_controller*) - robot controller to start. Available controllers: *forward_position_controller*, *rizon_arm_controller*, *joint_impedance_controller*.
121+
- `robot_controller` (default: *rizon_arm_controller*) - robot controller to start. Available controllers: *rizon_arm_controller*
121122
122123
*(Details about other launch files can be found in [`flexiv_bringup`](/flexiv_bringup))*
123124
@@ -149,25 +150,6 @@ The main launch file to start the robot driver is the `rizon.launch.py` - it loa
149150
```
150151
151152
The joint position goals can be changed in `flexiv_bringup/config/joint_trajectory_position_publisher.yaml`
152-
- To test another controller, define it using the `robot_controller` launch argument, for example the `joint_impedance_controller`:
153-
154-
```bash
155-
ros2 launch flexiv_bringup rizon.launch.py robot_sn:=[robot_sn] robot_controller:=joint_impedance_controller
156-
```
157-
158-
Open a new terminal and run the launch file:
159-
160-
```bash
161-
ros2 launch flexiv_bringup sine_sweep_impedance.launch.py robot_sn:=[robot_sn]
162-
```
163-
164-
The robot should run a sine-sweep motion with joint impedance control.
165-
166-
> [!NOTE]
167-
> The command starts the robot in the joint torque mode. In this mode, gravity and friction are compensated **only** for the robot **without** any attached objects (e.g. the gripper, camera).
168-
169-
> [!NOTE]
170-
> Joint impedance control is not supported in fake/simulated hardware.
171153
172154
### Using MoveIt
173155

flexiv_bringup/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ This package contains launch files: the main driver launcher, the MoveIt launch
55
- `rizon.launch.py` - the main launcher: starts *ros2_control* node including hardware interface, runs joint states, Flexiv robot states broadcaster, and a controller, and visualizes the current robot pose in RViZ. The default controller is `rizon_arm_controller`, a joint trajectory controller.
66
- `rizon_moveit.launch.py` - runs MoveIt together with the main driver. The controller for robot joints started in this launch file is *rizon_arm_controller*.
77
- `test_joint_trajectory_controller.launch` - sends joint trajectory goals to the *rizon_arm_controller*.
8-
- `sine_sweep_position.launch.py` - gets current joint states and then performs a sine-sweep motion with *forward_position_controller*.
9-
- `sine_sweep_impedance.launch.py` - gets current joint states and then performs a sine-sweep motion with *joint_impedance_controller*.
108

119
**NOTE**: The example launch files run the demo nodes from the `flexiv_test_nodes` package, with the parameters defined in `/config`.

flexiv_bringup/config/rizon_controllers.yaml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,18 @@ controller_manager:
22
ros__parameters:
33
update_rate: 1000 # Hz
44

5-
forward_position_controller:
6-
type: position_controllers/JointGroupPositionController
7-
85
rizon_arm_controller:
96
type: joint_trajectory_controller/JointTrajectoryController
107

118
joint_state_broadcaster:
129
type: joint_state_broadcaster/JointStateBroadcaster
1310

14-
joint_impedance_controller:
15-
type: joint_impedance_controller/JointImpedanceController
16-
1711
gpio_controller:
1812
type: gpio_controller/GPIOController
1913

2014
flexiv_robot_states_broadcaster:
2115
type: flexiv_robot_states_broadcaster/FlexivRobotStatesBroadcaster
2216

23-
forward_position_controller:
24-
ros__parameters:
25-
joints:
26-
- $(var robot_sn)_joint1
27-
- $(var robot_sn)_joint2
28-
- $(var robot_sn)_joint3
29-
- $(var robot_sn)_joint4
30-
- $(var robot_sn)_joint5
31-
- $(var robot_sn)_joint6
32-
- $(var robot_sn)_joint7
33-
34-
joint_impedance_controller:
35-
ros__parameters:
36-
joints:
37-
- $(var robot_sn)_joint1
38-
- $(var robot_sn)_joint2
39-
- $(var robot_sn)_joint3
40-
- $(var robot_sn)_joint4
41-
- $(var robot_sn)_joint5
42-
- $(var robot_sn)_joint6
43-
- $(var robot_sn)_joint7
44-
k_p: [3000.0, 3000.0, 800.0, 800.0, 200.0, 200.0, 200.0]
45-
k_d: [80.0, 80.0, 40.0, 40.0, 8.0, 8.0, 8.0]
46-
4717
rizon_arm_controller:
4818
ros__parameters:
4919
joints:

flexiv_bringup/config/sine_sweep_impedance_config.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

flexiv_bringup/config/sine_sweep_position_config.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

flexiv_bringup/launch/rizon.launch.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
def generate_launch_description():
2222
rizon_type_param_name = "rizon_type"
2323
robot_sn_param_name = "robot_sn"
24+
rdk_control_mode_param_name = "rdk_control_mode"
2425
start_rviz_param_name = "start_rviz"
2526
load_gripper_param_name = "load_gripper"
2627
gripper_name_param_name = "gripper_name"
@@ -48,6 +49,15 @@ def generate_launch_description():
4849
)
4950
)
5051

52+
declared_arguments.append(
53+
DeclareLaunchArgument(
54+
rdk_control_mode_param_name,
55+
default_value="joint_position",
56+
description="RDK control mode for the ROS 2 control joint position and velocity interfaces. Options: joint_position, joint_impedance",
57+
choices=["joint_position", "joint_impedance"],
58+
)
59+
)
60+
5161
declared_arguments.append(
5262
DeclareLaunchArgument(
5363
start_rviz_param_name,
@@ -101,13 +111,14 @@ def generate_launch_description():
101111
DeclareLaunchArgument(
102112
robot_controller_param_name,
103113
default_value="rizon_arm_controller",
104-
description="Robot controller to start. Available: forward_position_controller, rizon_arm_controller, joint_impedance_controller.",
114+
description="Robot controller to start. Available: rizon_arm_controller",
105115
)
106116
)
107117

108118
# Initialize Arguments
109119
rizon_type = LaunchConfiguration(rizon_type_param_name)
110120
robot_sn = LaunchConfiguration(robot_sn_param_name)
121+
rdk_control_mode = LaunchConfiguration(rdk_control_mode_param_name)
111122
start_rviz = LaunchConfiguration(start_rviz_param_name)
112123
load_gripper = LaunchConfiguration(load_gripper_param_name)
113124
gripper_name = LaunchConfiguration(gripper_name_param_name)
@@ -135,6 +146,9 @@ def generate_launch_description():
135146
"rizon_type:=",
136147
rizon_type,
137148
" ",
149+
"rdk_control_mode:=",
150+
rdk_control_mode,
151+
" ",
138152
"load_gripper:=",
139153
load_gripper,
140154
" ",
@@ -183,6 +197,7 @@ def generate_launch_description():
183197
robot_description,
184198
ParameterFile(robot_controllers, allow_substs=True),
185199
{"robot_sn": robot_sn},
200+
{"rdk_control_mode": rdk_control_mode},
186201
],
187202
remappings=[("joint_states", "flexiv_arm/joint_states")],
188203
output="both",

flexiv_bringup/launch/rizon_moveit.launch.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def launch_setup(context):
4747
rizon_type = LaunchConfiguration("rizon_type")
4848
robot_sn = LaunchConfiguration("robot_sn")
4949
robot_sn_str = robot_sn.perform(context)
50+
rdk_control_mode = LaunchConfiguration("rdk_control_mode")
5051
start_rviz = LaunchConfiguration("start_rviz")
5152
load_gripper = LaunchConfiguration("load_gripper")
5253
gripper_name = LaunchConfiguration("gripper_name")
@@ -75,6 +76,9 @@ def launch_setup(context):
7576
"rizon_type:=",
7677
rizon_type,
7778
" ",
79+
"rdk_control_mode:=",
80+
rdk_control_mode,
81+
" ",
7882
"load_gripper:=",
7983
load_gripper,
8084
" ",
@@ -243,6 +247,7 @@ def launch_setup(context):
243247
robot_description,
244248
ParameterFile(robot_controllers, allow_substs=True),
245249
{"robot_sn": robot_sn},
250+
{"rdk_control_mode": rdk_control_mode},
246251
],
247252
remappings=[("joint_states", "flexiv_arm/joint_states")],
248253
output="both",
@@ -404,6 +409,15 @@ def generate_launch_description():
404409
)
405410
)
406411

412+
declared_arguments.append(
413+
DeclareLaunchArgument(
414+
"rdk_control_mode",
415+
default_value="joint_position",
416+
description="RDK control mode for the ROS 2 control joint position and velocity interfaces. Options: joint_position, joint_impedance",
417+
choices=["joint_position", "joint_impedance"],
418+
)
419+
)
420+
407421
declared_arguments.append(
408422
DeclareLaunchArgument(
409423
"start_rviz",

flexiv_bringup/launch/sine_sweep_impedance.launch.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

flexiv_bringup/launch/sine_sweep_position.launch.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)