Open jmugan opened 1 year ago
I couldn't get it running on my mac either. I guess I need more handholding than
$ git clone https://github.com/splintered-reality/py_trees_js
$ code .
# Reopen the project in the devcontainer
$ poetry install
$ poetry shell
$ py-trees-demo-viewer
Maybe the "Reopen the project in the devcontainer" is where I'm doing something wrong. Maybe I'm doing that from the wrong spot. On WSL2, a dialog popped up and I clicked it, which led to the error. On mac, there was no dialog but I could go to the command pallet. But then it asked me which environment to use, so I was probably in the wrong place. I chose Anaconda, and when I got in the container and tried to do poetry install
it said that poetry
itself wasn't installed. So I probably was in the wrong container and/or in the wrong place and a configuration file was not read.
If someone happens to have a link to run this for dummies I would appreciate it.
If you miss the Reopen in Container
dialog on opening the project in vscode, just hit CTRL-SHIFT-P
and search for Reopen in Container
.
Incidentally, make sure you open vscode in the root of the project otherwise it'll be trying to construct a container for you. If it's asking you about Anaconda, this may have been what happened.
Also, you need to go back farther in the devcontainer log to find the root cause of the error.
Having said all that, the py_trees_js
devcontainer requires an nvidia gpu on your PC and the nvidia docker container toolkit installed otherwise the devcontainer will fail at the --runtime=nvidia
section in .devcontainer/devcontainer.json
. I need to expound on this in the README. If you don't have nvidia, some options:
py_trees_js
and run it from thatdesktop-lite
feature. That might be sufficient. If you get that working, send me a PR.Additionally, I've never tested this devcontainer workflow on windows (WSL2). It may be another problem getting in the way.
$ git clone https://github.com/splintered-reality/py_trees_js
$ code .
You're definitely not in the root of the repo with those two commands. That means it's not finding the py_trees_js/.devcontainer
folder and so it's trying to create a devcontainer for you. You need:
$ git clone https://github.com/splintered-reality/py_trees_js
$ cd py_trees_js
$ code .
My bad, fixing the README for you now.
Thanks! I'll keep working on it.
@jmugan Were you able to get this to run on your Mac? I cant seem to get it to work.
No, I wasn't able to get it to work. I'm not familiar with this devcontainer stuff, so I was probably just missing something obvious.
@stonier I am using py-trees for my starcraft 2 ai bot. I was thinking I would like a separate window which could display the state of the tree as i am debugging my bot in a match.
To do this, was thinking I could load up the generic viewer (I did get a viewer to pop up on a Ubuntu VM). Then from my python bot code, stream the tree info to the viewer so I could look at the tree and maybe the blackboard.
Do you think this is doable? It wouldnt matter to me if I used the qt5, but a web app would probably be a little easier long term.
Hi, when I try to open the devcontainer it just says
Command failed: /home/jmugan/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /home/jmugan/.vscode-remote-containers/dist/dev-containers-cli-0.304.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-e40d94c9-6993-4d24-a69b-63373eef68c91693356895066 --workspace-folder /home/jmugan/py_trees_js --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\wsl.localhost\Ubuntu\home\jmugan\py_trees_js --id-label devcontainer.config_file=/home/jmugan/py_trees_js/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/jmugan/py_trees_js/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=/mnt/wslg/runtime-dir/wayland-0,target=/tmp/vscode-wayland-65849148-7d20-472c-8896-2e63c7ec3a0b.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
Any ideas what I might be doing wrong?