Skip to content

Commit

Permalink
add cart imp mode to hwif and manager node
Browse files Browse the repository at this point in the history
  • Loading branch information
krmihaly committed Oct 15, 2024
1 parent 419c591 commit f26cf0c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kuka_sunrise_fri_driver/src/hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ CallbackReturn KukaFRIHardwareInterface::on_activate(const rclcpp_lifecycle::Sta
fri_connection_->setPositionControlMode();
fri_connection_->setClientCommandMode(ClientCommandModeID::CARTESIAN_POSE_COMMAND_MODE);
break;
case kuka_drivers_core::ControlMode::CARTESIAN_IMPEDANCE_CONTROL:
fri_connection_->setCartesianImpedanceControlMode(
hw_cart_stiffness_commands_, hw_cart_damping_commands_);
fri_connection_->setClientCommandMode(ClientCommandModeID::CARTESIAN_POSE_COMMAND_MODE);
break;
case kuka_drivers_core::ControlMode::WRENCH_CONTROL:
fri_connection_->setCartesianImpedanceControlMode(
hw_cart_stiffness_commands_, hw_cart_damping_commands_);
Expand Down Expand Up @@ -378,6 +383,8 @@ void KukaFRIHardwareInterface::updateCommand(const rclcpp::Time &)
break;
}
case kuka_drivers_core::ControlMode::CARTESIAN_POSITION_CONTROL:
[[fallthrough]];
case kuka_drivers_core::ControlMode::CARTESIAN_IMPEDANCE_CONTROL:
{
const double * cartesianPoseQuaternion = hw_cart_pose_commands_.data();
RCLCPP_DEBUG(
Expand Down
4 changes: 4 additions & 0 deletions kuka_sunrise_fri_driver/src/robot_manager_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ bool RobotManagerNode::onControlModeChangeRequest(int control_mode)
break;
case kuka_drivers_core::ControlMode::CARTESIAN_POSITION_CONTROL:
break;
case kuka_drivers_core::ControlMode::CARTESIAN_IMPEDANCE_CONTROL:
break;
case kuka_drivers_core::ControlMode::WRENCH_CONTROL:
[[fallthrough]];
case kuka_drivers_core::ControlMode::JOINT_TORQUE_CONTROL:
Expand Down Expand Up @@ -447,6 +449,8 @@ std::string RobotManagerNode::GetControllerName() const
return joint_torque_controller_name_;
case kuka_drivers_core::ControlMode::CARTESIAN_POSITION_CONTROL:
return cart_pose_controller_name_;
case kuka_drivers_core::ControlMode::CARTESIAN_IMPEDANCE_CONTROL:
return cart_pose_controller_name_;
case kuka_drivers_core::ControlMode::WRENCH_CONTROL:
return wrench_controller_name_;
default:
Expand Down

0 comments on commit f26cf0c

Please sign in to comment.