Make getJacobian simpler and faster#2389
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2389 +/- ##
==========================================
+ Coverage 50.74% 50.77% +0.03%
==========================================
Files 386 386
Lines 31971 31972 +1
==========================================
+ Hits 16221 16230 +9
+ Misses 15750 15742 -8
☔ View full report in Codecov by Sentry. |
sjahr
left a comment
There was a problem hiding this comment.
Do you mind adding some comments in front of the main blocks to explain what is happening there? I think that will help maintaining this in the future
|
Thanks for the reviews. |
Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com>
* Make getJacobian simpler and faster * readability and const-correctness * fix issue when joint group is not at URDF origin * Update moveit_core/robot_state/src/robot_state.cpp
Description
This change makes
getJacobiana little bit more readable (hopefully!), while also making it 2x faster, by removing string comparisons where possible and other little optimizations.The jacobian benchmark shows a ~2x improvement with respect to HEAD (>500ns), and ~4x with respect to the KDL Jacobian, for the panda robot:
The recently added Jacobian tests for the different types of joints are also passing.
Also manually tested this with Servo, which I know uses the MoveIt! Jacobian.
Note:
a_pose_bis a notation I have used in the past to denote a transformation matrix to convert points inbto points ina, e.g:point_a = a_pose_b * point_b. Not sure if there's another established notation if MoveIt!. Happy to change to whatever makes more sense.Checklist