Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Using Server with VS Code PDDL Extension #177

Open
delislice opened this issue Dec 28, 2023 · 5 comments
Open

Problem Using Server with VS Code PDDL Extension #177

delislice opened this issue Dec 28, 2023 · 5 comments

Comments

@delislice
Copy link

Hello. This is a wonderful project, but I am struggling to figure out how to integrate the planutils server with the VS Code PDDL extension. In the extension you are allowed to specify a configuration for a planner such as:

    "pddl.planners": [
        {
            "title": "LAMA",
            "kind": "lama",
            "url": "http://localhost:5555/solve",
            "canConfigure": true,
            "syntax": "$(planner) $(domain) $(problem) $(options) "
        }
    ],
    "pddl.selectedPlanner": "LAMA"

I understand that planner endpoints are configured in the manifest.json files that come with every planner such as lama, but I am always getting a 404 from the server when I try to generate a plan using my configuration. Could anyone provide an example of how to use the planutils server with either the VS Code PDDL extension or just a generic client? An example would help me a lot. Thank you!

@delislice
Copy link
Author

cc @jan-dolejsi

@haz
Copy link

haz commented Dec 28, 2023

Did you start the planutils server separately on your own machine?

@delislice
Copy link
Author

Yes, I started the planutils server on my machine with the following configuration:

Docker:

FROM aiplanning/planutils:latest

# Install solvers and tools
RUN planutils install -y val
RUN planutils install -y planning.domains
RUN planutils install -y popf
RUN planutils install -y optic
RUN planutils install -y smtplan
RUN planutils install -y tfd

RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y python3-dev python3-pip
RUN python3 -m pip install flask

# Start server
EXPOSE 5555
CMD planutils server --port 5555 --host 0.0.0.0

Bash

docker run \
  --name $CONTAINER_NAME \
  --rm --init --privileged -p 5555:5555 \
  -t $IMAGE_NAME 

I see responses in the Docker terminal like this:

[28/Dec/2023 21:13:31] "GET /solve HTTP/1.1" 404 -

@haz
Copy link

haz commented Dec 28, 2023

Ah, I see. That's using the old solver interface. It should be the planning as a service interface used with planutils

@delislice
Copy link
Author

Oh! I didn't even realize this was outdated, haha. I will give planning as a service a shot. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants