flexiv_rdk icon indicating copy to clipboard operation
flexiv_rdk copied to clipboard

[FEATURE] setJointStiffness()

Open acf986 opened this issue 2 years ago • 9 comments

Is your feature request related to a problem? Please describe. Would like to introduce some mechanical compliance during the joint control mode.

Describe the solution you'd like Add a setJointStiffness() API similarly to the current setCartesianStiffness()

Describe alternatives you've considered NA

Additional context NA

acf986 avatar Oct 06 '23 15:10 acf986

@acf986 Joint position control is purely rigid joint control and cannot set stiffness. Joint torque control is using flexible joint, the stiffness can be changed to whatever values per your own joint impedance control implementation. For how to implement a joint impedance controller, please see https://github.com/flexivrobotics/flexiv_rdk/blob/main/example/intermediate2_realtime_joint_torque_control.cpp.

Simply change k_impedanceKp and k_impedanceKd to tailor the joint impedance behavior to your need.

pzhu-flexiv avatar Oct 07 '23 01:10 pzhu-flexiv

@pzhu-flexiv Thanks very much for your fast response. The example given above requires a realtime loop to control the robot arm through the streamJointTorque() interface. However, in many situations of a service industry, it is also nice to have access to a joint impedance controller through a non-realtime method (like sendJointPosition()).

acf986 avatar Oct 07 '23 03:10 acf986

@acf986 I see, I will talk to our product team to evaluate this feature. Thanks for the bringing it up.

pzhu-flexiv avatar Oct 07 '23 17:10 pzhu-flexiv

@pzhu-flexiv, even in RealTime mode, it would be very helpful to have a joint compliance mode that does not use the torque streaming interface. Because when streaming torque command, the stability of the controller is easily affected by the communication delay. However, if we stream a joint angle command instead of the torque command (in other words, the joint space close loop control is done inside the QNX computer), the stability will be less affected by the delay.

acf986 avatar Nov 09 '23 15:11 acf986

@acf986 The introduction of this new control mode is confirmed to be included in release v1.4, which should happen in June.

pzhu-flexiv avatar Mar 13 '24 15:03 pzhu-flexiv

@pzhu-flexiv Will this also be available as a primitive? So we can perform different joint stiffness level in primitive commands like MoveJComp ?

smeng9 avatar Apr 18 '24 02:04 smeng9

@smeng9 For now there's no plan for a joint impedance primitive. You need to use the RDK API instead.

pzhu-flexiv avatar Apr 18 '24 20:04 pzhu-flexiv

python err

the python example run into error on "import flexivsdk " using visual studio code on window pc.

gohlaysiong avatar May 07 '24 07:05 gohlaysiong

@gohlaysiong Please open a new issue report and post the complete error log.

pzhu-flexiv avatar May 09 '24 00:05 pzhu-flexiv