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
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
RobotAPI
Commits
0e77107f
Commit
0e77107f
authored
2 years ago
by
Fabian Reister
Browse files
Options
Downloads
Patches
Plain Diff
/KinematicUnitSimulation: +getDebugInfo
parent
1fe5cf25
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/components/units/KinematicUnitSimulation.cpp
+21
-1
21 additions, 1 deletion
source/RobotAPI/components/units/KinematicUnitSimulation.cpp
source/RobotAPI/components/units/KinematicUnitSimulation.h
+3
-3
3 additions, 3 deletions
source/RobotAPI/components/units/KinematicUnitSimulation.h
with
24 additions
and
4 deletions
source/RobotAPI/components/units/KinematicUnitSimulation.cpp
+
21
−
1
View file @
0e77107f
...
...
@@ -33,6 +33,7 @@
#include
<ArmarXCore/core/system/ArmarXDataPath.h>
#include
<ArmarXCore/core/time/TimeUtil.h>
#include
<ArmarXCore/core/util/algorithm.h>
#include
<RobotAPI/interface/units/KinematicUnitInterface.h>
#include
<algorithm>
...
...
@@ -472,6 +473,26 @@ Ice::StringSeq KinematicUnitSimulation::getJoints(const Ice::Current& c) const
return
getMapKeys
(
sensorAngles
);
}
DebugInfo
KinematicUnitSimulation
::
getDebugInfo
(
const
Ice
::
Current
&
c
)
const
{
std
::
lock_guard
g
{
jointStatesMutex
};
DebugInfo
debugInfo
;
for
(
const
auto
&
[
jointName
,
info
]
:
jointStates
)
{
debugInfo
.
jointAngles
[
jointName
]
=
info
.
angle
;
debugInfo
.
jointVelocities
[
jointName
]
=
info
.
velocity
;
debugInfo
.
jointMotorTemperatures
[
jointName
]
=
info
.
temperature
;
debugInfo
.
jointTorques
[
jointName
]
=
info
.
torque
;
debugInfo
.
jointModes
[
jointName
]
=
info
.
controlMode
;
};
return
debugInfo
;
}
bool
mapEntryEqualsString
(
std
::
pair
<
std
::
string
,
KinematicUnitSimulationJointState
>
iter
,
std
::
string
compareString
)
{
...
...
@@ -499,4 +520,3 @@ void KinematicUnitSimulation::releaseJoints(const Ice::StringSeq& joints, const
KinematicUnit
::
release
(
c
);
}
}
This diff is collapsed.
Click to expand it.
source/RobotAPI/components/units/KinematicUnitSimulation.h
+
3
−
3
View file @
0e77107f
...
...
@@ -160,6 +160,8 @@ namespace armarx
armarx
::
NameValueMap
getJointVelocities
(
const
Ice
::
Current
&
c
)
const
override
;
Ice
::
StringSeq
getJoints
(
const
Ice
::
Current
&
c
)
const
override
;
DebugInfo
getDebugInfo
(
const
Ice
::
Current
&
c
=
Ice
::
emptyCurrent
)
const
override
;
/// @see PropertyUser::createPropertyDefinitions()
PropertyDefinitionsPtr
createPropertyDefinitions
()
override
;
...
...
@@ -167,7 +169,7 @@ namespace armarx
KinematicUnitSimulationJointStates
jointStates
;
KinematicUnitSimulationJointStates
previousJointStates
;
KinematicUnitSimulationJointInfos
jointInfos
;
std
::
mutex
jointStatesMutex
;
mutable
std
::
mutex
jointStatesMutex
;
IceUtil
::
Time
lastExecutionTime
;
float
noise
;
int
intervalMs
;
...
...
@@ -180,7 +182,5 @@ namespace armarx
mutable
std
::
mutex
sensorDataMutex
;
NameValueMap
sensorAngles
;
NameValueMap
sensorVelocities
;
};
}
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