Skip to content

Sinus relation for mimic joints #104

@mfbehrens

Description

@mfbehrens

Hello,

please tell me if this is the wrong place for this issue and where I should post it instead.

I have a robot that uses this mechanism (only 1D) to open and close a gripper.
After designing the gripper I found out, that is not (really) possible to model something like this in urdf.
(I somehow made it work by using a custom node that reads /joint_states and republishes the complex mimiced joints again. However, in my opinion this should not be the solution. Especially when using the joint_state_publisher_gui you need to provide a different urdf to it in order for it not to publish the complex mimic values with their own slider.)

Currently, mimic joint can only provide affine mappings

f(x) = mx + b

To solve my issue a sinus term would be nessesary:

f(x) = m * sin(x)

Since an extension should be backwards compatible I see the following two possibillities:

Introduce a mimic_type

<mimic joint="my_joint" type="sin" multiplier="2" offset="0" />
<!-- value = multiplier * sin(my_joint) + offset -->

Possible types are:

  • identity (default)
  • sin
  • cos
  • exp
  • square
  • cube

Notes:

  • If no value is provided it defaults to identity which is the original function (backwards compatibility)
  • something like sin(2x) would be possible using another mimic joint that multiplies the original value by 2; the second joint would mimic this joint
  • something like sin(x) + x^2 should be possible by using two mimic joints that are connected via a link

Introduce more multiplies for other functions

<mimic joint="my_joint" multiplier="0"  multiplier_sin="2" multiplier_cos="2" offset="0" />
<!-- value = multiplier * my_joint + multiplier_sin * sin(my_joint) + multiplier_cos * cos(my_joint) + offset -->

Notes:

  • Sums can be implemented natively
  • Introduces a lot of keys (probably not wanted)

I personally think my first suggestion is cleaner, but I am also open to completely new ideas.
There is certainly better naming than the terms I just came up with.
I just hope it will be possible to implement such a robot in the 2027 release of ROS2.

Cheers,
Michael

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions