How can I detect that 2 solids in my model are crossed?
1 view (last 30 days)
Show older comments
Maxim Sluchak
on 7 Aug 2015
Answered: Sebastian Castro
on 7 Aug 2015
I have a model where I need to move one of solids in restrictions of other solids. For example there are 2 solids moving to each other. And I want to detect that moment, when they are crossed. When I use Transfom Sencor, I can measure only distance between 2 centers of mass, but this solids can be crossed earlier.
0 Comments
Accepted Answer
Sebastian Castro
on 7 Aug 2015
The usual thing to do is to use the Transform Sensor to get the relative translation and rotation of the two centers of mass.
Then, the rest of the calculations have to make assumptions about the shapes of the objects. For spheres, it's easiest, since it's simply the distance between centers of mass taking into account the radius. For cubes, you need to check whether you are within individual X, Y, Z limits taking into account the rotation of the cube... and so on.
In the SimMechanics Contact library file exchange entry, for example, you'll find that there are separate blocks for things like sphere-to-sphere, sphere-to-cylinder, etc. interactions. It is for the same reason as I explained above.
- Sebastian
0 Comments
More Answers (0)
See Also
Categories
Find more on Bodies in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!