Skip to content

Commit

Permalink
fix quaternion vector to match FRI standard
Browse files Browse the repository at this point in the history
  • Loading branch information
krmihaly committed Oct 15, 2024
1 parent 419c591 commit f8cf452
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ cartesian_pose_controller:
- dummy_cart_joint/x
- dummy_cart_joint/y
- dummy_cart_joint/z
- dummy_cart_joint/qw
- dummy_cart_joint/qx
- dummy_cart_joint/qy
- dummy_cart_joint/qz
- dummy_cart_joint/qw


interface_names:
- position
14 changes: 5 additions & 9 deletions kuka_sunrise_fri_driver/src/hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,6 @@ hardware_interface::return_type KukaFRIHardwareInterface::read(
robot_state_.operation_mode_ = robotState().getOperationMode();
robot_state_.drive_state_ = robotState().getDriveState();
robot_state_.overlay_type_ = robotState().getOverlayType();
RCLCPP_DEBUG(
rclcpp::get_logger("KukaFRIHardwareInterface"),
"cartesianPoseQuaternion state: %f %f %f %f %f %f %f",cart_pose[0],cart_pose[1],
cart_pose[2],cart_pose[3],cart_pose[4],cart_pose[5]
,cart_pose[6]);
for (auto & output : gpio_outputs_)
{
output.getValue();
Expand Down Expand Up @@ -462,8 +457,8 @@ std::vector<hardware_interface::StateInterface> KukaFRIHardwareInterface::export
}
std::vector<std::string> cart_joints_list = {
hardware_interface::HW_IF_X, hardware_interface::HW_IF_Y, hardware_interface::HW_IF_Z,
hardware_interface::HW_IF_QX, hardware_interface::HW_IF_QY, hardware_interface::HW_IF_QZ,
hardware_interface::HW_IF_QW};
hardware_interface::HW_IF_QW,hardware_interface::HW_IF_QX, hardware_interface::HW_IF_QY,
hardware_interface::HW_IF_QZ};
for (size_t i = 0; i < cart_joints_list.size(); ++i)
{
state_interfaces.emplace_back(
Expand Down Expand Up @@ -509,8 +504,9 @@ KukaFRIHardwareInterface::export_command_interfaces()
}
std::vector<std::string> cart_joints_list = {
hardware_interface::HW_IF_X, hardware_interface::HW_IF_Y, hardware_interface::HW_IF_Z,
hardware_interface::HW_IF_QX, hardware_interface::HW_IF_QY, hardware_interface::HW_IF_QZ,
hardware_interface::HW_IF_QW};
hardware_interface::HW_IF_QW, hardware_interface::HW_IF_QX, hardware_interface::HW_IF_QY,
hardware_interface::HW_IF_QZ,
};
for (size_t i = 0; i < cart_joints_list.size(); ++i)
{
command_interfaces.emplace_back(
Expand Down

0 comments on commit f8cf452

Please sign in to comment.