Why is the contact force block not working?

4 views (last 30 days)
I am trying to use the contact forces library to simulate throwing balls using a mechanical arm. First I am creating a simple model of a ball dropped onto a surface using the Simscape Contact forces library. My code is copied from the provided contace force example but it is not working. the ball simply passes through the surface and falls away into space. Can anyone see the problem? The code is attached, thanks in advance.

Answers (1)

Raunak Gupta
Raunak Gupta on 19 Feb 2020
Hi,
I have tried with the model you may have taken as reference that is after downloading the Add-on (Simscape Multibody Contact Forces Library). The example is situated at
SM_Contact_Forces_Lib\SM_Contact_Forces_Lib_R19a_v4p1\Examples\3D\Simple\Collision\ Coll3D_01_Ball_Plane_Fixed.slx
I found it to be very similar to what is attached with the question. The example is running fine as expected. Maybe you have changed the parameter so that the ball is starting in between the plane (that is intersecting the plane) that is why it is not considering the plane object. You can start with the model in the library and tweak as per required. For the model you have attached to work fine you may translate the ball in +Z direction using Rigid Transform Block such that It should not intersect with the plane.
  1 Comment
James Wooster
James Wooster on 25 Feb 2020
Hi,
I was using a more complex example, the MSRA_pnuematic robot series. Your example is easier so I'll have a look at that.
Thanks

Sign in to comment.

Categories

Find more on Simscape Multibody 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!