Add AddFreeJoint and remove isfree from AddJoint.

PiperOrigin-RevId: 604597442
Change-Id: I2fe03cf0f9a59b425080cc5cc12b236fea9c020d
This commit is contained in:
Alessio Quaglino
2024-02-06 03:48:48 -08:00
committed by Copybara-Service
parent 3b2dd06c54
commit 01439f28b3
4 changed files with 23 additions and 13 deletions
+2 -2
View File
@@ -456,7 +456,7 @@ bool mjCComposite::MakeParticle(mjCModel* model, mjCBody* body, char* error, int
// add slider joints if none defined
if (!add[mjCOMPKIND_PARTICLE]) {
for (int i=0; i<3; i++) {
mjCJoint* jnt = b->AddJoint(&defjoint[mjCOMPKIND_JOINT][0], false);
mjCJoint* jnt = b->AddJoint(&defjoint[mjCOMPKIND_JOINT][0]);
jnt->def = body->def;
jnt->type = mjJNT_SLIDE;
mjuu_setvec(jnt->pos, 0, 0, 0);
@@ -468,7 +468,7 @@ bool mjCComposite::MakeParticle(mjCModel* model, mjCBody* body, char* error, int
// add user-specified joints
else {
for (auto defjnt : defjoint[mjCOMPKIND_PARTICLE]) {
mjCJoint* jnt = b->AddJoint(&defjnt, false);
mjCJoint* jnt = b->AddJoint(&defjnt);
jnt->def = body->def;
}
}