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
Lennard Hofmann
RobotAPI
Commits
67aa1caa
Commit
67aa1caa
authored
8 years ago
by
Lukas Kaul
Browse files
Options
Downloads
Patches
Plain Diff
RobotStateComponent: Fixed segfault in reportJointAngles
parent
ebb90003
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/components/RobotState/RobotStateComponent.cpp
+8
-10
8 additions, 10 deletions
...ce/RobotAPI/components/RobotState/RobotStateComponent.cpp
with
8 additions
and
10 deletions
source/RobotAPI/components/RobotState/RobotStateComponent.cpp
+
8
−
10
View file @
67aa1caa
...
...
@@ -253,7 +253,7 @@ namespace armarx
float
influenceNext
=
1.0
f
-
(
float
)(
it
->
first
-
time
)
/
deltaT
;
float
influencePrev
=
1.0
f
-
(
float
)(
time
-
prevIt
->
first
)
/
deltaT
;
auto
jointIt
=
prevIt
->
second
.
jointMap
.
begin
();
for
(
auto
&
joint
:
config
.
jointMap
)
for
(
auto
&
joint
:
config
.
jointMap
)
{
joint
.
second
=
joint
.
second
*
influenceNext
+
jointIt
->
second
*
influencePrev
;
jointIt
++
;
...
...
@@ -279,11 +279,11 @@ namespace armarx
void
RobotStateComponent
::
reportJointAngles
(
const
NameValueMap
&
jointAngles
,
Ice
::
Long
timestamp
,
bool
aValueChanged
,
const
Current
&
c
)
{
// IceUtil::Time start = IceUtil::Time::now();
if
(
timestamp
<=
0
)
{
timestamp
=
IceUtil
::
Time
::
now
().
toMicroSeconds
();
}
if
(
aValueChanged
)
{
{
...
...
@@ -311,18 +311,16 @@ namespace armarx
_sharedRobotServant
->
setTimestamp
(
IceUtil
::
Time
::
microSeconds
(
timestamp
));
}
history
[
timestamp
]
=
{
timestamp
,
new
FramedPose
(
_synchronized
->
getGlobalPose
(),
GlobalFrame
,
""
),
jointAngles
};
RobotStateConfig
config
;
config
.
timestamp
=
timestamp
;
config
.
globalPose
=
new
FramedPose
(
_synchronized
->
getGlobalPose
(),
GlobalFrame
,
""
);
config
.
jointMap
=
jointAngles
;
history
[
timestamp
]
=
config
;
if
(
history
.
size
()
>
historyLength
)
{
history
.
erase
(
history
.
begin
());
}
// ARMARX_VERBOSE << deactivateSpam(2) << "my duration: " << (IceUtil::Time::now() - start).toMicroSecondsDouble() << " ms";
}
std
::
string
RobotStateComponent
::
getRobotFilename
(
const
Ice
::
Current
&
)
const
...
...
@@ -341,7 +339,7 @@ namespace armarx
auto
packages
=
armarx
::
Application
::
GetProjectDependencies
();
packages
.
push_back
(
Application
::
GetProjectName
());
for
(
const
std
::
string
&
projectName
:
packages
)
for
(
const
std
::
string
&
projectName
:
packages
)
{
if
(
projectName
.
empty
())
{
...
...
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