google-research / ravens

Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet. Transporter Nets, CoRL 2020.
https://transporternets.github.io
Apache License 2.0
562 stars 97 forks source link

pybullet.error: Not connected to physics server #2

Closed leeivan1007 closed 3 years ago

leeivan1007 commented 3 years ago

I run the code

python ravens/demos.py --assets_root=./ravens/environments/assets/ --disp=True --task=block-insertion --mode=test --n=100

When disp is True, the p.SHARED_MEMORY is True.

client = p.connect(p.SHARED_MEMORY if disp else p.DIRECT)

then run

`file_io = p.loadPlugin('fileIOPlugin', physicsClientId=client)

` print 'pybullet.error: Not connected to physics server.' )

Something should I run first? Maybe other physics server.

image

andyzeng commented 3 years ago

Thanks for the catch. Swap for p.SHARED_MEMORY for p.GUI. We'll add a hotfix. If you'd still like to run with shared memory, run python3 -m pybullet_utils.runServer in a separate terminal window.

leeivan1007 commented 3 years ago

Now it look like great, thank you!