pybullet_planning icon indicating copy to clipboard operation
pybullet_planning copied to clipboard

fix: allow users to set the physics client correctly

Open logan-dunbar opened this issue 3 years ago • 0 comments

Due to the importing of the module level CLIENT variable, the set_client functionality in shared_const.py does not work, meaning you are unable to set the client that the planning libraries operate on. This means you need to load the planning client first which is a pain and error prone.

I have updated all references of CLIENT to get_client() which gets the correct client from the shared_consts once set_client has been called.

Rather than passing in the physicsClientId to all the pybullet commands, it should instead use the BulletClient class which was designed specifcally for this purpose, but this would have been too drastic a change for this commit.

logan-dunbar avatar Mar 03 '21 16:03 logan-dunbar