I’ve jusy installed everything needed, but I meet one strange problem.
I can create Poppy, but I can’t use primitives from code (e.g. dance) in IDE.
But I can activate “dance” through command line.
Example code:
from poppy_humanoid import PoppyHumanoid
from poppy_humanoid.primitives.dance import SimpleBodyBeatMotion
I don’t use PyCharm but I suppose it just execute the script and close the Python Interpreter just after the dance.start().
Add at the end of your code something like
import time
while True:
try:
time.sleep(0.1)
except KeyboardInterrupt:
break
It is just an infinite loop to avoid quitting the Python interpreter. The time.sleep is to avoid using all the available CPU in the loop.
This is just to avoid the closing of python by pycharm at the end of your script. Depend on what you want after the end of your script (quit python or not ?). Anyway, Jupyter is really a good way to talk to Poppy.
It is not a Poppy thing. dance.start() is a not blocking operation (it start a new thread), so you have to do something at the end of the script to avoid closing it immediately. You have to do these things in every programming languages when you manage threads.