Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix after kinematics_interface API break (v1.1.0 -> v1.2.0) #26

Merged
merged 5 commits into from
Jan 18, 2025
Merged
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
2 changes: 1 addition & 1 deletion ft_gui/ft_gui/ft_calibration_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def connect_ros_calib(self, state):
"background-color: rgb(255,0,51);"
"border-radius:5px;"
)
self.node.get_logger().warning(f"An error occurred:{error}")
self.node.get_logger().warning(f"An error occurred: {error}")
self.node.get_logger().error('Failled to initialize ROS2 comms!')
else:
self.is_connected = False
Expand Down
11 changes: 10 additions & 1 deletion ft_tools/src/ft_calibration_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ bool FtCalibrationNode::init_kinematics_monitoring()
return false;
}
bool all_ok = true;

// Load URDF
auto robot_param = rclcpp::Parameter();
if (!this->get_parameter("robot_description", robot_param)) {
RCLCPP_ERROR(this->get_logger(), "parameter robot_description not set");
return false;
}
auto robot_description = robot_param.as_string();

// Load the differential IK plugin
if (!parameters_.kinematics.plugin_name.empty()) {
try {
Expand All @@ -302,7 +311,7 @@ bool FtCalibrationNode::init_kinematics_monitoring()
kinematics_ = std::unique_ptr<kinematics_interface::KinematicsInterface>(
kinematics_loader_->createUnmanagedInstance(parameters_.kinematics.plugin_name));
if (!kinematics_->initialize(
this->get_node_parameters_interface(), parameters_.kinematics.tip))
robot_description, this->get_node_parameters_interface(), "kinematics"))
{
all_ok &= false;
}
Expand Down
11 changes: 10 additions & 1 deletion ft_tools/src/ft_estimation_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,15 @@ bool FtEstimationNode::init_kinematics_monitoring()
return false;
}
bool all_ok = true;

// Load URDF
auto robot_param = rclcpp::Parameter();
if (!this->get_parameter("robot_description", robot_param)) {
RCLCPP_ERROR(this->get_logger(), "parameter robot_description not set");
return false;
}
auto robot_description = robot_param.as_string();

// Load the differential IK plugin
if (!parameters_.kinematics.plugin_name.empty()) {
try {
Expand All @@ -289,7 +298,7 @@ bool FtEstimationNode::init_kinematics_monitoring()
kinematics_ = std::unique_ptr<kinematics_interface::KinematicsInterface>(
kinematics_loader_->createUnmanagedInstance(parameters_.kinematics.plugin_name));
if (!kinematics_->initialize(
this->get_node_parameters_interface(), parameters_.kinematics.tip))
robot_description, this->get_node_parameters_interface(), "kinematics"))
{
all_ok &= false;
}
Expand Down