Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types
urdf2graspit::FileIO Class Reference

Reads and writes URDF and GraspIt! files to disk. More...

#include <FileIO.h>

Inheritance diagram for urdf2graspit::FileIO:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
baselib_binding::shared_ptr
< GraspItConversionResultT >
::type 
GraspItConversionResultPtr
typedef
urdf2graspit::ConversionResult 
GraspItConversionResultT

Public Member Functions

 FileIO (const std::string &_outputDir, const OutputStructure &_outStructure)
bool writeContacts (const std::string &robotName, const std::string &content, const std::string &useFilename) const
 ~FileIO ()

Protected Member Functions

std::string getRobotDir (const std::string &robotName) const
bool initGraspItRobotDir (const std::string &robotName, std::string &robotDir) const
virtual bool initOutputDirImpl (const std::string &robotName) const
bool writeEigen (const std::string &robotName, const std::string &content) const
bool writeGraspitMeshFiles (const std::map< std::string, std::string > &meshDescXML) const
virtual bool writeImpl (const ConversionResultPtr &data) const
bool writeRobotXML (const std::string &robotName, const std::string &content) const
bool writeWorldFileTemplate (const std::string &robotName, const std::string &content) const

Protected Attributes

OutputStructure outStructure

Private Types

typedef urdf2inventor::FileIO
< std::string > 
ParentT

Detailed Description

Reads and writes URDF and GraspIt! files to disk.

Author:
Jennifer Buehler
Date:
October 2015

Definition at line 43 of file FileIO.h.


Member Typedef Documentation

Definition at line 50 of file FileIO.h.

Definition at line 49 of file FileIO.h.

typedef urdf2inventor::FileIO<std::string> urdf2graspit::FileIO::ParentT [private]

Definition at line 46 of file FileIO.h.


Constructor & Destructor Documentation

urdf2graspit::FileIO::FileIO ( const std::string &  _outputDir,
const OutputStructure _outStructure 
) [inline, explicit]
Parameters:
_outputDirdirectory where to save the files. Within this directory, a sub-directory "models/robot/<robotName>" is created, in which all files are saved. Also, within this directory, a file worlds/{robotName}_world.xml is created which can be used as starting point for world files.

Definition at line 57 of file FileIO.h.

urdf2graspit::FileIO::~FileIO ( ) [inline, virtual]

Reimplemented from urdf2inventor::FileIO< std::string >.

Definition at line 61 of file FileIO.h.


Member Function Documentation

std::string urdf2graspit::FileIO::getRobotDir ( const std::string &  robotName) const [protected]

Definition at line 59 of file FileIO.cpp.

bool urdf2graspit::FileIO::initGraspItRobotDir ( const std::string &  robotName,
std::string &  robotDir 
) const [protected]

Creates the standard GraspIt! directory structure for the robot. in the desired output directory (passed in constructor).

Parameters:
robotDirthe path to the robot directory created (on success) will be returned here. This is the root directory where all the files (robot, constact, eigen, etc.) for this robot will be generated.

Definition at line 35 of file FileIO.cpp.

bool urdf2graspit::FileIO::initOutputDirImpl ( const std::string &  robotName) const [protected, virtual]

Copyright (C) 2015 Jennifer Buehler

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Reimplemented from urdf2inventor::FileIO< std::string >.

Definition at line 29 of file FileIO.cpp.

bool urdf2graspit::FileIO::writeContacts ( const std::string &  robotName,
const std::string &  content,
const std::string &  useFilename 
) const

if useName is not empty, use this filename instead of the default determined by OutputStructure set in the constructor.

Definition at line 110 of file FileIO.cpp.

bool urdf2graspit::FileIO::writeEigen ( const std::string &  robotName,
const std::string &  content 
) const [protected]

Definition at line 91 of file FileIO.cpp.

bool urdf2graspit::FileIO::writeGraspitMeshFiles ( const std::map< std::string, std::string > &  meshDescXML) const [protected]

Definition at line 66 of file FileIO.cpp.

bool urdf2graspit::FileIO::writeImpl ( const ConversionResultPtr data) const [protected, virtual]

Reimplemented from urdf2inventor::FileIO< std::string >.

Definition at line 156 of file FileIO.cpp.

bool urdf2graspit::FileIO::writeRobotXML ( const std::string &  robotName,
const std::string &  content 
) const [protected]

Definition at line 126 of file FileIO.cpp.

bool urdf2graspit::FileIO::writeWorldFileTemplate ( const std::string &  robotName,
const std::string &  content 
) const [protected]

Definition at line 141 of file FileIO.cpp.


Member Data Documentation

Definition at line 98 of file FileIO.h.


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


urdf2graspit
Author(s): Jennifer Buehler
autogenerated on Wed May 8 2019 02:53:45