Hi everyone,
I'm creating a simple model of a wheel rolling without slipping on an inclined plane. Initially, I was modeling the interaction between the wheel and the inclined plane as a contact problem. The wheel is modeled as a contact sphere, the platform as a half space and HuntCrossleyForce was used to model the contact forces. I was expecting that the wheel will slide without rolling when I set the coefficient of friction to zero. But actually whatever the value of the coefficient of friction, the wheel rolls in the same manner and it looks like friction doesn't affect the motion at all.
Then I changed the modelling strategy to impose a rolling on a surface constraint between the two bodies. I use MATLAB API. The thing is that I'm not able to define the constraint or declare it in my script. Whenever I define it, it give me error "Unrecognized function or variable 'RollingOnSurfaceConstraint'."
Is there any guide how to define this class? or any recommendations on modeling this problem?
Thanks in advance!
Implementing RollingOnSurfaceConstraint() using OpenSim API
- Ibrahim Hasan
- Posts: 11
- Joined: Tue Feb 22, 2022 11:33 am
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Implementing RollingOnSurfaceConstraint() using OpenSim API
The RollingOnSurfaceConstraint is not wrapped to Matlab. I've reported this on GitHub (Issue #3302): https://github.com/opensim-org/opensim-core/issues/3302. The constraint exists in OpenSim so models that contain this constraint can be loaded in Matlab, but the constraint cannot be created in Matlab. As a workaround, you could add the constraint to the model another way (e.g., in C++ or by editing the .osim file in Notepad) and read in the model file in Matlab. The XML template for this component (the code that appears in the .osim file) can be found in the GUI under Help -> XML Browser -> RollingOnSurfaceConstraint.
- Ibrahim Hasan
- Posts: 11
- Joined: Tue Feb 22, 2022 11:33 am
Re: Implementing RollingOnSurfaceConstraint() using OpenSim API
That actually helps. Thanks a lot professor Thomas!