-
Notifications
You must be signed in to change notification settings - Fork 50
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
Get Body Pose Relative to another Body #43
Comments
The implementation is very easy: using namespace rbd;
sva::PTransformd relativeTransform(const MultiBody & mb, const MultiBodyConfig & mbc,
const std::string & object, const std::string & relativeTo)
{
// X_rel_o = X_0_o * X_rel_0
return mbc.bodyPosW[mb.bodyIndexByName(object)] *
mbc.bodyPosW[mb.bodyIndexByName(relativeTo)].inv();
} I'm not convinced this is a complex enough operation that we'd want it in the library. Also, that V-REP function works regardless of the kinematic tree where the object here whereas that simple RBDyn implementation expects both objects to exist in the same tree. This can be easily improved though but that's left as an exercice ;) |
I agree with @gergondet , the general problem solved by ROS' |
Why would an operation being simple preclude it from being included in a library? For example, std::copy or std::back_inserter are each pretty simple while simultaneously being worthwhile. I expect I'll be using relativeTransform quite a bit myself. Do you mind if I submit a PR?
I assume you mean adding breadth first search?
It is best if I don't add ROS as a dependency at the moment, it is a pretty substantial dependency that is difficult to install considering I use more up to date libraries, and it has limitations on some platforms like windows.
Just to confirm every rbdyn configuration has a world frame? Thanks for getting back to me on my questions! |
How hard would it be to implement a function like the following?
In V-REP I often use a function just like the above to get the transform from the frame of any object to any other. I'd love to have an equivalent of RBDyn, do you think this might be easy to implement?
Here is the equivalent V-REP function I use grl.getTransformBetweenHandles:
The text was updated successfully, but these errors were encountered: