add --serial option in premake, added serial library to test vr glove in C++ (pybullet works already fine)
This commit is contained in:
@@ -506,6 +506,22 @@ bool b3RobotSimulatorClientAPI::resetBaseVelocity(int bodyUniqueId, const b3Vect
|
||||
return true;
|
||||
}
|
||||
|
||||
void b3RobotSimulatorClientAPI::setInternalSimFlags(int flags)
|
||||
{
|
||||
if (!isConnected())
|
||||
{
|
||||
b3Warning("Not connected");
|
||||
return;
|
||||
}
|
||||
{
|
||||
b3SharedMemoryCommandHandle command = b3InitPhysicsParamCommand(m_data->m_physicsClientHandle);
|
||||
b3SharedMemoryStatusHandle statusHandle;
|
||||
b3PhysicsParamSetInternalSimFlags(command, flags);
|
||||
statusHandle = b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, command);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void b3RobotSimulatorClientAPI::setRealTimeSimulation(bool enableRealTimeSimulation)
|
||||
{
|
||||
if (!isConnected())
|
||||
|
||||
@@ -17,6 +17,15 @@ struct b3RobotSimulatorLoadUrdfFileArgs
|
||||
bool m_useMultiBody;
|
||||
int m_flags;
|
||||
|
||||
b3RobotSimulatorLoadUrdfFileArgs(const b3Vector3& startPos, const b3Quaternion& startOrn)
|
||||
: m_startPosition(startPos),
|
||||
m_startOrientation(startOrn),
|
||||
m_forceOverrideFixedBase(false),
|
||||
m_useMultiBody(true),
|
||||
m_flags(0)
|
||||
{
|
||||
}
|
||||
|
||||
b3RobotSimulatorLoadUrdfFileArgs()
|
||||
: m_startPosition(b3MakeVector3(0, 0, 0)),
|
||||
m_startOrientation(b3Quaternion(0, 0, 0, 1)),
|
||||
@@ -172,6 +181,8 @@ public:
|
||||
|
||||
void setRealTimeSimulation(bool enableRealTimeSimulation);
|
||||
|
||||
void setInternalSimFlags(int flags);
|
||||
|
||||
void setGravity(const b3Vector3& gravityAcceleration);
|
||||
|
||||
void setTimeStep(double timeStepInSeconds);
|
||||
|
||||
@@ -98,6 +98,12 @@ if not _OPTIONS["no-enet"] then
|
||||
"../TinyAudio/RtAudio.cpp",
|
||||
}
|
||||
defines {"B3_ENABLE_TINY_AUDIO"}
|
||||
|
||||
if _OPTIONS["serial"] then
|
||||
defines{"B3_ENABLE_SERIAL"}
|
||||
includedirs {"../../examples/ThirdPartyLibs/serial/include"}
|
||||
links {"serial"}
|
||||
end
|
||||
|
||||
if os.is("Windows") then
|
||||
links {"winmm","Wsock32","dsound"}
|
||||
|
||||
Reference in New Issue
Block a user