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
bc0c0732
Commit
bc0c0732
authored
9 years ago
by
Simon Ottenhaus
Browse files
Options
Downloads
Patches
Plain Diff
Pose convenience functions
parent
9fb96c16
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
source/RobotAPI/libraries/core/FramedPose.cpp
+63
-15
63 additions, 15 deletions
source/RobotAPI/libraries/core/FramedPose.cpp
source/RobotAPI/libraries/core/FramedPose.h
+8
-0
8 additions, 0 deletions
source/RobotAPI/libraries/core/FramedPose.h
with
71 additions
and
15 deletions
source/RobotAPI/libraries/core/FramedPose.cpp
+
63
−
15
View file @
bc0c0732
...
...
@@ -132,9 +132,21 @@ namespace armarx
}
FramedDirectionPtr
FramedDirection
::
toGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedDirectionPtr
newPos
=
FramedDirectionPtr
::
dynamicCast
(
this
->
clone
());
newPos
->
changeToGlobal
(
referenceRobot
);
return
newPos
;
FramedDirectionPtr
newDirection
=
FramedDirectionPtr
::
dynamicCast
(
this
->
clone
());
newDirection
->
changeToGlobal
(
referenceRobot
);
return
newDirection
;
}
Eigen
::
Vector3f
FramedDirection
::
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
{
VirtualRobot
::
RobotPtr
sharedRobot
(
new
RemoteRobot
(
referenceRobot
));
return
toGlobalEigen
(
sharedRobot
);
}
Eigen
::
Vector3f
FramedDirection
::
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedDirection
newDirection
(
toEigen
(),
frame
,
agent
);
newDirection
.
changeToGlobal
(
referenceRobot
);
return
newDirection
.
toEigen
();
}
FramedDirectionPtr
FramedDirection
::
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
...
...
@@ -144,9 +156,9 @@ namespace armarx
}
FramedDirectionPtr
FramedDirection
::
toRootFrame
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedDirectionPtr
newDir
=
FramedDirectionPtr
::
dynamicCast
(
this
->
clone
());
newDir
->
changeFrame
(
referenceRobot
,
referenceRobot
->
getRootNode
()
->
getName
());
return
newDir
;
FramedDirectionPtr
newDir
ection
=
FramedDirectionPtr
::
dynamicCast
(
this
->
clone
());
newDir
ection
->
changeFrame
(
referenceRobot
,
referenceRobot
->
getRootNode
()
->
getName
());
return
newDir
ection
;
}
Eigen
::
Vector3f
FramedDirection
::
toRootEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
...
...
@@ -156,9 +168,9 @@ namespace armarx
}
Eigen
::
Vector3f
FramedDirection
::
toRootEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedDirection
newDir
(
toEigen
(),
frame
,
agent
);
newDir
.
changeFrame
(
referenceRobot
,
referenceRobot
->
getRootNode
()
->
getName
());
return
newDir
.
toEigen
();
FramedDirection
newDir
ection
(
toEigen
(),
frame
,
agent
);
newDir
ection
.
changeFrame
(
referenceRobot
,
referenceRobot
->
getRootNode
()
->
getName
());
return
newDir
ection
.
toEigen
();
}
string
FramedDirection
::
output
(
const
Ice
::
Current
&
c
)
const
...
...
@@ -351,6 +363,18 @@ namespace armarx
return
newPose
;
}
Eigen
::
Matrix4f
FramedPose
::
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
{
VirtualRobot
::
RobotPtr
sharedRobot
(
new
RemoteRobot
(
referenceRobot
));
return
toGlobalEigen
(
sharedRobot
);
}
Eigen
::
Matrix4f
FramedPose
::
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedPose
newPose
(
toEigen
(),
frame
,
agent
);
newPose
.
changeToGlobal
(
referenceRobot
);
return
newPose
.
toEigen
();
}
FramedPosePtr
FramedPose
::
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
{
VirtualRobot
::
RobotPtr
sharedRobot
(
new
RemoteRobot
(
referenceRobot
));
...
...
@@ -531,9 +555,21 @@ namespace armarx
}
FramedPositionPtr
FramedPosition
::
toGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedPositionPtr
newPos
=
FramedPositionPtr
::
dynamicCast
(
this
->
clone
());
newPos
->
changeToGlobal
(
referenceRobot
);
return
newPos
;
FramedPositionPtr
newPosition
=
FramedPositionPtr
::
dynamicCast
(
this
->
clone
());
newPosition
->
changeToGlobal
(
referenceRobot
);
return
newPosition
;
}
Eigen
::
Vector3f
FramedPosition
::
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
{
VirtualRobot
::
RobotPtr
sharedRobot
(
new
RemoteRobot
(
referenceRobot
));
return
toGlobalEigen
(
sharedRobot
);
}
Eigen
::
Vector3f
FramedPosition
::
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedPosition
newPosition
(
toEigen
(),
frame
,
agent
);
newPosition
.
changeToGlobal
(
referenceRobot
);
return
newPosition
.
toEigen
();
}
FramedPositionPtr
FramedPosition
::
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
...
...
@@ -716,9 +752,21 @@ namespace armarx
}
FramedOrientationPtr
FramedOrientation
::
toGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedOrientationPtr
newPos
=
FramedOrientationPtr
::
dynamicCast
(
this
->
clone
());
newPos
->
changeToGlobal
(
referenceRobot
);
return
newPos
;
FramedOrientationPtr
newOrientation
=
FramedOrientationPtr
::
dynamicCast
(
this
->
clone
());
newOrientation
->
changeToGlobal
(
referenceRobot
);
return
newOrientation
;
}
Eigen
::
Matrix3f
FramedOrientation
::
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
{
VirtualRobot
::
RobotPtr
sharedRobot
(
new
RemoteRobot
(
referenceRobot
));
return
toGlobalEigen
(
sharedRobot
);
}
Eigen
::
Matrix3f
FramedOrientation
::
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
{
FramedOrientation
newOrientation
(
toEigen
(),
frame
,
agent
);
newOrientation
.
changeToGlobal
(
referenceRobot
);
return
newOrientation
.
toEigen
();
}
FramedOrientationPtr
FramedOrientation
::
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/core/FramedPose.h
+
8
−
0
View file @
bc0c0732
...
...
@@ -94,6 +94,8 @@ namespace armarx
void
changeToGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
);
FramedDirectionPtr
toGlobal
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedDirectionPtr
toGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Vector3f
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
Eigen
::
Vector3f
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
FramedDirectionPtr
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedDirectionPtr
toRootFrame
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Vector3f
toRootEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
...
...
@@ -158,6 +160,8 @@ namespace armarx
void
changeToGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
);
FramedPositionPtr
toGlobal
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedPositionPtr
toGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Vector3f
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
Eigen
::
Vector3f
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
FramedPositionPtr
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedPositionPtr
toRootFrame
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Vector3f
toRootEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
...
...
@@ -239,6 +243,8 @@ namespace armarx
void
changeToGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
);
FramedOrientationPtr
toGlobal
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedOrientationPtr
toGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Matrix3f
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
Eigen
::
Matrix3f
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
FramedOrientationPtr
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedOrientationPtr
toRootFrame
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Matrix3f
toRootEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
...
...
@@ -308,6 +314,8 @@ namespace armarx
void
changeToGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
);
FramedPosePtr
toGlobal
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedPosePtr
toGlobal
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Matrix4f
toGlobalEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
Eigen
::
Matrix4f
toGlobalEigen
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
FramedPosePtr
toRootFrame
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
FramedPosePtr
toRootFrame
(
const
VirtualRobot
::
RobotPtr
&
referenceRobot
)
const
;
Eigen
::
Matrix4f
toRootEigen
(
const
SharedRobotInterfacePrx
&
referenceRobot
)
const
;
...
...
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