HTTP API

Hi,

Is it possible to have a HTTP API for remote control ?

For example InMoov could be remote over internet.

Thanks

Mats's picture

Yes. It already exists

I think this is what you are looking for:

http://myrobotlab.org/content/myrobotlab-api

/Mats

dom14's picture

Ok thank you.

Ok thank you.

Do you have an example to do speaking InMoov ?

HTTP://120.0.0.1:7777/api/speak=say%20something.

 

 

Mats's picture

Speech from the browser

Just to give a simple example of how to use the REST API. Turn on your speaker then try this:

1. Start MRL.

2. Start WebGui ( if it's not started automatically ).

3, Start a MarySpeech service and name it Speech

4. In the browser window copy and paste this link

http://localhost:8888/api/services/Speech/speakBlocking/%22Hi%20Dom%2014%22

Tada... Bells and wistles.... You have now called the speakBlocking method in the Speech service with the parameter "Hi Dom14"

And you can do the same thing with any service.

/Mats

dom14's picture

Perfect, thank you very

Perfect, thank you very much. 

Just only one question again: Is it possible to see video capture in the browser ?

The PORT value is always 8888 ?

Dom.

Mats's picture

Video capture in the browser

Yes

There is a streaming server connected to OpenCV. 

So start the OpenCV service and press the Capture button.

The video widget should show up in the OpenCV service tab in the WebGui. You may have to do a refresh.

You can also reach it with this address:

http://localhost:9090/input

At least in all my tests, the port has been 8888. Except if I run more than one instance of MRL on the same host. 

I'm not sure if it's configurable and if other ports are used.  

And the video widget uses port 9090 as you can see in the example.

 

 

dom14's picture

Thank you, works very well.

Thank you, works very well.