ami-iit / matlab-whole-body-simulator

A robot simulator running on simulink
BSD 3-Clause "New" or "Revised" License
31 stars 9 forks source link

Add pendulum model to matlab-whole-body-simulators #18

Closed traversaro closed 3 years ago

traversaro commented 3 years ago

The goal is to add to the models available in the simulator the model of a pendulum.

Such model could then be the first simple showcase model of the simulator that a non expert user could run on a local machine or on MATLAB online.

The model shall be fix based. This probably requires tweaking either the simulator either the model (refer to https://github.com/dic-iit/matlab-whole-body-simulator/issues/18#issuecomment-804023901).

For this reason, it might also make sense to implement this after #19 .

nunoguedelha commented 3 years ago

Add to the models available in the simulator the model of a pendulum.

Note: Presently, the simulator only supports floating base models (unless I missed something). Some minor changes to the simulator are required for properly handling fixed base models. I have already some clear ideas on this but for the example simulation, a workaround would be faster.

As a fast workaround, we can just:

This way, the base link will absorb all the inertial and gravity effects due to the other child links, without moving. The contact vertices will keep the base from sinking on the ground. A high friction coefficient will prevent the base to slide on the ground.

CC @traversaro @Giulero @VenusPasandi

I copy Venus who needed to simulate a humanoid model attached to a pole.

nunoguedelha commented 3 years ago

Add to the models available in the simulator the model of a pendulum.

Implemented in #22 .

nunoguedelha commented 3 years ago

Remaining issues are...

nunoguedelha commented 3 years ago

All completed. Closing.

traversaro commented 3 years ago

Could it make sense to add some documentation in the README or linked from the readme on how to try this example? Otherwise it could be a bit difficult for users to find it.

nunoguedelha commented 3 years ago

Could it make sense to add some documentation in the README or linked from the readme on how to try this example? Otherwise it could be a bit difficult for users to find it.

Fixed in #33 .