This recreates pull request #2192
see also pybullet/examples/motorMaxVelocity.py this fixes issue 1444