From 06b695e0512baeb4db0958cb08f4e47236e9da44 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 14 Sep 2017 08:08:24 -0700 Subject: [PATCH 1/2] remove some warning ,see also Pull Request #302 bump up pybullet version --- setup.py | 2 +- src/Bullet3Common/b3Vector3.h | 1 - src/LinearMath/btVector3.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 5cae36c27..b47b95c39 100644 --- a/setup.py +++ b/setup.py @@ -440,7 +440,7 @@ print("-----") setup( name = 'pybullet', - version='1.4.0', + version='1.4.2', description='Official Python Interface for the Bullet Physics SDK specialized for Robotics Simulation and Reinforcement Learning', long_description='pybullet is an easy to use Python module for physics simulation, robotics and deep reinforcement learning based on the Bullet Physics SDK. With pybullet you can load articulated bodies from URDF, SDF and other file formats. pybullet provides forward dynamics simulation, inverse dynamics computation, forward and inverse kinematics and collision detection and ray intersection queries. Aside from physics simulation, pybullet supports to rendering, with a CPU renderer and OpenGL visualization and support for virtual reality headsets.', url='https://github.com/bulletphysics/bullet3', diff --git a/src/Bullet3Common/b3Vector3.h b/src/Bullet3Common/b3Vector3.h index 50504c7f7..16ec02b0e 100644 --- a/src/Bullet3Common/b3Vector3.h +++ b/src/Bullet3Common/b3Vector3.h @@ -1095,7 +1095,6 @@ public: if (m_floats[3] > maxVal) { maxIndex = 3; - maxVal = m_floats[3]; } return maxIndex; diff --git a/src/LinearMath/btVector3.h b/src/LinearMath/btVector3.h index 8d0b73f88..fdf3fd796 100644 --- a/src/LinearMath/btVector3.h +++ b/src/LinearMath/btVector3.h @@ -1159,7 +1159,6 @@ public: if (m_floats[3] > maxVal) { maxIndex = 3; - maxVal = m_floats[3]; } return maxIndex; From 2e7c0cef38b751a3ca1d82efc75251b1e2806e33 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 14 Sep 2017 15:39:22 -0700 Subject: [PATCH 2/2] pybullet/C-API: fix width/height when getCameraImage has a fallback from OpenGL hardware to TinyRenderer --- .../PhysicsServerCommandProcessor.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index db318f056..1a1b13275 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -3477,21 +3477,12 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm - if ((clientCmd.m_updateFlags & ER_BULLET_HARDWARE_OPENGL)!=0) - { - //m_data->m_guiHelper->copyCameraImageData(clientCmd.m_requestPixelDataArguments.m_viewMatrix,clientCmd.m_requestPixelDataArguments.m_projectionMatrix,0,0,0,0,0,width,height,0); - } - else - { - if ((clientCmd.m_requestPixelDataArguments.m_startPixelIndex==0) && + if ((clientCmd.m_requestPixelDataArguments.m_startPixelIndex==0) && (clientCmd.m_updateFlags & REQUEST_PIXEL_ARGS_SET_PIXEL_WIDTH_HEIGHT)!=0) - { + { m_data->m_visualConverter.setWidthAndHeight(clientCmd.m_requestPixelDataArguments.m_pixelWidth, clientCmd.m_requestPixelDataArguments.m_pixelHeight); - } - m_data->m_visualConverter.getWidthAndHeight(width,height); - } - + } int numTotalPixels = width*height;