Open nunoguedelha opened 3 months ago
CC @oztahmet.
Eventually related to issue (1) in:
Hello @nunoguedelha,
Thanks for the quick response. I tried to implement a control loop using the RRbot example. I have two questions regarding this topic.
[ ] 1) Fixed the base frame using
robot_config.robotFrames.FIXED
, but there is a continuous downward movement along the z-axis during the simulation. Irrlicht visualization is used. My expectation is for the robot base to remain fixed to the ground. I kept the friction coefficient (fric_coeff = 10) and footprint settings (a bit larger footprint) the same in the config file settings.[x] 2) When I stop the simulation in Simulink, change and reinitialize the robot settings from the config file, and use the new config variables in the Matlab workspace to start the simulation again, the OpenMP forces Matlab to close. However, when I use the same robot settings in the Matlab workspace and restart the simulation several times, it works well.
Error code: _MP: Error #15: Initializing libomp.dll, but found libiomp5md.dll already initialized. OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIBOK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/
edit: 2nd issue is not related with Irrlicht engine, its more general with libraries. The reference comment to the Irrlicht engine was removed.
Originally posted by @oztahmet in https://github.com/ami-iit/matlab-whole-body-simulator/discussions/92#discussioncomment-9603906
The issue is occurring when testing the Closed-Chain Simulator on iCubGenova04 and RRbot1 through a basic position controller or just feeding null torques to the robot model.
Test with the Closed-Chain Simulator
Created Simulink model for testing the library RobotDynWithContacts_ClosedChain on iCubGenova04 or RRbot1 models. Copied base configuration and model files from this repository's root path:
test_matlab_system_closed_chain_2024b.slx
to be pushed to a branch.Running the model with free-falling iCubGenova04
l_sole
andr_sole
frames asIN_CONTACT_WITH_GROUND
robot frames instead ofLEFT_FOOT
andRIGHT_FOOT
.Final Robot frames list is:
The simulation runs successfully
Running the model with iCubGenova04 on a pole (invisible)
For this test we set a fixed frame:
initialConditions.base_position = [0; 0; 1];
.Frames.FIXED = Frames.BASE;
.Frames.IN_CONTACT_WITH_GROUND
unchanged. This can be useful if for instance the pole is not high enough and the feet touch the ground at some point of the simulation.In addition we integrate a simple gravity compensation in the controller.
The simulation runs successfully (almost).
We observe the robot (base) shifting downwards at constant speed, as we saw happening previously with the pendulum model with the simulator library
RobotDynWithContacts
(no closed chains). Not sure both problems are rellated.Running the model with RRbot1 fixed on the ground
For this test, we set RRbot1 configuration to work with
RobotDynWithContacts_ClosedChain
:The simulation runs successfully (almost).
We observe the robot leaning to the right and its base sink into the ground at constant speed. We can guess the observed drift is the same behaviour observed on the iCub model. Apparently, the constraint conditions used to keep the base fixed are not "strong" enough, or not well posed, causing it to drift downwards and topple. Typically, the constraint conditions could be ensuring zero acceleration of the "FIXED" frame, instead of zero velocity. We've seen this before in old simulations with iCub feet fixed through holonomic constraints (zero acceleration of the feet). ==> TO BE ANALYZED.
@traversaro , I think an issue could already be raised for this fixed frame drift problem.
Originally posted by @nunoguedelha in https://github.com/ami-iit/matlab-whole-body-simulator/discussions/92#discussioncomment-9689092