frankaemika / franka_ros

ROS integration for Franka research robots
https://frankaemika.github.io
Apache License 2.0
364 stars 313 forks source link

How to use internal joint impedance controller #283

Closed vonHartz closed 1 year ago

vonHartz commented 2 years ago

Hello,

I want to teleoperate my panda arm from a python script.

So far, I did so successfully using the example cartesian impedance controller. Yet, I am not perfectly happy with the movement it creates, instead I would like it to exactly follow the inputs. Hence, I've considered the joint impedance controller.

According to https://frankaemika.github.io/docs/libfranka.html it should be possible to use the internal joint impedance controller with a cartesian pose as motion generator.

Yet, when I launch it using the following config

 franka_state_controller:
  type: franka_control/FrankaStateController
  publish_rate: 50  # [Hz]
  joint_names:
    - panda_joint1
    - panda_joint2
    - panda_joint3
    - panda_joint4
    - panda_joint5
    - panda_joint6
    - panda_joint7
  arm_id: panda
  internal_controller: joint_impedance

all the available topics relevant to the controller seem to be /franka_state_controller/F_ext , /franka_state_controller/franka_states, /franka_state_controller/joint_states, /franka_state_controller/joint_states_desired.

Thus my question, how is it possible to provide the joint impedance controller with a cartesian pose as input (analogous to providing the equilibrium pose to the example cartesian impedance controller)?

Thanks in advance and kind regards, Jan

Maverobot commented 1 year ago

Hi,

I hope this answer can still be somehow helpful.

how is it possible to provide the joint impedance controller with a cartesian pose as input

For that you might need to implement your own analytical IK to compute the corresponding joint equilibrium configuration, which is then used as the desired joint configuration by the joint impedance controller.