isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
1.84k stars 686 forks source link

[Question] details about ZMQ + FCI for real Franka #49

Closed chauvinSimon closed 1 year ago

chauvinSimon commented 1 year ago

"we use ZMQ to send joint commands from ORBIT to a computer running the real-time kernel for Franka Emika robot. To abide by the real-time safety constraints, we use a quintic interpolator to upsample the 60 Hz joint commands from the simulator to 1000 Hz for execution on the robot" (orbit paper)


This sound very efficient to overcome the impossibility to use nvidia-drivers on the PC that talks to the robot (due to the PREEMPT_RT kernel)!

I would have two series of questions (unfortunately I could not find any additional details in the documentation / paper):

  1. regarding the zmq interface:

    1. what serialization is used (maybe msgpack or protobuf)?
    2. :octocat: is the code available somewhere?
  2. regarding the computer running the RT kernel for the Franka Emika robot:

    1. it is probably using FCI via libfranka, isn't it?
    2. is the target joint position (called qc on this FCI figure) passed to a joint position motion generator, which is then processed by one of the FCI internal controllers, e.g. the joint impedance controller, as explained here? (green path on the attached image)
    3. or are the target torques (called to-d on this FCI figure) directly processed by an external controller? (purple path on the attached image)
    4. on the fig.9 the target joint position issued at 1kHz is converted to torques by a PD controller.
      1. is this PD controller the built-in one of FCI?
      2. is this PD controller also used in simulation during training (I do not think so)? And if yes are the PD parameters identical in simulation and on the real robot?
    5. :octocat: is the code available somewhere?


20230404_franka_zmq



fci

ritviksingh9 commented 1 year ago
  1. We do not use any serialisation library. At max we only sent 23 (7+16) doubles which is already a fairly compressed representation to send over machines connected on the same local network. As such there was no need serialise values.
  2. Yes, we use libfranka. We do not pass the joint position targets to one of the joint position motion generators provided by libfranka. Instead, we created our own TorqueGenerator which contains our own PD controller. This outputs joint torques that are sent to the Franka. So to answer your question, we use the purple path to create an external controller, and the PD controller is not the built-in one in the FCI, it's our own PD controller for which we spent some time tuning the gains. The PD controller is not identical to what is used in training in sim.

The real-robot code is currently not available publicly, but it is something that we are currently working on.

chauvinSimon commented 1 year ago

Thank you very much @ritviksingh9 for your detailed answer