matthias-mayr / Cartesian-Impedance-Controller

A C++ implementation of Cartesian impedance control for torque-controlled manipulators with ROS bindings.
https://matthias-mayr.github.io/Cartesian-Impedance-Controller/
BSD 3-Clause "New" or "Revised" License
212 stars 32 forks source link

ROS time restrictions #12

Closed Desoforos closed 10 months ago

Desoforos commented 11 months ago

Greetings, My field of interest is robotics and developing software in ROS for impedance control. My goal is to test my code on two robots, one active robot and one passive. The active robot will try to "push" gently the passive robot, as if by mistake and then try to move accordingly so that it won't actually push it. The interesting fact here is that the parts of the robots that will be in touch are made of metal, that is the surfaces will be hard. For that reason, the computation/refresh time of the package would need to be in the order of milliseconds. My worry is that the ROS environment would not thrive on these restrictions. That's why I would like to ask you whether you have tested your package using this library (consequently and the ROS capabilities) for tests between hard surfaces and what were your time restrictions?

matthias-mayr commented 10 months ago

Great to hear about your interest in this package.

The interesting fact here is that the parts of the robots that will be in touch are made of metal, that is the surfaces will be hard. For that reason, the computation/refresh time of the package would need to be in the order of milliseconds.

When setting up the robot system, most drivers either have a hard-coded update rate (1kHz with a Franka Emika "Panda") or a configurable one (KUKA iiwa, 200-1000Hz). The controller will be called at that frequency and the connections typically get interrupted if the timing restriction is not honored.

My worry is that the ROS environment would not thrive on these restrictions. That's why I would like to ask you whether you have tested your package using this library (consequently and the ROS capabilities) for tests between hard surfaces and what were your time restrictions?

We run two iiwa robot arms at 1 kHz from a single dedicated computer with some i5 processor and the PRREMPT_RT patches installed. As said, this also means that the controllers of both arms are also called at 1kHz and finish in under 1ms. I can recommend to have a dedicated machine without a graphical user interface though. ros2_control is more targeted on realtime capabilities, but I haven't used it yet.

About the interaction: I am not sure if I ever had my arms collide with each other. However we have tasks where we interact with other rigid objects in the workspace. These interactions are fine & stable. The arms would of course have their momentum when colliding, but I do not see any other real issues. I saw demos with iiwas having slight collisions and that wasn't a problem either.

matthias-mayr commented 10 months ago

Based on your reaction, I am assuming that this is answered and I am closing it. Feel free to re-open it if there are more questions on the same topic.