Add preliminary PhysX 4.0 backend for PyBullet
Add inverse dynamics / mass matrix code from DeepMimic, thanks to Xue Bin (Jason) Peng Add example how to use stable PD control for humanoid with spherical joints (see humanoidMotionCapture.py) Fix related to TinyRenderer object transforms not updating when using collision filtering
This commit is contained in:
37
examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp
Normal file
37
examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "Shape.h"
|
||||
#include <assert.h>
|
||||
|
||||
bool cShape::ParseShape(const std::string& str, eShape& out_shape)
|
||||
{
|
||||
bool succ = true;
|
||||
if (str == "null")
|
||||
{
|
||||
out_shape = eShapeNull;
|
||||
}
|
||||
else if (str == "box")
|
||||
{
|
||||
out_shape = eShapeBox;
|
||||
}
|
||||
else if (str == "capsule")
|
||||
{
|
||||
out_shape = eShapeCapsule;
|
||||
}
|
||||
else if (str == "sphere")
|
||||
{
|
||||
out_shape = eShapeSphere;
|
||||
}
|
||||
else if (str == "cylinder")
|
||||
{
|
||||
out_shape = eShapeCylinder;
|
||||
}
|
||||
else if (str == "plane")
|
||||
{
|
||||
out_shape = eShapePlane;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Unsupported body shape %s\n", str.c_str());
|
||||
assert(false);
|
||||
}
|
||||
return succ;
|
||||
}
|
||||
Reference in New Issue
Block a user