Skip to content

Commit c0e815e

Browse files
Release/Flexiv ROS 2 Humble v1.6 (#43)
1 parent d42ebdd commit c0e815e

File tree

26 files changed

+96
-41
lines changed

26 files changed

+96
-41
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ ros2 topic pub /gpio_controller/gpio_outputs flexiv_msgs/msg/GPIOStates "{states
207207
208208
The gripper control is implemented in the `flexiv_gripper` package to interface with the gripper that is connected to the robot.
209209
210-
Start the `flexiv_gripper_node` with the following launch file:
210+
Start the `flexiv_gripper_node` with the following launch file, the default gripper is Flexiv Grav (Flexiv-GN01):
211211
212212
```bash
213-
ros2 launch flexiv_gripper flexiv_gripper.launch.py robot_sn:=[robot_sn]
213+
ros2 launch flexiv_gripper flexiv_gripper.launch.py robot_sn:=[robot_sn] gripper_name:=Flexiv-GN01
214214
```
215215
216216
Or, you can also start the gripper control with the robot driver if the gripper is Flexiv Grav:

flexiv_bringup/launch/rizon.launch.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def generate_launch_description():
2323
robot_sn_param_name = "robot_sn"
2424
start_rviz_param_name = "start_rviz"
2525
load_gripper_param_name = "load_gripper"
26+
gripper_name_param_name = "gripper_name"
2627
use_fake_hardware_param_name = "use_fake_hardware"
2728
fake_sensor_commands_param_name = "fake_sensor_commands"
2829
robot_controller_param_name = "robot_controller"
@@ -50,7 +51,7 @@ def generate_launch_description():
5051
DeclareLaunchArgument(
5152
start_rviz_param_name,
5253
default_value="true",
53-
description="start RViz automatically with the launch file",
54+
description="Start RViz automatically with the launch file",
5455
)
5556
)
5657

@@ -62,6 +63,14 @@ def generate_launch_description():
6263
)
6364
)
6465

66+
declared_arguments.append(
67+
DeclareLaunchArgument(
68+
gripper_name_param_name,
69+
default_value="Flexiv-GN01",
70+
description="Full name of the gripper to be controlled, can be found in Flexiv Elements -> Settings -> Device",
71+
)
72+
)
73+
6574
declared_arguments.append(
6675
DeclareLaunchArgument(
6776
use_fake_hardware_param_name,
@@ -92,6 +101,7 @@ def generate_launch_description():
92101
robot_sn = LaunchConfiguration(robot_sn_param_name)
93102
start_rviz = LaunchConfiguration(start_rviz_param_name)
94103
load_gripper = LaunchConfiguration(load_gripper_param_name)
104+
gripper_name = LaunchConfiguration(gripper_name_param_name)
95105
use_fake_hardware = LaunchConfiguration(use_fake_hardware_param_name)
96106
fake_sensor_commands = LaunchConfiguration(fake_sensor_commands_param_name)
97107
robot_controller = LaunchConfiguration(robot_controller_param_name)
@@ -121,6 +131,9 @@ def generate_launch_description():
121131
"load_gripper:=",
122132
load_gripper,
123133
" ",
134+
"gripper_name:=",
135+
gripper_name,
136+
" ",
124137
"use_fake_hardware:=",
125138
use_fake_hardware,
126139
" ",
@@ -226,6 +239,7 @@ def generate_launch_description():
226239
),
227240
launch_arguments={
228241
"robot_sn": robot_sn,
242+
"gripper_name": gripper_name,
229243
"use_fake_hardware": use_fake_hardware,
230244
}.items(),
231245
condition=IfCondition(load_gripper),

flexiv_bringup/launch/rizon_moveit.launch.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def generate_launch_description():
4040
robot_sn_param_name = "robot_sn"
4141
start_rviz_param_name = "start_rviz"
4242
load_gripper_param_name = "load_gripper"
43+
gripper_name_param_name = "gripper_name"
4344
use_fake_hardware_param_name = "use_fake_hardware"
4445
fake_sensor_commands_param_name = "fake_sensor_commands"
4546
warehouse_sqlite_path_param_name = "warehouse_sqlite_path"
@@ -68,7 +69,7 @@ def generate_launch_description():
6869
DeclareLaunchArgument(
6970
start_rviz_param_name,
7071
default_value="true",
71-
description="start RViz automatically with the launch file",
72+
description="Start RViz automatically with the launch file",
7273
)
7374
)
7475

@@ -80,6 +81,14 @@ def generate_launch_description():
8081
)
8182
)
8283

84+
declared_arguments.append(
85+
DeclareLaunchArgument(
86+
gripper_name_param_name,
87+
default_value="Flexiv-GN01",
88+
description="Full name of the gripper to be controlled, can be found in Flexiv Elements -> Settings -> Device",
89+
)
90+
)
91+
8392
declared_arguments.append(
8493
DeclareLaunchArgument(
8594
use_fake_hardware_param_name,
@@ -117,6 +126,7 @@ def generate_launch_description():
117126
robot_sn = LaunchConfiguration(robot_sn_param_name)
118127
start_rviz = LaunchConfiguration(start_rviz_param_name)
119128
load_gripper = LaunchConfiguration(load_gripper_param_name)
129+
gripper_name = LaunchConfiguration(gripper_name_param_name)
120130
use_fake_hardware = LaunchConfiguration(use_fake_hardware_param_name)
121131
fake_sensor_commands = LaunchConfiguration(fake_sensor_commands_param_name)
122132
warehouse_sqlite_path = LaunchConfiguration(warehouse_sqlite_path_param_name)
@@ -147,6 +157,9 @@ def generate_launch_description():
147157
"load_gripper:=",
148158
load_gripper,
149159
" ",
160+
"gripper_name:=",
161+
gripper_name,
162+
" ",
150163
"use_fake_hardware:=",
151164
use_fake_hardware,
152165
" ",
@@ -360,6 +373,7 @@ def generate_launch_description():
360373
),
361374
launch_arguments={
362375
"robot_sn": robot_sn,
376+
"gripper_name": gripper_name,
363377
"use_fake_hardware": use_fake_hardware,
364378
}.items(),
365379
condition=IfCondition(load_gripper),

flexiv_bringup/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>flexiv_bringup</name>
5-
<version>1.5.1</version>
5+
<version>1.6.0</version>
66
<description>Package with launch files and run-time configurations for Flexiv robots with `ros2_control`</description>
77
<maintainer email="[email protected]">Mun Seng Phoon</maintainer>
88
<license>Apache License 2.0</license>

flexiv_controllers/flexiv_robot_states_broadcaster/include/flexiv_robot_states_broadcaster/flexiv_robot_states.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class FlexivRobotStates : public SemanticComponentInterface<flexiv_msgs::msg::Ro
6565
void init_robot_states_message(flexiv_msgs::msg::RobotStates& message)
6666
{
6767
message.tcp_pose.header.frame_id = kWorldFrameId;
68-
message.tcp_pose_des.header.frame_id = kWorldFrameId;
6968
message.tcp_vel.header.frame_id = kWorldFrameId;
7069
message.flange_pose.header.frame_id = kWorldFrameId;
7170
message.ft_sensor_raw.header.frame_id = kFlangeFrameId;
@@ -96,7 +95,6 @@ class FlexivRobotStates : public SemanticComponentInterface<flexiv_msgs::msg::Ro
9695

9796
// Update timestamps
9897
message.tcp_pose.header.stamp = message.header.stamp;
99-
message.tcp_pose_des.header.stamp = message.header.stamp;
10098
message.tcp_vel.header.stamp = message.header.stamp;
10199
message.flange_pose.header.stamp = message.header.stamp;
102100
message.ft_sensor_raw.header.stamp = message.header.stamp;
@@ -114,7 +112,6 @@ class FlexivRobotStates : public SemanticComponentInterface<flexiv_msgs::msg::Ro
114112
message.tau_ext = toJointStateMsg(flexiv_robot_states_ptr->tau_ext);
115113

116114
message.tcp_pose.pose = toPoseMsg(flexiv_robot_states_ptr->tcp_pose);
117-
message.tcp_pose_des.pose = toPoseMsg(flexiv_robot_states_ptr->tcp_pose_des);
118115
message.tcp_vel.accel = toAccelMsg(flexiv_robot_states_ptr->tcp_vel);
119116
message.flange_pose.pose = toPoseMsg(flexiv_robot_states_ptr->flange_pose);
120117
message.ft_sensor_raw.wrench = toWrenchMsg(flexiv_robot_states_ptr->ft_sensor_raw);

flexiv_controllers/flexiv_robot_states_broadcaster/include/flexiv_robot_states_broadcaster/flexiv_robot_states_broadcaster.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "flexiv_robot_states_broadcaster_parameters.hpp"
1818
#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"
1919
#include "rclcpp_lifecycle/state.hpp"
20-
#include "realtime_tools/realtime_publisher.h"
20+
#include "realtime_tools/realtime_publisher.hpp"
2121

2222
namespace flexiv_robot_states_broadcaster {
2323
using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
@@ -63,7 +63,6 @@ class FlexivRobotStatesBroadcaster : public controller_interface::ControllerInte
6363

6464
using PoseStampedPublisher = rclcpp::Publisher<geometry_msgs::msg::PoseStamped>;
6565
std::shared_ptr<PoseStampedPublisher> tcp_pose_publisher_;
66-
std::shared_ptr<PoseStampedPublisher> tcp_pose_desired_publisher_;
6766
std::shared_ptr<PoseStampedPublisher> flange_pose_publisher_;
6867

6968
using AccelStampedPublisher = rclcpp::Publisher<geometry_msgs::msg::AccelStamped>;

flexiv_controllers/flexiv_robot_states_broadcaster/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>flexiv_robot_states_broadcaster</name>
5-
<version>1.5.1</version>
5+
<version>1.6.0</version>
66
<description>The robot states broadcaster publishes the Flexiv robot states.</description>
77
<maintainer email="[email protected]">Mun Seng Phoon</maintainer>
88
<license>Apache License 2.0</license>

flexiv_controllers/flexiv_robot_states_broadcaster/src/flexiv_robot_states_broadcaster.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ CallbackReturn FlexivRobotStatesBroadcaster::on_configure(
6868
// Create the publishers for the robot states
6969
tcp_pose_publisher_ = get_node()->create_publisher<geometry_msgs::msg::PoseStamped>(
7070
kTcpPoseTopic, rclcpp::SystemDefaultsQoS());
71-
tcp_pose_desired_publisher_ = get_node()->create_publisher<geometry_msgs::msg::PoseStamped>(
72-
kTcpPoseDesiredTopic, rclcpp::SystemDefaultsQoS());
7371
tcp_velocity_publisher_ = get_node()->create_publisher<geometry_msgs::msg::AccelStamped>(
7472
kTcpVelocityTopic, rclcpp::SystemDefaultsQoS());
7573
flange_pose_publisher_ = get_node()->create_publisher<geometry_msgs::msg::PoseStamped>(
@@ -120,7 +118,6 @@ controller_interface::return_type FlexivRobotStatesBroadcaster::update(
120118

121119
const auto& flexiv_robot_states_msg = realtime_flexiv_robot_states_publisher_->msg_;
122120
tcp_pose_publisher_->publish(flexiv_robot_states_msg.tcp_pose);
123-
tcp_pose_desired_publisher_->publish(flexiv_robot_states_msg.tcp_pose_des);
124121
tcp_velocity_publisher_->publish(flexiv_robot_states_msg.tcp_vel);
125122
flange_pose_publisher_->publish(flexiv_robot_states_msg.flange_pose);
126123
ft_sensor_publisher_->publish(flexiv_robot_states_msg.ft_sensor_raw);

flexiv_controllers/gpio_controller/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>gpio_controller</name>
5-
<version>1.5.1</version>
5+
<version>1.6.0</version>
66
<description>Flexiv custom gpio controller to control the GPIOs of the robot.</description>
77
<maintainer email="[email protected]">Mun Seng Phoon</maintainer>
88
<license>Apache License 2.0</license>

flexiv_controllers/joint_impedance_controller/include/joint_impedance_controller/joint_impedance_controller.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "rclcpp_lifecycle/lifecycle_publisher.hpp"
2121
#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"
2222
#include "rclcpp_lifecycle/state.hpp"
23-
#include "realtime_tools/realtime_buffer.h"
23+
#include "realtime_tools/realtime_buffer.hpp"
2424

2525
namespace joint_impedance_controller {
2626
using CmdType = flexiv_msgs::msg::JointPosVel;

0 commit comments

Comments
 (0)