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 class
Simulator.UpdateInfo
step 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 void
delete()
ControllerPtr
getController(java.lang.String name)
get controller with specific namestatic long
getCPtr(Simulator obj)
PropertyMap
getPropertyMap()
get propertymap of this simulatorSensorPtr
getSensor(java.lang.String name)
get sensor with specific nameState
getState()
get current state of simulatordouble
getTime()
gets the the current simulated timevoid
init(State state)
initialize simulator with state variablesvoid
reset(State state)
reset velocity and acceleration of all bodies to 0.void
setEnabled(FramePtr frame, boolean enabled)
Enables or disables simulation of a frame
Conditional comment:void
step(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
-
-