Skip to content

Commit 0e9ad2a

Browse files
Backport/Update Foxy README (#22)
1 parent 66e4221 commit 0e9ad2a

File tree

6 files changed

+83
-28
lines changed

6 files changed

+83
-28
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ name: Foxy Binary Build
33
on:
44
push:
55
branches:
6-
- main
76
- foxy
87
pull_request:
98
branches:
10-
- main
119
- foxy
1210

1311
jobs:
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Humble Binary Build
2+
3+
on:
4+
push:
5+
branches:
6+
- humble
7+
pull_request:
8+
branches:
9+
- humble
10+
11+
jobs:
12+
humble_binary:
13+
name: Humble binary job
14+
runs-on: ubuntu-22.04
15+
container:
16+
image: osrf/ros:humble-desktop
17+
strategy:
18+
fail-fast: false
19+
env:
20+
ROS_DISTRO: humble
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
- name: Install dependencies
25+
run: |
26+
sudo apt-get update && sudo apt-get install -y \
27+
libeigen3-dev \
28+
ros-humble-xacro \
29+
ros-humble-tinyxml2-vendor \
30+
ros-humble-ros2-control \
31+
ros-humble-realtime-tools \
32+
ros-humble-control-toolbox \
33+
ros-humble-moveit \
34+
ros-humble-ros2-controllers \
35+
ros-humble-test-msgs \
36+
ros-humble-joint-state-publisher \
37+
ros-humble-joint-state-publisher-gui \
38+
ros-humble-robot-state-publisher
39+
- name: Build and run tests
40+
id: action-ros-ci
41+
uses: ros-tooling/[email protected]
42+
with:
43+
target-ros2-distro: ${{ env.ROS_DISTRO }}
44+
package-name: |
45+
flexiv_bringup
46+
flexiv_controllers
47+
flexiv_description
48+
flexiv_hardware
49+
flexiv_moveit_config
50+
flexiv_msgs
51+
flexiv_test_nodes
52+
skip-tests: true

README.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
# Flexiv ROS 2
22

3-
[![Foxy Binary Build](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-binary-build.yml/badge.svg?branch=foxy)](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-binary-build.yml)
4-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![docs](https://img.shields.io/badge/docs-sphinx-yellow)](https://rdk.flexiv.com/manual/ros2_packages.html)
54

6-
For ROS 2 users to easily work with [RDK](https://github.com/flexivrobotics/flexiv_rdk), the APIs of RDK are wrapped into ROS packages in `flexiv_ros2`. Key functionalities like real-time joint torque and position control are supported, and the integration with `ros2_control` framework and MoveIt 2 is also implemented.
5+
For ROS 2 users to easily work with [RDK](https://github.com/flexivrobotics/flexiv_rdk), the APIs of RDK are wrapped into ROS packages in `flexiv_ros2`. Key functionalities like real-time joint torque and position control are supported, and the integration with `ros2_control` framework and MoveIt! 2 is also implemented.
76

87
## References
98

109
[Flexiv RDK main webpage](https://rdk.flexiv.com/) contains important information like RDK user manual and network setup.
1110

1211
## Compatibility
1312

14-
| **Supported OS** | **Supported ROS 2 distribution** |
15-
| ---------------------- | ---------------------------------------------------- |
16-
| Ubuntu 20.04 | [Foxy Fitzroy](https://docs.ros.org/en/foxy/index.html) |
13+
| **Supported OS** | **Supported ROS 2 distribution** |
14+
| ---------------- | ------------------------------------------------------------- |
15+
| Ubuntu 20.04 | [Foxy Fitzroy](https://docs.ros.org/en/foxy/index.html) |
16+
| Ubuntu 22.04 | [Humble Hawksbill](https://docs.ros.org/en/humble/index.html) |
17+
18+
### Release Status
19+
20+
| **ROS 2 Distro** | Foxy | Humble |
21+
| ------------------ | --------------------------------------------------------------- | ----------------------------------------------------- |
22+
| **Branch** | [foxy](https://github.com/flexivrobotics/flexiv_ros2/tree/foxy) | [humble](https://github.com/flexivrobotics/flexiv_ros2) |
23+
| **Release Status** | [![Foxy Binary Build](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-binary-build.yml/badge.svg?branch=foxy)](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-binary-build.yml) | [![Humble Binary Build](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/humble-binary-build.yml/badge.svg?branch=humble)](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/humble-binary-build.yml) |
1724

1825
## Getting Started
1926

20-
This project was developed for ROS 2 Foxy on Ubuntu 20.04. Other versions of Ubuntu and ROS 2 may work, but are not officially supported.
27+
This project was developed for ROS 2 Foxy (Ubuntu 20.04) and Humble (Ubuntu 22.04). Other versions of Ubuntu and ROS 2 may work, but are not officially supported.
2128

2229
1. Install [ROS 2 Foxy via Debian Packages](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html)
30+
2331
2. Install `colcon` and additional ROS packages:
2432

2533
```bash
@@ -40,6 +48,7 @@ This project was developed for ROS 2 Foxy on Ubuntu 20.04. Other versions of Ubu
4048
ros-foxy-robot-state-publisher \
4149
ros-foxy-rviz2
4250
```
51+
4352
3. Setup workspace:
4453

4554
```bash
@@ -49,13 +58,15 @@ This project was developed for ROS 2 Foxy on Ubuntu 20.04. Other versions of Ubu
4958
cd flexiv_ros2/
5059
git submodule update --init --recursive
5160
```
61+
5262
4. Install dependencies:
5363

5464
```bash
5565
cd ~/flexiv_ros2_ws
5666
rosdep update
5767
rosdep install --from-paths src --ignore-src --rosdistro foxy -r -y
5868
```
69+
5970
5. Build and source the workspace:
6071

6172
```bash
@@ -106,6 +117,7 @@ The main launch file to start the robot driver is the `rizon.launch.py` - it loa
106117
```bash
107118
ros2 launch flexiv_bringup rizon.launch.py robot_ip:=dont-care local_ip:=dont-care use_fake_hardware:=true
108119
```
120+
109121
2. Publish commands to controllers
110122

111123
- To send the goal position to the controller by using the node from `flexiv_test_nodes`, start the following command in a new terminal:
@@ -151,10 +163,10 @@ ros2 launch flexiv_bringup rizon_moveit.launch.py robot_ip:=dont-care local_ip:=
151163

152164
The robot driver (`rizon.launch.py`) publishes the following feedback states to the respective ROS topics:
153165

154-
* `/joint_states`: Measured joint states of the robot: joint position, velocity and torque. [[`sensor_msgs/JointState.msg`](https://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/JointState.html)]
155-
* `/external_wrench_in_tcp_broadcaster/external_wrench_in_tcp`: Estimated external wrench applied on TCP and expressed in TCP frame $^{TCP}F_{ext}$ in force $[N]$ and moment $[Nm]$. [[`geometry_msgs/WrenchStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/WrenchStamped.html)]
156-
* `/external_wrench_in_base_broadcaster/external_wrench_in_base`: Estimated external wrench applied on TCP and expressed in base frame $^{0}F_{ext}$ in force $[N]$ and moment $[Nm]$. [[`geometry_msgs/WrenchStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/WrenchStamped.html)]
157-
* `/force_torque_sensor_broadcaster/wrench`: Force-torque (FT) sensor raw reading in flange frame: $^{flange}F_{raw}$ in force $[N]$ and moment $[Nm]$. The value is 0 if no FT sensor is installed. [[`geometry_msgs/WrenchStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/WrenchStamped.html)]
158-
* `/tcp_pose_broadcaster/tcp_pose`: Measured TCP pose expressed in base frame $^{0}T_{TCP}$ in position $[m]$ and quaternion. [[`geometry_msgs/PoseStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/PoseStamped.html)]
166+
- `/joint_states`: Measured joint states of the robot: joint position, velocity and torque. [[`sensor_msgs/JointState.msg`](https://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/JointState.html)]
167+
- `/external_wrench_in_tcp_broadcaster/external_wrench_in_tcp`: Estimated external wrench applied on TCP and expressed in TCP frame $^{TCP}F_{ext}$ in force $[N]$ and moment $[Nm]$. [[`geometry_msgs/WrenchStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/WrenchStamped.html)]
168+
- `/external_wrench_in_base_broadcaster/external_wrench_in_base`: Estimated external wrench applied on TCP and expressed in base frame $^{0}F_{ext}$ in force $[N]$ and moment $[Nm]$. [[`geometry_msgs/WrenchStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/WrenchStamped.html)]
169+
- `/force_torque_sensor_broadcaster/wrench`: Force-torque (FT) sensor raw reading in flange frame: $^{flange}F_{raw}$ in force $[N]$ and moment $[Nm]$. The value is 0 if no FT sensor is installed. [[`geometry_msgs/WrenchStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/WrenchStamped.html)]
170+
- `/tcp_pose_broadcaster/tcp_pose`: Measured TCP pose expressed in base frame $^{0}T_{TCP}$ in position $[m]$ and quaternion. [[`geometry_msgs/PoseStamped.msg`](https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/PoseStamped.html)]
159171

160-
**NOTE**: The topic names of the broadcasters are specified in `flexiv_bringup/config/rizon_controllers.yaml`
172+
**NOTE**: The topic names of the broadcasters are specified in `flexiv_bringup/config/rizon_controllers.yaml`

flexiv_bringup/config/sine_sweep_impedance_config.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,4 @@ sine_sweep_impedance_controller:
33

44
controller_name: "joint_impedance_controller"
55
wait_sec_between_publish: 0.001
6-
joints:
7-
- joint1
8-
- joint2
9-
- joint3
10-
- joint4
11-
- joint5
12-
- joint6
13-
- joint7
6+
speed_scaling: 1.0

flexiv_hardware/src/flexiv_hardware_interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ return_type FlexivHardwareInterface::prepare_command_mode_switch(
443443
}
444444

445445
return_type FlexivHardwareInterface::perform_command_mode_switch(
446-
const std::vector<std::string>& start_interfaces,
447-
const std::vector<std::string>& stop_interfaces)
446+
const std::vector<std::string>& /*start_interfaces*/,
447+
const std::vector<std::string>& /*stop_interfaces*/)
448448
{
449449
if (stop_modes_.size() != 0
450450
&& std::find(stop_modes_.begin(), stop_modes_.end(),

flexiv_test_nodes/flexiv_test_nodes/sine_sweep_impedance_controller.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ def __init__(self):
1919
# Declare all parameters
2020
self.declare_parameter("controller_name", "joint_impedance_controller")
2121
self.declare_parameter("wait_sec_between_publish", 0.001)
22-
self.declare_parameter("joints")
22+
self.declare_parameter("speed_scaling", 1.0)
2323

2424
# Read parameters
2525
controller_name = self.get_parameter("controller_name").value
2626
wait_sec_between_publish = self.get_parameter("wait_sec_between_publish").value
27-
self.joints = self.get_parameter("joints").value
27+
self.speed_scaling = self.get_parameter("speed_scaling").value
2828

2929
publish_topic = "/" + controller_name + "/" + "commands"
3030

@@ -44,7 +44,7 @@ def timer_callback(self):
4444
target_pos = self.init_pos.copy()
4545
for i in range(7):
4646
target_pos[i] = self.init_pos[i] + SWING_AMP * math.sin(
47-
2 * math.pi * SWING_FREQ * self.loop_time
47+
2 * math.pi * SWING_FREQ * self.speed_scaling * self.loop_time
4848
)
4949
msg = JointPosVel()
5050
msg.positions = target_pos

0 commit comments

Comments
 (0)