Piping through the flag to parse sensors
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user