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 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;
|
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)
|
if (strlen(fileName) == 0)
|
||||||
return false;
|
return false;
|
||||||
@@ -155,7 +155,7 @@ bool BulletURDFImporter::loadURDF(const char* fileName, bool forceFixedBase)
|
|||||||
|
|
||||||
BulletErrorLogger loggie;
|
BulletErrorLogger loggie;
|
||||||
m_data->m_urdfParser.setParseSDF(false);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
virtual ~BulletURDFImporter();
|
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
|
//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);
|
virtual bool loadSDF(const char* fileName, bool forceFixedBase = false);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class URDFImporterInterface
|
|||||||
public:
|
public:
|
||||||
virtual ~URDFImporterInterface() {}
|
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; }
|
virtual bool loadSDF(const char* fileName, bool forceFixedBase = false) { return false; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "UrdfParser.h"
|
#include "UrdfParser.h"
|
||||||
#include "../../ThirdPartyLibs/tinyxml2/tinyxml2.h"
|
#include "third_party/tinyxml2/tinyxml2.h"
|
||||||
#include "urdfStringSplit.h"
|
#include "urdfStringSplit.h"
|
||||||
#include "urdfLexicalCast.h"
|
#include "urdfLexicalCast.h"
|
||||||
using namespace tinyxml2;
|
using namespace tinyxml2;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using grpc::Channel;
|
|||||||
#include "Bullet3Common/b3AlignedObjectArray.h"
|
#include "Bullet3Common/b3AlignedObjectArray.h"
|
||||||
#include "SharedMemory/grpc/ConvertGRPCBullet.h"
|
#include "SharedMemory/grpc/ConvertGRPCBullet.h"
|
||||||
|
|
||||||
using pybullet_grpc::PyBulletAPI;
|
using pybullet_grpc::grpc::PyBulletAPI;
|
||||||
|
|
||||||
static unsigned int b3DeserializeInt2(const unsigned char* input)
|
static unsigned int b3DeserializeInt2(const unsigned char* input)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
|
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
|
||||||
#include "Bullet3Common/b3HashMap.h"
|
#include "Bullet3Common/b3HashMap.h"
|
||||||
#include "../Utils/ChromeTraceUtil.h"
|
#include "../Utils/ChromeTraceUtil.h"
|
||||||
#include "stb_image/stb_image.h"
|
#include "third_party/stblib/stb_image.h"
|
||||||
#include "BulletInverseDynamics/MultiBodyTree.hpp"
|
#include "BulletInverseDynamics/MultiBodyTree.hpp"
|
||||||
#include "IKTrajectoryHelper.h"
|
#include "IKTrajectoryHelper.h"
|
||||||
#include "btBulletDynamicsCommon.h"
|
#include "btBulletDynamicsCommon.h"
|
||||||
@@ -1990,7 +1990,7 @@ struct ProgrammaticUrdfInterface : public URDFImporterInterface
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false)
|
virtual bool loadURDF(const char* fileName, bool forceFixedBase = false, int flags = 0)
|
||||||
{
|
{
|
||||||
b3Assert(0);
|
b3Assert(0);
|
||||||
return false;
|
return false;
|
||||||
@@ -3014,7 +3014,7 @@ bool PhysicsServerCommandProcessor::loadUrdf(const char* fileName, const btVecto
|
|||||||
|
|
||||||
BulletURDFImporter u2b(m_data->m_guiHelper, m_data->m_pluginManager.getRenderInterface(), globalScaling, flags);
|
BulletURDFImporter u2b(m_data->m_guiHelper, m_data->m_pluginManager.getRenderInterface(), globalScaling, flags);
|
||||||
u2b.setEnableTinyRenderer(m_data->m_enableTinyRenderer);
|
u2b.setEnableTinyRenderer(m_data->m_enableTinyRenderer);
|
||||||
bool loadOk = u2b.loadURDF(fileName, useFixedBase);
|
bool loadOk = u2b.loadURDF(fileName, useFixedBase, flags);
|
||||||
|
|
||||||
if (loadOk)
|
if (loadOk)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user