tud-phi / ros2-elastica

ROS2 package implementing Elastica
0 stars 0 forks source link

Strategy for closed-form inverse kinematics #30

Open mstoelzle opened 2 years ago

mstoelzle commented 2 years ago

https://github.com/tud-cor-sr/ros2-elastica/blob/436afc30f7909b9397da65641e277c39e012fb61/elastica_kinematics/elastica_kinematics/elastica_rod_states_to_PCC.py#L93

I am not convinced of fully relying on the rotation between the base and the tip to estimate the configuration of the segment. This strategy, can for example not capture any elongation of the segment. I would prefer to implement it analogue to what we are currently doing experimentally in our robot, which also takes into account the translation between the base and the tip.

You can use the proposed strategy in Equation (17) of the improved state parametrization paper by Cosimo. Please make sure to switch the sign of the division analogue to the blue marking in the attached screenshot.

Screenshot 2022-03-01 at 12 51 29
RUFFY-369 commented 2 years ago

In the following: L50, I've used the 4X4 matrix consisting of both the translation as well as rotation for configuration estimation of the consecutive segments. Alright, I'll try to implement the above mentioned strategy

mstoelzle commented 2 years ago

As I understand the code, the transformation method in https://github.com/tud-cor-sr/ros2-elastica/blob/436afc30f7909b9397da65641e277c39e012fb61/elastica_kinematics/elastica_kinematics/elastica_rod_states_to_PCC.py#L50 is doing forward kinematics (so using the known configuration to compute the transformation). This GitHub issue is referring to using both the translation and rotation for inverse kinematics (so using the transformation to estimate a configuration)

RUFFY-369 commented 2 years ago

but I think we planned to use the jacobian script for the inverse kinematics right?

mstoelzle commented 2 years ago

but I think we planned to use the jacobian script for the inverse kinematics right?

I think there are two kind of inverse kinematics:

  1. Transforming the elastica states into a PCC configuration: This is the most urgent, as we need to get a PCC estimate from the Elastica rod states. For that, we do not need Jacobians and can use the direct, closed-form solution as stated in this issue
  2. Task-space to configuration-space: This inverse kinematics would deal with moving the end-effector to a specific position and orientation in 3D Cartesian space and finding appropriate solutions for the shape of the robot, which can full-fill such an end-effector pose. As redundant solutions are possible, we would use the standard Jacobian-based approach for this. We do not need this at the moment (I think).
RUFFY-369 commented 2 years ago

Yeah the first which we have right now which is to be modified as you mentioned in the issue and for the second, not immediate one, the Jacobian script has already been made which can be changed later on accordingly