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:
File diff suppressed because it is too large
Load Diff
@@ -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))
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ for pitch in range (0,360,10) :
|
|||||||
print ('width = %d height = %d' % (w,h))
|
print ('width = %d height = %d' % (w,h))
|
||||||
|
|
||||||
#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()
|
||||||
|
|||||||
Reference in New Issue
Block a user