flexivrobotics / flexiv_rdk

RDK (robotic development kit) for Flexiv robots. Supports C++ and Python. Compatible with Linux, macOS, and Windows.
Apache License 2.0
58 stars 18 forks source link

[FEATURE] setJointStiffness() #34

Closed acf986 closed 1 month ago

acf986 commented 10 months ago

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

pzhu-flexiv commented 10 months ago

@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.

acf986 commented 10 months ago

@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()).

pzhu-flexiv commented 10 months ago

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

acf986 commented 9 months ago

@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.

pzhu-flexiv commented 5 months ago

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

smeng9 commented 4 months ago

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

pzhu-flexiv commented 4 months ago

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

gohlaysiong commented 3 months ago

python err

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

pzhu-flexiv commented 3 months ago

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