Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
28fb6b29
Commit
28fb6b29
authored
2 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Fix orientational part of Jacobian
parent
9ef5f95a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
VirtualRobot/Nodes/HemisphereJoint/Maths.cpp
+16
-15
16 additions, 15 deletions
VirtualRobot/Nodes/HemisphereJoint/Maths.cpp
with
16 additions
and
15 deletions
VirtualRobot/Nodes/HemisphereJoint/Maths.cpp
+
16
−
15
View file @
28fb6b29
...
...
@@ -92,21 +92,22 @@ namespace VirtualRobot::hemisphere
{
const
Eigen
::
Vector3d
eefStateTrans
=
getEndEffectorTranslation
();
// Assume we move with (+1, +1) - this should cancel out.
const
Eigen
::
Vector2d
actuatorVel
=
Eigen
::
Vector2d
::
Ones
();
const
Eigen
::
Vector3d
eefVelTrans
=
jacobian
.
block
<
3
,
2
>
(
0
,
0
)
*
actuatorVel
;
/*
* The rotation axis is orthogonal to the vector from origin to the
* EEF (eefStateTrans) and the movement direction (eefVelTrans).
*
* For the scaling, ask Cornelius. :)
*/
const
Eigen
::
Vector3d
scaledRotAxis
=
eefStateTrans
.
cross
(
eefVelTrans
)
/
eefStateTrans
.
norm
()
*
2
;
jacobian
.
block
<
3
,
1
>
(
3
,
0
)
=
scaledRotAxis
/
actuatorVel
(
0
);
jacobian
.
block
<
3
,
1
>
(
3
,
1
)
=
scaledRotAxis
/
actuatorVel
(
1
);
for
(
int
column
=
0
;
column
<
2
;
++
column
)
{
// Imagine we apply (+1, 0) / (0, +1) actuator velocities.
const
Eigen
::
Vector3d
eefVelTrans
=
jacobian
.
block
<
3
,
1
>
(
0
,
column
);
// * 1.0
/*
* The rotation axis is orthogonal to the vector from origin to the
* EEF (eefStateTrans) and the movement direction (eefVelTrans).
*
* For the scaling, ask Cornelius. :)
*/
const
Eigen
::
Vector3d
scaledRotAxis
=
eefStateTrans
.
cross
(
eefVelTrans
)
/
eefStateTrans
.
norm
()
*
2
;
jacobian
.
block
<
3
,
1
>
(
3
,
column
)
=
scaledRotAxis
;
// / 1.0;
}
}
return
jacobian
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment