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
e9632207
Commit
e9632207
authored
2 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add and use typedefs, add doc
parent
bd0c7f9c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
VirtualRobot/Nodes/HemisphereJoint/Joint.cpp
+4
-3
4 additions, 3 deletions
VirtualRobot/Nodes/HemisphereJoint/Joint.cpp
VirtualRobot/Nodes/HemisphereJoint/Joint.h
+13
-3
13 additions, 3 deletions
VirtualRobot/Nodes/HemisphereJoint/Joint.h
with
17 additions
and
6 deletions
VirtualRobot/Nodes/HemisphereJoint/Joint.cpp
+
4
−
3
View file @
e9632207
...
...
@@ -38,13 +38,13 @@ namespace VirtualRobot::hemisphere
}
void
Joint
::
computeFkOfPosition
(
const
Eigen
::
Vector2d
&
p12
)
void
Joint
::
computeFkOfPosition
(
const
ActuatorPosition
&
p12
)
{
computeFkOfPosition
(
p12
(
0
),
p12
(
1
));
}
void
Joint
::
computeFkOfAngle
(
const
Eigen
::
Vector2d
&
alpha12
)
void
Joint
::
computeFkOfAngle
(
const
ActuatorAngle
&
alpha12
)
{
computeFkOfPosition
(
angleToPosition
(
alpha12
));
}
...
...
@@ -89,7 +89,8 @@ namespace VirtualRobot::hemisphere
return
jacobian
;
}
Eigen
::
Vector2d
Joint
::
angleToPosition
(
const
Eigen
::
Vector2d
&
alpha
)
const
Joint
::
ActuatorPosition
Joint
::
angleToPosition
(
const
Joint
::
ActuatorAngle
&
alpha
)
const
{
return
lever
*
Eigen
::
sin
((
alpha
+
Eigen
::
Vector2d
::
Constant
(
theta0
)).
array
());
}
...
...
This diff is collapsed.
Click to expand it.
VirtualRobot/Nodes/HemisphereJoint/Joint.h
+
13
−
3
View file @
e9632207
...
...
@@ -8,10 +8,19 @@
namespace
VirtualRobot
::
hemisphere
{
/**
* @brief Hemisphere joint mathematics for FK and IK.
*
* This class is a wrapper about `Expressions`, which contains the actual
* math code that was generated from Python sympy expressions
* using `python/hemisphere-joint-demo/hemisphere_joint_demo/sympy_to_code.py`.
*/
class
Joint
{
public:
using
ActuatorPosition
=
Eigen
::
Vector2d
;
using
ActuatorAngle
=
Eigen
::
Vector2d
;
using
Jacobian
=
Eigen
::
Matrix
<
double
,
6
,
2
>
;
public:
...
...
@@ -23,18 +32,19 @@ namespace VirtualRobot::hemisphere
void
setConstants
(
double
lever
,
double
theta0
);
void
computeFkOfAngle
(
const
Eigen
::
Vector2d
&
alpha12
);
void
computeFkOfAngle
(
const
ActuatorAngle
&
alpha12
);
void
computeFkOfPosition
(
const
Eigen
::
Vector2d
&
p12
);
void
computeFkOfPosition
(
const
ActuatorPosition
&
p12
);
void
computeFkOfPosition
(
double
p1
,
double
p2
);
Eigen
::
Vector3d
getEndEffectorTranslation
()
const
;
Eigen
::
Matrix3d
getEndEffectorRotation
()
const
;
Eigen
::
Matrix4d
getEndEffectorTransform
()
const
;
Jacobian
getJacobian
()
const
;
Eigen
::
Vector2d
angleToPosition
(
const
Eigen
::
Vector2d
&
alpha
)
const
;
ActuatorPosition
angleToPosition
(
const
ActuatorAngle
&
alpha
)
const
;
public:
...
...
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