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

Cartesian Stiffness Values Ignored #53

Open
jcarpinelli-bdai opened this issue Mar 29, 2024 · 1 comment
Open

Cartesian Stiffness Values Ignored #53

jcarpinelli-bdai opened this issue Mar 29, 2024 · 1 comment

Comments

@jcarpinelli-bdai
Copy link

When I use the Cartesian pose interface through franka_semantic_components, the arm seems to ignore the Cartesian stiffness values I set through the /service_center. The Joint impedance values are respected, but no matter how low I set the Cartesian stiffness values, the arm is not compliant in Cartesian space.

To replicate this, you can add the following code to the on_configure method of the CartesianImpedanceExampleController class. Am I missing some way to configure the arm for compliant motion in Cartesian space?

  auto client =
      get_node()->create_client<franka_msgs::srv::SetCartesianStiffness>("service_server/set_cartesian_stiffness");
  
  auto request = std::make_shared<franka_msgs::srv::SetCartesianStiffness::Request>(franka_msgs::srv::SetCartesianStiffness::Request());
  request->cartesian_stiffness.at(0) = 10;
  request->cartesian_stiffness.at(1) = 10;
  request->cartesian_stiffness.at(2) = 10;
  request->cartesian_stiffness.at(3) = 10;
  request->cartesian_stiffness.at(4) = 10;
  request->cartesian_stiffness.at(5) = 10;

  auto future_result = client->async_send_request(request);
  future_result.wait_for(seconds(1));

  auto success = future_result.get();
  if (!success) {
    RCLCPP_FATAL(get_node()->get_logger(), "Failed to set Cartesian stiffness.");
    return controller_interface::CallbackReturn::ERROR;
  } else if (!success->success) {
    RCLCPP_FATAL(get_node()->get_logger(), "Failed to set Cartesian stiffness.");
    return controller_interface::CallbackReturn::ERROR;
  } else {
    RCLCPP_INFO(get_node()->get_logger(), "Cartesian stiffness set.");
  }
peterdavidfagan pushed a commit to peterdavidfagan/franka_ros2 that referenced this issue Apr 1, 2024
…introduce-franka-robotics-naming to humble

* commit '73091d474bf5d6e9d9f3e9e628ac7b0dd9554fa6':
  chore: Changed the copyright from Franka Emika to Franka Robotics
@AndreasKuhner
Copy link
Contributor

This seems to be a small oversight of us - currently there is no way to do CartesianImpedance control (which then would re-act to the Cartesian stiffnesses you set).

But: You can work around it by changing in line 293 to 303 in https://github.com/frankaemika/franka_ros2/blob/humble/franka_hardware/src/robot.cpp to a research_interface::robot::Move::ControllerMode::kCartesianImpedance (or give the initialization function a parameter to be either/or)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants