Package org.robwork.sdurw_simulation
Class Simulator
- java.lang.Object
-
- org.robwork.sdurw_simulation.Simulator
-
- Direct Known Subclasses:
DynamicSimulator
public class Simulator extends java.lang.Object
interface of a general simulator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimulator.UpdateInfostep info is used when updating controllers, devices and bodies.
-
Constructor Summary
Constructors Constructor Description Simulator(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()ControllerPtrgetController(java.lang.String name)get controller with specific namestatic longgetCPtr(Simulator obj)PropertyMapgetPropertyMap()get propertymap of this simulatorSensorPtrgetSensor(java.lang.String name)get sensor with specific nameStategetState()get current state of simulatordoublegetTime()gets the the current simulated timevoidinit(State state)initialize simulator with state variablesvoidreset(State state)reset velocity and acceleration of all bodies to 0.voidsetEnabled(FramePtr frame, boolean enabled)Enables or disables simulation of a frame
Conditional comment:voidstep(double dt)take a step forward in time with timestep dt.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Simulator obj)
-
delete
public void delete()
-
step
public void step(double dt)
take a step forward in time with timestep dt.- Parameters:
dt- [in] the time step
-
reset
public void reset(State state)
reset velocity and acceleration of all bodies to 0. And sets the position of all
bodies to that described in state
-
init
public void init(State state)
initialize simulator with state variables
-
getTime
public double getTime()
gets the the current simulated time
-
getState
public State getState()
get current state of simulator- Returns:
- current state of simulator
-
setEnabled
public void setEnabled(FramePtr frame, boolean enabled)
Enables or disables simulation of a frame
Conditional comment:- Parameters:
frame- [in]enabled- [in]
End of conditional comment.
-
getPropertyMap
public PropertyMap getPropertyMap()
get propertymap of this simulator
-
getSensor
public SensorPtr getSensor(java.lang.String name)
get sensor with specific name
-
getController
public ControllerPtr getController(java.lang.String name)
get controller with specific name
-
-