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
73c85127
Commit
73c85127
authored
6 years ago
by
Mirko Wächter
Browse files
Options
Downloads
Patches
Plain Diff
trajectory: added time shift test
parent
f232daf1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/core/test/TrajectoryTest.cpp
+13
-0
13 additions, 0 deletions
source/RobotAPI/libraries/core/test/TrajectoryTest.cpp
with
13 additions
and
0 deletions
source/RobotAPI/libraries/core/test/TrajectoryTest.cpp
+
13
−
0
View file @
73c85127
...
...
@@ -319,4 +319,17 @@ BOOST_AUTO_TEST_CASE(TrajectoryControllerUnfoldingTest)
}
BOOST_AUTO_TEST_CASE
(
TrajectoryShiftTimeTest
)
{
FloatSeqSeq
positions
{{
0
,
0
,
1
},
{
0
,
1
,
1
}};
TrajectoryPtr
traj
=
new
Trajectory
(
positions
,
{},
{
"joint1"
,
"joint2"
});
ARMARX_INFO
<<
VAROUT
(
traj
->
getDimensionNames
());
auto
startTime
=
traj
->
begin
()
->
timestamp
;
auto
shift
=
2.0
;
traj
->
shiftTime
(
shift
);
ARMARX_INFO
<<
"pos: "
<<
traj
->
begin
()
->
getPosition
(
0
);
BOOST_CHECK_LE
(
std
::
abs
(
startTime
+
shift
-
traj
->
begin
()
->
timestamp
),
0.0001
);
ARMARX_INFO
<<
VAROUT
(
traj
->
getDimensionNames
());
BOOST_CHECK_EQUAL
(
traj
->
getDimensionNames
().
at
(
0
),
"joint1"
);
}
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