/** * Set the transform from the root joint joint of the robot to the world, as known by the simulation. If both * this and the controller transform are set, all elements are adjusted for the difference. * * @param transformToWorld */ public void setSimulationTransformToWorld(RigidBodyTransform transformToWorld) { this.simulatedRootToWorldTransform.set(transformToWorld); if(updateInSimulationThread) { // This is cheap enough to do twice. This way, guarantee that data from the same tick is used. updateRootTransform(); } }
/** * Set the transform from the root joint joint of the robot to the world, as known by the simulation. If both * this and the controller transform are set, all elements are adjusted for the difference. * * @param transformToWorld */ public void setSimulationTransformToWorld(RigidBodyTransform transformToWorld) { this.simulatedRootToWorldTransform.set(transformToWorld); if(updateInSimulationThread) { // This is cheap enough to do twice. This way, guarantee that data from the same tick is used. updateRootTransform(); } }
/** * Set the transform from the root joint joint of the robot to the world, as known by the controller. If both * this and the simulation transform are set, all elements are adjusted for the difference. * * @param transformToWorld */ public void setControllerTransformToWorld(RigidBodyTransform transformToWorld) { this.controllerWorldToRootTransform.setAndInvert(transformToWorld); if(updateInSimulationThread) { updateRootTransform(); } }
/** * Set the transform from the root joint joint of the robot to the world, as known by the controller. If both * this and the simulation transform are set, all elements are adjusted for the difference. * * @param transformToWorld */ public void setControllerTransformToWorld(RigidBodyTransform transformToWorld) { this.controllerWorldToRootTransform.invert(transformToWorld); if(updateInSimulationThread) { updateRootTransform(); } } }
public void update() { if (updateInSimulationThread) { throw new RuntimeException("YoGraphics are already updated in the simulation thread."); } if (graphicsConch != null) { synchronized (graphicsConch) { updateRootTransform(); for (int i = 0; i < graphicsUpdatables.size(); i++) { graphicsUpdatables.get(i).update(); } } } }
public void update() { if (updateInSimulationThread) { throw new RuntimeException("YoGraphics are already updated in the simulation thread."); } if (graphicsConch != null) { synchronized (graphicsConch) { updateRootTransform(); for (int i = 0; i < graphicsUpdatables.size(); i++) { graphicsUpdatables.get(i).update(); } } } }