Skip to content

Franka hand force fedback #187

@gaspersavle

Description

@gaspersavle

Hi, i'm using the Franka hand on the Franka Emika Panda robot, running franka_ros on ros noetic. I control the gripper using the franka_gripper/GraspGoal message. But i've noticed that franka_gripper/joint_states effort field is always 0. I've dug into the franka_gripper_node.cpp code and i noticed that the effort is hardcoded to 0.

  ros::Publisher gripper_state_publisher =
      node_handle.advertise<sensor_msgs::JointState>("joint_states", 1);
  ros::AsyncSpinner spinner(2);
  spinner.start();
  ros::Rate rate(publish_rate);
  while (ros::ok()) {
    if (gripper_state_mutex.try_lock()) {
      sensor_msgs::JointState joint_states;
      joint_states.header.stamp = ros::Time::now();
      joint_states.name.push_back(joint_names[0]);
      joint_states.name.push_back(joint_names[1]);
      joint_states.position.push_back(gripper_state.width * 0.5);
      joint_states.position.push_back(gripper_state.width * 0.5);
      joint_states.velocity.push_back(0.0);
      joint_states.velocity.push_back(0.0);
      joint_states.effort.push_back(0.0); //these lines
      joint_states.effort.push_back(0.0); //these lines
      gripper_state_publisher.publish(joint_states);
      gripper_state_mutex.unlock();
    }
    rate.sleep();
  }

https://github.com/frankaemika/franka_ros/blob/c11f000c2737acc22ed8dfeff40555b2644a4294/franka_gripper/src/franka_gripper_node.cpp#L174-L195

Upon further inspection of LibFranka's GripperState struct i've noticed it doesn't even have an effort attribute. Is there any way to get live effort feedback from the gripper?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions