![]() |
RobWorkProject
23.9.11-
|
the DynamicWorkcell class is a container class for dynamic information/data in a workcell, much like WorkCell is a container class for the kinematic information/data in a workcell More...
#include <DynamicWorkCell.hpp>
Public Types | |
| enum | DWCEventType { GravityChangedEvent , ConstraintAddedEvent , BodyAddedEvent , DeviceAddedEvent , ControllerAddedEvent , SensorAddedEvent } |
| Types of events a DynamicWorkCell can emit. More... | |
| typedef std::vector< Body::Ptr > | BodyList |
| Type for the collection of bodies. | |
| typedef std::vector< Constraint::Ptr > | ConstraintList |
| Type for the collection of constraints. | |
| typedef std::vector< DynamicDevice::Ptr > | DeviceList |
| Type for the collection of devices. | |
| typedef std::vector< rwlibs::simulation::SimulatedController::Ptr > | ControllerList |
| Type for the collection of simulated controllers. | |
| typedef std::vector< rwlibs::simulation::SimulatedSensor::Ptr > | SensorList |
| Type for the collection of simulated sensors. | |
| typedef rw::core::Ptr< DynamicWorkCell > | Ptr |
| Smart pointer type for DynamicWorkCell. | |
| typedef rw::core::Ptr< const DynamicWorkCell > | CPtr |
| Smart pointer type for const DynamicWorkCell. | |
| typedef boost::function< void(DWCEventType, boost::any)> | DWCChangedListener |
| Type for an event listener. | |
| typedef rw::core::Event< DWCChangedListener, DWCEventType, boost::any > | DWCChangedEvent |
| Type for the event. | |
Public Member Functions | |
| DynamicWorkCell (rw::models::WorkCell::Ptr workcell) | |
| Constructor. More... | |
| DynamicWorkCell (rw::models::WorkCell::Ptr workcell, const BodyList &allbodies, const ConstraintList &constraints, const DeviceList &devices, const ControllerList &controllers) | |
| Constructor. More... | |
| virtual | ~DynamicWorkCell () |
| destructor | |
| const BodyList & | getBodies () const |
| gets a list of all bodies in the dynamic workcell | |
| Body::Ptr | findBody (const std::string &name) const |
| find a specific body with name name More... | |
| template<class T > | |
| rw::core::Ptr< T > | findBody (const std::string &name) const |
| find a specific body with name name and type T More... | |
| template<class T > | |
| std::vector< rw::core::Ptr< T > > | findBodies () const |
| find all bodies with type T More... | |
| void | addConstraint (Constraint::Ptr constraint) |
| Add a constraint to the dynamic workcell. More... | |
| const ConstraintList & | getConstraints () const |
| gets a list of all constraints in the dynamic workcell | |
| Constraint::Ptr | findConstraint (const std::string &name) const |
| find a specific constraint with name name More... | |
| const DeviceList & | getDynamicDevices () const |
| gets a list of all dynamic devices in the dynamic workcell More... | |
| void | addDevice (DynamicDevice::Ptr device) |
| add a device to the dynamic workcell More... | |
| DynamicDevice::Ptr | findDevice (const std::string &name) const |
| find a dynamic device of name name More... | |
| template<class T > | |
| rw::core::Ptr< T > | findDevice (const std::string &name) const |
| find a specific device with name name and type T More... | |
| const ControllerList & | getControllers () const |
| gets a list of all controllers in the dynamic workcell | |
| const SensorList & | getSensors () const |
| get the list of sensors | |
| void | addSensor (rwlibs::simulation::SimulatedSensor::Ptr sensor) |
| add a sensor to the dynamic workcell More... | |
| rwlibs::simulation::SimulatedSensor::Ptr | findSensor (const std::string &name) const |
| find a sensor More... | |
| template<class T > | |
| rw::core::Ptr< T > | findSensor (const std::string &name) const |
| find a sensor of a specific type. More... | |
| void | addBody (Body::Ptr body) |
| adds a body to the dynamic workcell. More... | |
| void | addController (rwlibs::simulation::SimulatedController::Ptr manipulator) |
| adds a body controller to the dynamic workcell. More... | |
| rwlibs::simulation::SimulatedController::Ptr | findController (const std::string &name) const |
| Find a simulated controller. More... | |
| template<class T > | |
| rw::core::Ptr< T > | findController (const std::string &name) const |
| Find a simulated controller. More... | |
| ContactDataMap & | getContactData () |
| gets the static contact data information | |
| const ContactDataMap & | getContactData () const |
| Get the static contact data information. More... | |
| MaterialDataMap & | getMaterialData () |
| gets the material data information, like friction properties | |
| const MaterialDataMap & | getMaterialData () const |
| Get the material data information, like friction. More... | |
| Body::Ptr | getBody (rw::core::Ptr< rw::kinematics::Frame > f) |
| gets the body associated with frame f if any. | |
| rw::models::WorkCell::Ptr | getWorkcell () const |
| gets the default kinematic workcell | |
| rw::models::WorkCell::Ptr | getWorkCell () const |
| gets the default kinematic workcell | |
| double | getCollisionMargin () |
| the collision margin describe how close | |
| void | setCollisionMargin (double margin) |
| Set the collision margin. More... | |
| WorkCellDimension | getWorldDimension () |
| Get dimensions of workspace. More... | |
| bool | inDevice (rw::core::Ptr< const Body > body) const |
| tests if a body is part of a device More... | |
| void | setGravity (const rw::math::Vector3D<> &grav) |
| Set the gravity in this dynamic workcell. More... | |
| const rw::math::Vector3D & | getGravity () const |
| get the gravity in this dynamic workcell More... | |
| rw::core::PropertyMap & | getEngineSettings () |
| get the settings and properties for the physics engine More... | |
| const rw::core::PropertyMap & | getEngineSettings () const |
| Get the settings and properties for the physics engine. More... | |
| bool | remove (Body::Ptr body) |
| Remove a body from the list of bodies. More... | |
| DWCChangedEvent & | changedEvent () |
| Returns StateChangeEvent needed for subscribing and firing the event. More... | |
the DynamicWorkcell class is a container class for dynamic information/data in a workcell, much like WorkCell is a container class for the kinematic information/data in a workcell
The dynamic description includes:
| enum DWCEventType |
Types of events a DynamicWorkCell can emit.
| DynamicWorkCell | ( | rw::models::WorkCell::Ptr | workcell | ) |
Constructor.
| workcell | [in] a smart pointer to the rw::models::WorkCell |
| DynamicWorkCell | ( | rw::models::WorkCell::Ptr | workcell, |
| const BodyList & | allbodies, | ||
| const ConstraintList & | constraints, | ||
| const DeviceList & | devices, | ||
| const ControllerList & | controllers | ||
| ) |
Constructor.
| workcell | [in] a smart pointer to the rw::models::WorkCell |
| allbodies | [in] a list of bodies. |
| constraints | [in] a list of constraints. |
| devices | [in] a list of devices. |
| controllers | [in] a list of controllers. |
| void addBody | ( | Body::Ptr | body | ) |
adds a body to the dynamic workcell.
Notice that this will change the length of the default State.
| void addConstraint | ( | Constraint::Ptr | constraint | ) |
Add a constraint to the dynamic workcell.
| constraint | [in] a smart pointer to the constraint to add. |
|
inline |
adds a body controller to the dynamic workcell.
Notice that this will change the length of the default State.
| void addDevice | ( | DynamicDevice::Ptr | device | ) |
add a device to the dynamic workcell
| device | [in] a device |
| void addSensor | ( | rwlibs::simulation::SimulatedSensor::Ptr | sensor | ) |
add a sensor to the dynamic workcell
| sensor | [in] a simulated sensor |
|
inline |
Returns StateChangeEvent needed for subscribing and firing the event.
|
inline |
find all bodies with type T
| Body::Ptr findBody | ( | const std::string & | name | ) | const |
find a specific body with name name
| name | [in] name of body |
|
inline |
find a specific body with name name and type T
| name | [in] name of body |
| Constraint::Ptr findConstraint | ( | const std::string & | name | ) | const |
find a specific constraint with name name
| name | [in] name of constraint |
| rwlibs::simulation::SimulatedController::Ptr findController | ( | const std::string & | name | ) | const |
Find a simulated controller.
| name | [in] name of the controller. |
|
inline |
Find a simulated controller.
| name | [in] name of the controller. |
| DynamicDevice::Ptr findDevice | ( | const std::string & | name | ) | const |
find a dynamic device of name name
| name | [in] name of device |
|
inline |
find a specific device with name name and type T
| name | [in] name of body |
| rwlibs::simulation::SimulatedSensor::Ptr findSensor | ( | const std::string & | name | ) | const |
find a sensor
| name | [in] the sensor |
|
inline |
find a sensor of a specific type.
| name | [in] name of sensor |
|
inline |
Get the static contact data information.
|
inline |
gets a list of all dynamic devices in the dynamic workcell
|
inline |
get the settings and properties for the physics engine
|
inline |
Get the settings and properties for the physics engine.
|
inline |
get the gravity in this dynamic workcell
|
inline |
Get the material data information, like friction.
|
inline |
Get dimensions of workspace.
| bool inDevice | ( | rw::core::Ptr< const Body > | body | ) | const |
tests if a body is part of a device
| body | [in] the body to test for. |
| bool remove | ( | Body::Ptr | body | ) |
Remove a body from the list of bodies.
| body | [in] the body to be removed |
|
inline |
Set the collision margin.
| margin | [in] the new margin. |
|
inline |
Set the gravity in this dynamic workcell.
| grav | [in] the direction and strength of gravity |