-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change linear friction cone to ice cream cone #238
Change linear friction cone to ice cream cone #238
Conversation
a1a4f0f
to
b9eb358
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some questions
include/aligator/modelling/multibody/multibody-friction-cone.hpp
Outdated
Show resolved
Hide resolved
include/aligator/modelling/multibody/multibody-friction-cone.hxx
Outdated
Show resolved
Hide resolved
@@ -51,7 +51,7 @@ void exposeContactForce() { | |||
.def(bp::init<int, PinModel, const context::MatrixXs &, | |||
const RigidConstraintModelVector &, | |||
const pinocchio::ProximalSettingsTpl<Scalar> &, | |||
const context::Vector6s &, const std::string &>(bp::args( | |||
const context::VectorXs &, const std::string &>(bp::args( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this context, the reference force can be a 3D or 6D vector, depending on the type of contact. The bindings were not covering the 3D case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so in this case, since at most it can be of dimension six, you could use the Eigen::Matrix
template with maximum number of rows at compile time set to 6, in both the binding code and the actual C++ class:
using Vector3or6 = Eigen::Matrix<Scalar, -1, 1, 6>;
The fourth template parameter is known in Eigen as MaxRowsAtCompileTime
.
This allows us to avoid an unnecessary heap allocation in this case.
8aca851
to
bf5b70c
Compare
bf5b70c
to
e080d61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
superb work
No description provided.