RobWorkProject  23.9.11-
Signals | Public Member Functions | Protected Member Functions | List of all members
RWSimPlugin Class Reference

A plugin for loading dynamic workcells and for doing simple dynamics simulation using different physics engines. More...

#include <RWSimPlugin.hpp>

Inherits RobWorkStudioPlugin, and RWSimPlugin.

Signals

void updateView ()
 
void updateDialog (const rw::kinematics::State &state)
 

Public Member Functions

 RWSimPlugin ()
 constructor
 
virtual ~RWSimPlugin ()
 destructor
 
void open (rw::models::WorkCell *workcell)
 called when a workcell is opened More...
 
void close ()
 called when a workcell is being closed. More...
 
void initialize ()
 is called when RobWorkStudio instance is valid. Can be used to initialize values in the plugin that depend on RobWorkStudio More...
 
void stateChangedListener (const rw::kinematics::State &state)
 
void openDwc (const std::string &file)
 opens a dynamic workcell with filename file. More...
 
void stepCallBack (const rw::kinematics::State &state)
 
void setupMenu (QMenu *menu)
 sets up the menu with this plugin More...
 
- Public Member Functions inherited from RobWorkStudioPlugin
 RobWorkStudioPlugin (const QString &name, const QIcon &icon)
 constructor of the plugin interface More...
 
virtual QString name () const
 name that describe the plugin instance
 
virtual void setupToolBar (QToolBar *toolbar)
 setsup a toolbar with the actions of this plugin More...
 
virtual void setRobWorkStudio (RobWorkStudio *studio)
 sets the RobWorkStudio instance of the plugin. Normally only done on construction.
 
virtual RobWorkStudiogetRobWorkStudio ()
 returns a handle to the RobWorkStudio instance
 
virtual void setRobWorkInstance (rw::core::RobWork::Ptr robwork)
 Sets the RobWork instance to be used by the plugin. More...
 
virtual rw::core::RobWork::Ptr getRobWorkInstance ()
 Returns RobWork instance used by the plugin.
 
virtual rw::core::Loglog ()
 returns the RobWorkStudio log instance
 
virtual void setLog (rw::core::Log::Ptr log)
 Sets the log to use. More...
 
const rw::kinematics::StategetState ()
 get current state of RobWorkStudio
 
void setState (const rw::kinematics::State &state)
 set current state of RobWorkStudio
 

Protected Member Functions

void updateStatus ()
 
rw::core::PropertyMapsettings ()
 
- Protected Member Functions inherited from RobWorkStudioPlugin
boost::tuple< QWidget *, QAction *, int > getAction (QWidget *widget, const std::string &actionName)
 Find action in widget with name actionName . More...
 
boost::tuple< QWidget *, QMenu *, int > getMenu (QWidget *widget, const std::string &menuName)
 Find menu in widget with name menuName . More...
 
boost::tuple< QMenu *, QAction *, int > getAction (QWidget *widget, const std::string &actionName, const std::string &actionName2)
 Find action, actionName2, in menu, actionName, in a widget. More...
 

Additional Inherited Members

- Public Slots inherited from RobWorkStudioPlugin
void showPlugin ()
 toggles the visibility of the plugin
 
- Protected Attributes inherited from RobWorkStudioPlugin
QAction _showAction
 ! More...
 
QString _name
 ! More...
 
RobWorkStudio_studio
 ! More...
 
rw::core::RobWork::Ptr _robwork
 ! More...
 
rw::core::Log::Ptr _log
 ! More...
 

Detailed Description

A plugin for loading dynamic workcells and for doing simple dynamics simulation using different physics engines.

Member Function Documentation

◆ close()

void close ( )
virtual

called when a workcell is being closed.

Reimplemented from RobWorkStudioPlugin.

◆ initialize()

void initialize ( )
virtual

is called when RobWorkStudio instance is valid. Can be used to initialize values in the plugin that depend on RobWorkStudio

Note
DO NOT fire any events under initialization since the order of which plugins are initialized is unknown. Therefore undefined behavior might occour. Instead wait until open is called for the first time.

Reimplemented from RobWorkStudioPlugin.

◆ open()

void open ( rw::models::WorkCell workcell)
virtual

called when a workcell is opened

Parameters
workcell[in] that has been loaded

Reimplemented from RobWorkStudioPlugin.

◆ openDwc()

void openDwc ( const std::string &  file)

opens a dynamic workcell with filename file.

Note
if successfully openned a generic event with string id 'DynamicWorkCellLoaded' will be emitted and the DynamicWorkCell will be saved in the RobWorkStudio propertymap with the string id 'DynamicWorkcell'.

◆ setupMenu()

void setupMenu ( QMenu *  menu)
virtual

sets up the menu with this plugin

Parameters
menu[in] the menu wherein the plugin can add its actions

Reimplemented from RobWorkStudioPlugin.


The documentation for this class was generated from the following file: