Hello Sherm,
In the past, I had to deal with a special system requiring a MobilizedBody::Custom. In particular, the rotation of the body is a function of the generalized coordinates. Let's say, for example, that the mobilizer has 3 generalized coordinates (x,y,z) representing a 3D translation, and that the body rotation is a function of these, let's write Rotation=f(x,y,z).
I first tried finding scalar functions for each Euler angle (unwrapped to avoid jumps) and use a MobilizedBody::FunctionBased, but the rotation of the body can be any, so the interpolator was not good near singularities. Instead, I created a MobilizedBody::Custom, where f(x,y,z) actually defines a rotation matrix. That worked very well, but I am wondering if there is a "native" way of doing this with the supplied mobilized bodies, ideally without using constraints. At least, I have not found any!
Again, I am just asking out of curiosity. The ability of creating a custom mobilized body is immensely helpful.
Thank you very much for your insights!
Best regards,
Simone
MobilizedBody::Custom to off-the-shelf solution?
- Simone Hendriks
- Posts: 16
- Joined: Thu Nov 16, 2023 6:31 am
- Michael Sherman
- Posts: 812
- Joined: Fri Apr 01, 2005 6:05 pm
Re: MobilizedBody::Custom to off-the-shelf solution?
Hi, Simone.
Congratulations on getting a custom mobilizer to work -- very nice!
I think you are correct that that's the only way to implement the singularity-free behavior you want. The fact that MobilizedBody::FunctionBased assumes 3 angles for rotation dooms it. (BTW that is itself a custom mobilizer anyway). I don't see how you could do this with any of the existing joint types. There are others that couple translation and rotation (e.g. a Screw) but none that would meet your need as you described it.
I presume you're familiar with our Mobilizer paper that describes the full theory, but in case someone else is interested it can be read here.
Regards,
Sherm
Congratulations on getting a custom mobilizer to work -- very nice!
I think you are correct that that's the only way to implement the singularity-free behavior you want. The fact that MobilizedBody::FunctionBased assumes 3 angles for rotation dooms it. (BTW that is itself a custom mobilizer anyway). I don't see how you could do this with any of the existing joint types. There are others that couple translation and rotation (e.g. a Screw) but none that would meet your need as you described it.
I presume you're familiar with our Mobilizer paper that describes the full theory, but in case someone else is interested it can be read here.
Regards,
Sherm
- Simone Hendriks
- Posts: 16
- Joined: Thu Nov 16, 2023 6:31 am
Re: MobilizedBody::Custom to off-the-shelf solution?
Hi Sherm,
Thank you for the immediate response!
Yes, I am familiar with your paper. I also relied on the advanced manual.
Best regards,
Simone
Thank you for the immediate response!
Yes, I am familiar with your paper. I also relied on the advanced manual.
Best regards,
Simone