I am experiencing a quite strange behaviour when adding multiple (complex) models in a single simulation. In few cases (on average 2/3 models over 10 totally) the recognized joints are not complete. For examples, models with 41 joints would show only 25. When this happens, the numbers are consistent and do not change.
The culprit is this function call, that for some reason fails to find all the joints:
Note: during the first debugging round I did, I found that the following lock was misused and it should be initialized outside the if to be useful. Though, this is not the problem.
I am experiencing a quite strange behaviour when adding multiple (complex) models in a single simulation. In few cases (on average 2/3 models over 10 totally) the recognized joints are not complete. For examples, models with 41 joints would show only 25. When this happens, the numbers are consistent and do not change.
The culprit is this function call, that for some reason fails to find all the joints:
https://github.com/robotology/gym-ignition/blob/86a77cc9ea02ec61a5f16ce44ba5d6fb83b9a11a/ignition/src/IgnitionRobot.cpp#L199-L214
I already checked and it seems that, when inserting the model in the ECM in the first place, the entities and components are all there:
https://github.com/robotology/gym-ignition/blob/86a77cc9ea02ec61a5f16ce44ba5d6fb83b9a11a/ignition/src/GazeboWrapper.cpp#L605-L606
What's strange in that the above method of the IgnitionRobot class is called just few lines after the creation of entities and components, in:
https://github.com/robotology/gym-ignition/blob/86a77cc9ea02ec61a5f16ce44ba5d6fb83b9a11a/ignition/src/GazeboWrapper.cpp#L639-L643