Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
parametric-curves
Commits
29f71eda
Commit
29f71eda
authored
Dec 13, 2019
by
Guilhem Saurel
Browse files
Format
parent
c33aaf14
Pipeline
#8275
passed with stage
in 6 minutes and 31 seconds
Changes
1
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
include/parametric-curves/text-file.hpp
View file @
29f71eda
...
...
@@ -55,31 +55,24 @@ struct TextFile : public AbstractCurve<Numeric, Point> {
public:
virtual
bool
loadTextFile
(
const
std
::
string
&
fileName
)
{
Eigen
::
MatrixXd
data
=
parametriccurves
::
utils
::
readMatrixFromFile
(
fileName
);
if
(
data
.
cols
()
==
size
)
{
std
::
cout
<<
"Setting derivatives to zero"
<<
std
::
endl
;
if
(
data
.
cols
()
==
size
)
{
std
::
cout
<<
"Setting derivatives to zero"
<<
std
::
endl
;
posValues
=
data
;
velValues
.
setZero
(
size
);
accValues
.
setZero
(
size
);
}
else
if
(
data
.
cols
()
==
2
*
size
)
{
}
else
if
(
data
.
cols
()
==
2
*
size
)
{
posValues
=
data
.
leftCols
(
size
);
velValues
=
data
.
rightCols
(
size
);
accValues
=
accValues
.
setZero
(
size
);
}
else
if
(
data
.
cols
()
==
3
*
size
)
{
}
else
if
(
data
.
cols
()
==
3
*
size
)
{
posValues
=
data
.
leftCols
(
size
);
velValues
=
data
.
middleCols
(
size
,
size
);
velValues
=
data
.
middleCols
(
size
,
size
);
accValues
=
data
.
rightCols
(
size
);
}
else
{
std
::
cout
<<
"Unexpected number of columns (expected "
<<
3
*
size
<<
", found "
<<
data
.
cols
()
<<
")
\n
"
;
}
else
{
std
::
cout
<<
"Unexpected number of columns (expected "
<<
3
*
size
<<
", found "
<<
data
.
cols
()
<<
")
\n
"
;
return
false
;
}
this
->
t_max
=
timeStep
*
(
double
)
data
.
rows
();
this
->
t_max
=
timeStep
*
(
double
)
data
.
rows
();
this
->
t_min
=
0.0
;
x_init
=
posValues
.
row
(
0
);
return
true
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment