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

#include <SMURFLoader.h>

Public Member Functions

 SMURFLoader (lib_manager::LibManager *theManager)
 
 ~SMURFLoader ()
 
int getLibVersion () const
 
const std::string getLibName () const
 
 CREATE_MODULE_INFO ()
 
virtual bool loadFile (std::string filename, std::string tmpPath, std::string robotname)
 
virtual int saveFile (std::string filename, std::string tmpPath)
 
virtual void loadEntity (configmaps::ConfigVector::iterator it, std::string path)
 Loads a URDF, SMURF or SMURFS (SMURF scene) file. More...
 
void checkEncodings ()
 
unsigned int parseSVG (std::vector< configmaps::ConfigMap > *configList, std::string sceneFilename)
 
- Public Member Functions inherited from mars::interfaces::LoadSceneInterface
 LoadSceneInterface (lib_manager::LibManager *theManager)
 
virtual ~LoadSceneInterface ()
 
- 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)
 

Private Member Functions

unsigned int unzip (const std::string &destinationDir, const std::string &zipFilename)
 

Private Attributes

std::string tmpPath
 
double global_width
 
double global_length
 
std::map< std::string, std::string > params
 
std::vector< configmaps::ConfigMapentityList
 
configmaps::ConfigMap courseconfig
 
interfaces::ControlCentercontrol
 
entity_generation::EntityFactoryManagerfactoryManager
 
std::vector< configmaps::ConfigMapentitylist
 

Additional Inherited Members

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

Detailed Description

Definition at line 44 of file SMURFLoader.h.

Constructor & Destructor Documentation

◆ SMURFLoader()

mars::smurf::SMURFLoader::SMURFLoader ( lib_manager::LibManager theManager)

Definition at line 48 of file SMURFLoader.cpp.

◆ ~SMURFLoader()

mars::smurf::SMURFLoader::~SMURFLoader ( )

Definition at line 69 of file SMURFLoader.cpp.

Member Function Documentation

◆ checkEncodings()

void mars::smurf::SMURFLoader::checkEncodings ( )

Definition at line 82 of file SMURFLoader.cpp.

◆ CREATE_MODULE_INFO()

mars::smurf::SMURFLoader::CREATE_MODULE_INFO ( )

◆ getLibName()

const std::string mars::smurf::SMURFLoader::getLibName ( ) const
inlinevirtual

Implements lib_manager::LibInterface.

Definition at line 52 of file SMURFLoader.h.

◆ getLibVersion()

int mars::smurf::SMURFLoader::getLibVersion ( ) const
inlinevirtual

Implements lib_manager::LibInterface.

Definition at line 51 of file SMURFLoader.h.

◆ loadEntity()

void mars::smurf::SMURFLoader::loadEntity ( configmaps::ConfigVector::iterator  it,
std::string  path 
)
virtual

Loads a URDF, SMURF or SMURFS (SMURF scene) file.

Parameters
filenameThe name of the file to be loaded as a full path.
tmpPathThe path to the temporary directory to which files should be unzipped if the file format requires it.
robotnameThis parameter is obsolete with URDF and SMURF and was only needed for MARS scenes. It may be removed in the future.
Returns
1 if the file was successfully loaded, 0 otherwise

Definition at line 304 of file SMURFLoader.cpp.

◆ loadFile()

bool mars::smurf::SMURFLoader::loadFile ( std::string  filename,
std::string  tmpPath,
std::string  robotname 
)
virtual

Implements mars::interfaces::LoadSceneInterface.

Definition at line 335 of file SMURFLoader.cpp.

◆ parseSVG()

unsigned int mars::smurf::SMURFLoader::parseSVG ( std::vector< configmaps::ConfigMap > *  configList,
std::string  sceneFilename 
)

Definition at line 117 of file SMURFLoader.cpp.

◆ saveFile()

int mars::smurf::SMURFLoader::saveFile ( std::string  filename,
std::string  tmpPath 
)
virtual

Implements mars::interfaces::LoadSceneInterface.

Definition at line 489 of file SMURFLoader.cpp.

◆ unzip()

unsigned int mars::smurf::SMURFLoader::unzip ( const std::string &  destinationDir,
const std::string &  zipFilename 
)
private

Definition at line 494 of file SMURFLoader.cpp.

Member Data Documentation

◆ control

interfaces::ControlCenter* mars::smurf::SMURFLoader::control
private

Definition at line 73 of file SMURFLoader.h.

◆ courseconfig

configmaps::ConfigMap mars::smurf::SMURFLoader::courseconfig
private

Definition at line 71 of file SMURFLoader.h.

◆ entityList

std::vector<configmaps::ConfigMap> mars::smurf::SMURFLoader::entityList
private

Definition at line 70 of file SMURFLoader.h.

◆ entitylist

std::vector<configmaps::ConfigMap> mars::smurf::SMURFLoader::entitylist
private

Definition at line 75 of file SMURFLoader.h.

◆ factoryManager

entity_generation::EntityFactoryManager* mars::smurf::SMURFLoader::factoryManager
private

Definition at line 74 of file SMURFLoader.h.

◆ global_length

double mars::smurf::SMURFLoader::global_length
private

Definition at line 68 of file SMURFLoader.h.

◆ global_width

double mars::smurf::SMURFLoader::global_width
private

Definition at line 67 of file SMURFLoader.h.

◆ params

std::map<std::string, std::string> mars::smurf::SMURFLoader::params
private

Definition at line 69 of file SMURFLoader.h.

◆ tmpPath

std::string mars::smurf::SMURFLoader::tmpPath
private

Definition at line 66 of file SMURFLoader.h.


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