Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
8eb05a3c
There was a problem fetching the pipeline summary.
Commit
8eb05a3c
authored
6 years ago
by
armar6-user
Browse files
Options
Downloads
Patches
Plain Diff
added getPositionDiff and getOrientationDiff
parent
18e38b66
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/core/CartesianPositionController.cpp
+16
-0
16 additions, 0 deletions
...e/RobotAPI/libraries/core/CartesianPositionController.cpp
source/RobotAPI/libraries/core/CartesianPositionController.h
+2
-0
2 additions, 0 deletions
source/RobotAPI/libraries/core/CartesianPositionController.h
with
18 additions
and
0 deletions
source/RobotAPI/libraries/core/CartesianPositionController.cpp
+
16
−
0
View file @
8eb05a3c
...
...
@@ -83,3 +83,19 @@ float CartesianPositionController::getOrientationError(const Eigen::Matrix4f& ta
Eigen
::
AngleAxisf
aa
(
oriDir
);
return
aa
.
angle
();
}
Eigen
::
Vector3f
CartesianPositionController
::
getPositionDiff
(
const
Eigen
::
Matrix4f
&
targetPose
)
{
Eigen
::
Vector3f
targetPos
=
targetPose
.
block
<
3
,
1
>
(
0
,
3
);
return
targetPos
-
tcp
->
getPositionInRootFrame
();
}
Eigen
::
Vector3f
CartesianPositionController
::
getOrientationDiff
(
const
Eigen
::
Matrix4f
&
targetPose
)
{
Eigen
::
Matrix3f
targetOri
=
targetPose
.
block
<
3
,
3
>
(
0
,
0
);
Eigen
::
Matrix3f
tcpOri
=
tcp
->
getPoseInRootFrame
().
block
<
3
,
3
>
(
0
,
0
);
Eigen
::
Matrix3f
oriDir
=
targetOri
*
tcpOri
.
inverse
();
Eigen
::
AngleAxisf
aa
(
oriDir
);
return
aa
.
axis
()
*
aa
.
angle
();
}
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/core/CartesianPositionController.h
+
2
−
0
View file @
8eb05a3c
...
...
@@ -45,6 +45,8 @@ namespace armarx
float
getPositionError
(
const
Eigen
::
Matrix4f
&
targetPose
);
float
getOrientationError
(
const
Eigen
::
Matrix4f
&
targetPose
);
Eigen
::
Vector3f
getPositionDiff
(
const
Eigen
::
Matrix4f
&
targetPose
);
Eigen
::
Vector3f
getOrientationDiff
(
const
Eigen
::
Matrix4f
&
targetPose
);
//CartesianVelocityController velocityController;
float
KpPos
=
1
;
...
...
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