Add two new attributes to weld constraints:
- `anchor` determines the point of wrench application, in the frame of body2. - `tfratio` scales applied torques relative to applied forces. - Add visualisation of both anchor points to both weld and connect constraints. - Add a test model showing how the new weld parameters behave. PiperOrigin-RevId: 469228149 Change-Id: I836b0791f10fb624607a12ef3c687da991c21789
This commit is contained in:
committed by
Copybara-Service
parent
558aaf2923
commit
abc0a39b7a
@@ -2884,7 +2884,6 @@ mjCEquality::mjCEquality(mjCModel* _model, mjCDef* _def) {
|
||||
|
||||
mjuu_zerovec(data, mjNEQDATA);
|
||||
data[1] = 1;
|
||||
data[10] = 1; // torque:force ratio
|
||||
|
||||
// clear internal variables
|
||||
obj1id = obj2id = -1;
|
||||
@@ -2972,11 +2971,6 @@ void mjCEquality::Compile(void) {
|
||||
if (type==mjEQ_CONNECT) {
|
||||
((mjCBody*)px1)->MakeLocal(anchor, qdummy, data, qunit);
|
||||
mjuu_copyvec(data, anchor, 3);
|
||||
} else if (type==mjEQ_WELD) {
|
||||
if (px2) {
|
||||
((mjCBody*)px2)->MakeLocal(anchor, qdummy, data, qunit);
|
||||
mjuu_copyvec(data, anchor, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user