Privacy
An open-source, flexible 3D physical simulation framework
mars::viz::Viz Class Reference

#include <Viz.h>

Public Member Functions

 Viz ()
 
 Viz (lib_manager::LibManager *theManager)
 
virtual ~Viz ()
 
virtual int getLibVersion () const
 
virtual const std::string getLibName () const
 
 CREATE_MODULE_INFO ()
 
void init (bool createWindow=true)
 
void loadScene (std::string filename, std::string robotname="")
 
void setJointValue (std::string jointName, double value)
 
void setJointValue (unsigned int controllerIdx, double value)
 
void setNodePosition (const std::string &nodeName, const utils::Vector &pos)
 
void setNodePosition (const unsigned long &id, const utils::Vector &pos)
 
void setNodeOrientation (const std::string &nodeName, const utils::Quaternion &q)
 
void setNodeOrientation (const unsigned long &id, const utils::Quaternion &q)
 
virtual void receiveData (const data_broker::DataInfo &info, const data_broker::DataPackage &package, int callbackParam)
 The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur. More...
 
- Public Member Functions inherited from lib_manager::LibInterface
 LibInterface (LibManager *theManager)
 
virtual ~LibInterface (void)
 
ModuleInfo getModuleInfo () const
 
virtual void newLibLoaded (const std::string &libName)
 
virtual void createModuleInfo (void)
 
- Public Member Functions inherited from mars::data_broker::ReceiverInterface
 ReceiverInterface ()
 
virtual ~ReceiverInterface ()
 

Public Attributes

interfaces::GraphicsManagerInterfacegraphics
 

Private Member Functions

void setJointValue (ForwardTransform *joint, double value)
 

Private Attributes

std::string configDir
 
std::map< unsigned long, interfaces::NodeDatanodeMapById
 
std::map< std::string, interfaces::NodeDatanodeMapByName
 
std::map< std::string, ForwardTransformjointMapByName
 
std::map< unsigned long, ForwardTransform * > jointMapById
 
std::map< unsigned long, ForwardTransform * > jointMapByNodeId
 
std::vector< ForwardTransform * > jointByControllerIdx
 
interfaces::ControlCentercontrol
 

Additional Inherited Members

- Protected Attributes inherited from lib_manager::LibInterface
LibManagerlibManager
 
ModuleInfo moduleInfo
 

Detailed Description

Definition at line 58 of file Viz.h.

Constructor & Destructor Documentation

◆ Viz() [1/2]

mars::viz::Viz::Viz ( )

Definition at line 73 of file Viz.cpp.

◆ Viz() [2/2]

mars::viz::Viz::Viz ( lib_manager::LibManager theManager)

Definition at line 81 of file Viz.cpp.

◆ ~Viz()

mars::viz::Viz::~Viz ( )
virtual

close simulation

Definition at line 89 of file Viz.cpp.

Member Function Documentation

◆ CREATE_MODULE_INFO()

mars::viz::Viz::CREATE_MODULE_INFO ( )

◆ getLibName()

virtual const std::string mars::viz::Viz::getLibName ( ) const
inlinevirtual

Implements lib_manager::LibInterface.

Definition at line 68 of file Viz.h.

◆ getLibVersion()

virtual int mars::viz::Viz::getLibVersion ( ) const
inlinevirtual

Implements lib_manager::LibInterface.

Definition at line 66 of file Viz.h.

◆ init()

void mars::viz::Viz::init ( bool  createWindow = true)

Definition at line 108 of file Viz.cpp.

◆ loadScene()

void mars::viz::Viz::loadScene ( std::string  filename,
std::string  robotname = "" 
)

Definition at line 185 of file Viz.cpp.

◆ receiveData()

void mars::viz::Viz::receiveData ( const data_broker::DataInfo info,
const data_broker::DataPackage dataPackage,
int  callbackParam 
)
virtual

The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur.

Parameters
infoInformation about the DataPackage.
dataPackageThe DataPackage containing all the data.
callbackParamThe int the receiver passed during registration. The default (the receiver didn't provide a callbackParam) is 0. This can be used to easily distinguish different registrations.

Implements mars::data_broker::ReceiverInterface.

Definition at line 479 of file Viz.cpp.

◆ setJointValue() [1/3]

void mars::viz::Viz::setJointValue ( std::string  jointName,
double  value 
)

Definition at line 427 of file Viz.cpp.

◆ setJointValue() [2/3]

void mars::viz::Viz::setJointValue ( unsigned int  controllerIdx,
double  value 
)

Definition at line 435 of file Viz.cpp.

◆ setJointValue() [3/3]

void mars::viz::Viz::setJointValue ( ForwardTransform joint,
double  value 
)
private

Definition at line 440 of file Viz.cpp.

◆ setNodeOrientation() [1/2]

void mars::viz::Viz::setNodeOrientation ( const std::string &  nodeName,
const utils::Quaternion q 
)

Definition at line 467 of file Viz.cpp.

◆ setNodeOrientation() [2/2]

void mars::viz::Viz::setNodeOrientation ( const unsigned long &  id,
const utils::Quaternion q 
)

Definition at line 475 of file Viz.cpp.

◆ setNodePosition() [1/2]

void mars::viz::Viz::setNodePosition ( const std::string &  nodeName,
const utils::Vector pos 
)

Definition at line 455 of file Viz.cpp.

◆ setNodePosition() [2/2]

void mars::viz::Viz::setNodePosition ( const unsigned long &  id,
const utils::Vector pos 
)

Definition at line 463 of file Viz.cpp.

Member Data Documentation

◆ configDir

std::string mars::viz::Viz::configDir
private

Definition at line 93 of file Viz.h.

◆ control

interfaces::ControlCenter* mars::viz::Viz::control
private

Definition at line 101 of file Viz.h.

◆ graphics

interfaces::GraphicsManagerInterface* mars::viz::Viz::graphics

Definition at line 85 of file Viz.h.

◆ jointByControllerIdx

std::vector<ForwardTransform*> mars::viz::Viz::jointByControllerIdx
private

Definition at line 100 of file Viz.h.

◆ jointMapById

std::map<unsigned long, ForwardTransform*> mars::viz::Viz::jointMapById
private

Definition at line 98 of file Viz.h.

◆ jointMapByName

std::map<std::string, ForwardTransform> mars::viz::Viz::jointMapByName
private

Definition at line 97 of file Viz.h.

◆ jointMapByNodeId

std::map<unsigned long, ForwardTransform*> mars::viz::Viz::jointMapByNodeId
private

Definition at line 99 of file Viz.h.

◆ nodeMapById

std::map<unsigned long, interfaces::NodeData> mars::viz::Viz::nodeMapById
private

Definition at line 95 of file Viz.h.

◆ nodeMapByName

std::map<std::string, interfaces::NodeData> mars::viz::Viz::nodeMapByName
private

Definition at line 96 of file Viz.h.


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