Fixing a bug on Visualizer Camera and a few more

- resetDebugVisualizerCamera now accepts negative values for pitch and
yaw angles

- Defining kitchen model to be concave, so as to be able to put floating
objects inside

- Fixed an indention error in testrender_np.py
This commit is contained in:
Mohi
2017-03-13 10:38:02 -07:00
parent bd3009a5eb
commit 43b0a8b6fb
3 changed files with 178 additions and 178 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -3055,8 +3055,8 @@ static PyObject* pybullet_configureDebugVisualizer(PyObject* self, PyObject* arg
static PyObject* pybullet_resetDebugVisualizerCamera(PyObject* self, PyObject* args, PyObject *keywds) static PyObject* pybullet_resetDebugVisualizerCamera(PyObject* self, PyObject* args, PyObject *keywds)
{ {
float cameraDistance = -1; float cameraDistance = -1;
float cameraYaw = -1; float cameraYaw = 35;
float cameraPitch = -1; float cameraPitch = 50;
PyObject* cameraTargetPosObj=0; PyObject* cameraTargetPosObj=0;
int physicsClientId = 0; int physicsClientId = 0;
@@ -3076,7 +3076,7 @@ static PyObject* pybullet_resetDebugVisualizerCamera(PyObject* self, PyObject* a
{ {
b3SharedMemoryCommandHandle commandHandle = b3InitConfigureOpenGLVisualizer(sm); b3SharedMemoryCommandHandle commandHandle = b3InitConfigureOpenGLVisualizer(sm);
if ((cameraDistance>=0) && (cameraYaw>=0) && (cameraPitch>=0)) if ((cameraDistance>=0))
{ {
float cameraTargetPosition[3]; float cameraTargetPosition[3];
if (pybullet_internalSetVector(cameraTargetPosObj,cameraTargetPosition)) if (pybullet_internalSetVector(cameraTargetPosObj,cameraTargetPosition))

View File

@@ -44,7 +44,7 @@ for pitch in range (0,360,10) :
#note that sending the data to matplotlib is really slow #note that sending the data to matplotlib is really slow
plt.imshow(rgb,interpolation='none') plt.imshow(rgb,interpolation='none')
plt.pause(0.001) plt.pause(0.001)
main_stop = time.time() main_stop = time.time()