frankaemika / franka_ros2

ROS 2 integration for Franka research robots
https://frankaemika.github.io/docs/franka_ros2.html
Apache License 2.0
100 stars 68 forks source link

Franka Kinematics at Controller Level #63

Open jcarpinelli-bdai opened 5 months ago

jcarpinelli-bdai commented 5 months ago

Today, the FrankaRobotModel class provides users forward kinematics utility functions which operate at the hardware level. This works when used in ROS 2 controllers which accept true Franka hardware, but does not work for simulated Franka arms. Is there some way to compute Franka kinematics using user-provided positions? I would be interested in helping to contribute this, if not.

BarisYazici commented 2 months ago

Yes currently for the gazebo simulator FrankaRobotModel and FrankaState interfaces are not available. However with Gazebo, you get joint_states(joint_positions, joint_velocities, joint_efforts). Based on these values you could calculate the M,C and G using either KDL or Pinocchio. For the Jacobians you could probably also use the same tools. Here is an example how we calculate the gravity term for the Gazebo simulation in KDL -> https://github.com/frankaemika/franka_ros2/blob/humble/franka_gazebo/franka_ign_ros2_control/src/model_kdl.cpp. We will support FrankaRobotModel and FrankaState for Gazebo simulation, but the timeline is not clear. You are free to contribute. But currently the supervision from our side could be limited.