Piping through the flag to parse sensors

This commit is contained in:
mbennice
2018-09-27 09:49:59 -07:00
parent 173cc2538f
commit 30d4c4136a
7 changed files with 10 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ public:
virtual bool loadMJCF(const char* fileName, MJCFErrorLogger* logger, bool forceFixedBase = false);
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false)
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false, int flags = 0)
{
return false;
}

View File

@@ -117,7 +117,7 @@ struct BulletErrorLogger : public ErrorLogger
}
};
bool BulletURDFImporter::loadURDF(const char* fileName, bool forceFixedBase)
bool BulletURDFImporter::loadURDF(const char* fileName, bool forceFixedBase, int flags)
{
if (strlen(fileName) == 0)
return false;
@@ -155,7 +155,7 @@ bool BulletURDFImporter::loadURDF(const char* fileName, bool forceFixedBase)
BulletErrorLogger loggie;
m_data->m_urdfParser.setParseSDF(false);
bool result = m_data->m_urdfParser.loadUrdf(xml_string.c_str(), &loggie, forceFixedBase);
bool result = m_data->m_urdfParser.loadUrdf(xml_string.c_str(), &loggie, forceFixedBase, (flags & CUF_PARSE_SENSORS));
return result;
}

View File

@@ -23,7 +23,7 @@ public:
virtual ~BulletURDFImporter();
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false);
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false, int flags = 0);
//warning: some quick test to load SDF: we 'activate' a model, so we can re-use URDF code path
virtual bool loadSDF(const char* fileName, bool forceFixedBase = false);

View File

@@ -12,7 +12,7 @@ class URDFImporterInterface
public:
virtual ~URDFImporterInterface() {}
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false) = 0;
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false, int flags = 0) = 0;
virtual bool loadSDF(const char* fileName, bool forceFixedBase = false) { return false; }

View File

@@ -1,5 +1,5 @@
#include "UrdfParser.h"
#include "../../ThirdPartyLibs/tinyxml2/tinyxml2.h"
#include "third_party/tinyxml2/tinyxml2.h"
#include "urdfStringSplit.h"
#include "urdfLexicalCast.h"
using namespace tinyxml2;