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
3e7d4eff
Commit
3e7d4eff
authored
Sep 29, 2020
by
Pierre Fernbach
Browse files
[Scenario] add ContactPhase constructor with a contactModel
parent
3ff225a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/multicontact-api/bindings/python/scenario/contact-patch.hpp
View file @
3e7d4eff
...
...
@@ -19,6 +19,7 @@ template <typename ContactPatch>
struct
ContactPatchPythonVisitor
:
public
boost
::
python
::
def_visitor
<
ContactPatchPythonVisitor
<
ContactPatch
>
>
{
typedef
typename
ContactPatch
::
Scalar
Scalar
;
typedef
typename
ContactPatch
::
SE3
SE3
;
typedef
typename
ContactPatch
::
ContactModel
ContactModel
;
template
<
class
PyClass
>
void
visit
(
PyClass
&
cl
)
const
{
...
...
@@ -26,6 +27,8 @@ struct ContactPatchPythonVisitor : public boost::python::def_visitor<ContactPatc
.
def
(
bp
::
init
<
SE3
>
(
bp
::
arg
(
"placement"
),
"Init with a given placement."
))
.
def
(
bp
::
init
<
SE3
,
Scalar
>
(
bp
::
args
(
"placement"
,
"friction"
),
"Init with a given placement and friction coefficient."
))
.
def
(
bp
::
init
<
SE3
,
ContactModel
>
(
bp
::
args
(
"placement"
,
"contact_model"
),
"Init with a given placement and contact model."
))
.
def
(
bp
::
init
<
ContactPatch
>
(
bp
::
arg
(
"other"
),
"Copy contructor."
))
.
add_property
(
"placement"
,
// getter require to use "make_function" to pass the return_internal_reference policy (return ref
...
...
include/multicontact-api/scenario/contact-patch.hpp
View file @
3e7d4eff
...
...
@@ -28,6 +28,9 @@ struct ContactPatchTpl : public serialization::Serializable<ContactPatchTpl<_Sca
/// \brief Init contact patch from a given placement and a friction coefficient
ContactPatchTpl
(
const
SE3
&
placement
,
const
Scalar
mu
)
:
m_contact_model
(
mu
),
m_placement
(
placement
)
{}
/// \brief Init contact patch from a given placement and a contact model
ContactPatchTpl
(
const
SE3
&
placement
,
const
ContactModel
contact_model
)
:
m_contact_model
(
contact_model
),
m_placement
(
placement
)
{}
/// \brief Copy constructor
ContactPatchTpl
(
const
ContactPatchTpl
&
other
)
:
m_contact_model
(
other
.
m_contact_model
),
m_placement
(
other
.
m_placement
)
{}
...
...
Write
Preview
Markdown
is supported
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