RobWorkProject
24.12.4-
|
interface of a general simulator More...
#include <Simulator.hpp>
Inherited by KinematicSimulator, and DynamicSimulator.
Classes | |
struct | UpdateInfo |
step info is used when updating controllers, devices and bodies. More... | |
Public Types | |
typedef rw::core::Ptr< Simulator > | Ptr |
smart pointer type of simulator | |
Public Member Functions | |
virtual void | step (double dt)=0 |
take a step forward in time with timestep dt. More... | |
virtual void | reset (const rw::kinematics::State &state)=0 |
reset velocity and acceleration of all bodies to 0. And sets the position of all bodies to that described in state | |
virtual void | init (rw::kinematics::State &state)=0 |
initialize simulator with state variables | |
virtual double | getTime ()=0 |
gets the the current simulated time | |
virtual rw::kinematics::State & | getState ()=0 |
get current state of simulator More... | |
virtual void | setEnabled (rw::core::Ptr< rw::kinematics::Frame > frame, bool enabled)=0 |
virtual rw::core::PropertyMap & | getPropertyMap ()=0 |
get propertymap of this simulator | |
virtual rw::sensor::Sensor::Ptr | getSensor (const std::string &name) |
get sensor with specific name | |
virtual rwlibs::control::Controller::Ptr | getController (const std::string &name) |
get controller with specific name | |
template<class SIMSENSORTYPE > | |
rw::sensor::Sensor::Ptr | getSensorHandle (SIMSENSORTYPE *ssensor) |
get sensorhandle to a statefull instance of the simulated sensor, controlling the sensor in this simulator. More... | |
template<class SIMSENSORTYPE > | |
bool | hasHandle (SIMSENSORTYPE *ssensor) |
Test if handle for simulatedsensor exists. More... | |
template<class SIMSENSORTYPE > | |
void | addHandle (SIMSENSORTYPE *ssensor, rw::sensor::Sensor::Ptr sensor) |
add handle to a specific simulated sensor More... | |
interface of a general simulator
|
inline |
add handle to a specific simulated sensor
ssensor | [in] simulated sensor to add handle to |
sensor | [in] handle to statfull instance |
|
inline |
get sensorhandle to a statefull instance of the simulated sensor, controlling the sensor in this simulator.
ssensor | [in] the simulated sensor for which to retrieve a handle |
|
pure virtual |
|
inline |
Test if handle for simulatedsensor exists.
ssensor | [in] the simulated sensor for which to check if a handle exists |
|
pure virtual |
Enables or disables simulation of a frame
Implemented in DynamicSimulator.
|
pure virtual |
take a step forward in time with timestep dt.
dt | [in] the time step |
Implemented in DynamicSimulator, and KinematicSimulator.