#8 Basic Self-balancing towards torque (part 4 - NEW contact library)
- Aurel

- Mar 4, 2022
- 2 min read
After previously having sent an email to those at MathWorks, I have received a response back.
They have responded to me that in fact that library which I was using "Contact forces library" was not anymore in use and that there was a better functional replacement, made directly by them, and which is implemented directly into the Multibody as blocks, named "Spatial Contact Forces".
I have then proceeded to read more about it on their own website at: https://uk.mathworks.com/help/physmod/sm/ref/spatialcontactforce.html
Before implementing it into my own environment, I have decided to do a quick test, and built a wheel and a plane which is 10 Deg inclined. This was simply to have a good unerstanding of the block before implementing it.
The way it works is that this block must be connecting 2 other blocks which will come into contact with each other: the "base" which is the plane, and the "follower" which in this case is the rolling wheel.

Inside the block, I was able to select also the "Normal force" and "Frictional Force", meaning that its respective values were open to modification if I needed to change the visualised physics an behavior of the robot when it comes in contact with the floor plane (these values were left as default):

The rolling wheel is at a distance above the plane, (and 10 cm above the world frame, which in the video is the set of axis located right below the wheel) and when the simulation starts the wheel, attracted by gravity, falls naturally down and when comes into contact with the plane, it will roll over in a realistic way, confirming that the physics and contacts applied are correct:
After seeing that it was successfully behaving in a desired way, I could now try to implement that into my own system.



Comments