-
Notifications
You must be signed in to change notification settings - Fork 8
NonLinear mimic joints #58
Description
I am working on providing a way to put a nonLinear relationship for mimic joints. With ROS standards, only mimicPos = multiplierfatherPos + offset and mimicVel = multiplierfatherVel is possible.
I added an attribute nlFunPos (bad name, proposal accepted) in the <mimic> tag like this:
<mimic joint="SFB1__SFP1_1" multiplier="1.2" offset="0.2" nlFunPos="x^2"/>- If present, multiplier and offset are not considered (in truth, "ovewritten")
- we need an hardcoded variable, so when parsing the expression we know which 'x' stand for "father position". I don't think this is a big problem
- It has any sense to have the possibility to put also a "nlFunVel" and "nlFunEff"?
Things that ROSEE uses that need to be updated
-
joint_state_publisher (fork here) which we use to propagate position of actuated joints to their mimic joints, when using rviz only. (ROSEE correctly send commands to only actuated joints, not mimic ones). Easy to do, python code
- python eval is really bad, use other thing to compute the expression
- we need to update documentation, especially indicating to cloning also our joint_state_publisher fork, and install numexpr.
sudo apt install python-numexprAlso explain syntax for expression (like use ^ for power)
October 2021 update : added this install in the rosendeffector package manager.
-
Move robot when looking for collisions. (branch nonLinear_moveit_col) For pinches, we use moveit and setRandomPosition() function, to then check for collisions.
With moveit, each time a joint pos is updated, mimic joints are updated also (with the linear standard params). There is no way to not call the updateMimic method, because of private function. So I simply solved first calling the setRandomPosition(), and then overwriting the nonLinearMimic joint position with the correct relation.
I used muparser to compute the equation, it seems nice- update doc to download muparser NOTE It can be installed auto from rosdep, so maybe doc does not need to be updated, check it
October 2021 update : prerelease tests shows that muparser is installed automagically thanks to package.xml and cmakelists.
- update doc to download muparser NOTE It can be installed auto from rosdep, so maybe doc does not need to be updated, check it
-
Gazebo Plugin (fork here)
We should need to fork the mimic joint gazebo plugin, and modify also this to consider the nonlinear relation.- update doc to download the mimi joint gazebo plugin fork
Pull request for ROSEE here #59