openTCS / opentcs

The open Transportation Control System (by Fraunhofer IML)
https://www.opentcs.org/
MIT License
324 stars 114 forks source link

A new Web API Wanted #117

Open 1180300601 opened 9 months ago

1180300601 commented 9 months ago

I hope to add a web api, which can set the location of the vehicle according to the vehicle name: [POST] /vehicles/{NAME}

NAME(required): The name of the vehicle to be created. newValue: The position name of the vehicle started.

The Web API function is the same as the Vehicle driver window in the open-TCSKernelControlCenter, whick can set the loopback options of vehicle position. However my java is so poor that i cannot make the API. Plz give me a hand.

1180300601 commented 9 months ago

Maybe I am wrong about what i am saying above:

the API should be [POST] /vehicles/{NAME}/commAdapter/position

NAME(required): The name of the vehicle to be created. newValue: The position name of the vehicle started.

1180300601 commented 9 months ago

image with this API can only make a web app full

swltr commented 9 months ago

@1180300601 I agree that it may be useful to have an endpoint for that in the web API. After all, the Java API also provides a method for that (via VehicleService.sendCommAdapterCommand() and an instance of InitPositionCommand). So we'd basically need a way to send adapter commands via the web API. No promises about when that will be implemented, though.

In the meantime: You can automatically initialize a virtual vehicle on a specific point in the model. See the User's Guide about this. Maybe this is an alternative for you?