-
Notifications
You must be signed in to change notification settings - Fork 38
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
Implement TaskSpaceInverseDynamics interface #279
Conversation
Co-authored-by: Ines <ines.sorrentino@iit.it>
Co-authored-by: Ines <ines.sorrentino@iit.it>
1ed78b3
to
af1bbf3
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 a typo
}; | ||
|
||
/** | ||
* TaskSpaceInverseDynamics implements the interface for the task sapce inverse |
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.
* TaskSpaceInverseDynamics implements the interface for the task sapce inverse | |
* TaskSpaceInverseDynamics implements the interface for the task space inverse |
The only problem would be the possibility to get the linear and angular part. Maybe extending |
|
Yes, I think those would risk to be quite error prone, even not extending |
|
technically a co-tangent. |
Yes you're right but manif does not define cotangent vector. 😢 |
Otherwise |
I think we are too centered around Eigen objects. A wrench could part of a set of optimization variables, so it is better to be consistent across the library. |
I think that for the time being we can stay simple, and use, as @traversaro suggested, some helper functions to "view" the linear and angular part given a 6D vector. |
The take home message is: the assumption "the first 3 elements are the linear part" is error-prone, and we want to remove that assumption. Internally we can still use a 6D vector though. |
A possible solution is to define (i don't know where) this class See: http://eigen.tuxfamily.org/dox-3.2/TopicCustomizingEigen.html class Wrench : public Eigen::Vector6d
{
public:
Wrench(void):Eigen::Vector6d() {}
typedef Eigen::Vector6d Base;
// This constructor allows you to construct Wrench from Eigen expressions
template<typename OtherDerived>
Wrench(const Eigen::MatrixBase<OtherDerived>& other)
: Eigen::Vector6d(other)
{ }
// This method allows you to assign Eigen expressions to MyVectorType
template<typename OtherDerived>
Wrench & operator= (const Eigen::MatrixBase <OtherDerived>& other)
{
this->Base::operator=(other);
return *this;
}
Eigen::Block<Wrench, 3, 1>
force()
{
return this->Base::head<3>();
}
Eigen::Block<Wrench, 3, 1> torque()
{
return this->Base::tail<3>();
}
}; |
|
Hi all, I implement the Wrench class in the Math component. I also defined two operators that can be used to rotate/transform a wrench using manif objects. I also introduced in @isorrentino, @S-Dafarra @prashanthr05 and/or @traversaro could you please review the PR again? |
Before merging I should
Furthermore this PR add manif as dependencies of Math. I don’t know if this is a problem. |
I don't think this is a problem, manif is already an almost compulsory dependency. |
There are actually two possible solutions:
|
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.
Minor comment.
To be honest I don't like too much APIs that may change according to a build configuration. I think that at this point, either we add |
Yet another possibility could be to create another library in |
After a discussion with @S-Dafarra, we decided to add manif as dependencies for math. So I updated the cmake 374a5c7, the readme e9b713e and the changelog eba86c7 |
This follows from #251 (comment)
Before merging we should change
ContactWrench
struct since it's not containing the value of the contact wrench.In your opinion does it make sense to store it in an
Eigen::Vector6d
?