Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
loco-3d
Multicontact-api
Commits
41e0750d
Commit
41e0750d
authored
Jan 30, 2020
by
Pierre Fernbach
Browse files
[C++] haveAMValues do not require the values to be different from 0 anymore
parent
fc2dbb74
Changes
1
Show whitespace changes
Inline
Side-by-side
include/multicontact-api/scenario/contact-sequence.hpp
View file @
41e0750d
...
...
@@ -326,30 +326,16 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
* @return
*/
bool
haveAMvalues
()
const
{
if
(
m_contact_phases
.
front
().
m_L_init
.
isZero
()){
std
::
cout
<<
"Initial AM value not defined."
<<
std
::
endl
;
return
false
;
}
for
(
size_t
i
=
1
;
i
<
m_contact_phases
.
size
()
;
++
i
){
if
(
m_contact_phases
.
at
(
i
).
m_L_init
.
isZero
()){
std
::
cout
<<
"Intermediate AM value not defined for phase : "
<<
i
<<
std
::
endl
;
return
false
;
}
if
(
m_contact_phases
.
at
(
i
).
m_L_init
!=
m_contact_phases
.
at
(
i
-
1
).
m_L_final
){
std
::
cout
<<
"Init AM value do not match final value of previous phase for id : "
<<
i
<<
std
::
endl
;
return
false
;
}
if
(
!
m_contact_phases
.
at
(
i
).
m_dL_init
.
isZero
()){
if
(
m_contact_phases
.
at
(
i
).
m_dL_init
!=
m_contact_phases
.
at
(
i
-
1
).
m_dL_final
){
std
::
cout
<<
"Init AM derivative do not match final AM derivative of previous phase for id : "
<<
i
<<
std
::
endl
;
return
false
;
}
}
}
if
(
m_contact_phases
.
back
().
m_L_final
.
isZero
()){
std
::
cout
<<
"Final AM value not defined."
<<
std
::
endl
;
return
false
;
}
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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