Skip to content

Commit 0859837

Browse files
committed
use the index from the lookup table
1 parent 38a73a0 commit 0859837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/mujoco/MuJoCoModelManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void setAllJointPositions(HashMap<String, Double> putPositions) {
181181
for (String jointName:putPositions.keySet()) {
182182
int i = getJointIndex(jointName);
183183
double position =putPositions.get(jointName);
184-
data.qpos().put(i, position);
184+
data.qpos().put(model.jnt_qposadr().get(i), position);
185185
}
186186
}
187187
public HashMap<String, Double> getControlInstance() {

0 commit comments

Comments
 (0)