ROSbridge: "Service does not exist"
I am trying to call the service /cac/GetMapInfo
in a stage simulator from ROSbridge in a simple test program:
from websocket import create_connection
import json
test_json3 = {
"op": "call_service",
"service": "cac/GetMapInfo"
}
test_json = json.dumps(test_json3)
ws = create_connection("ws://localhost:9090")
ws.send(test_json)
while(1):
print(ws.recv()) # print what ever is published on topic
However, the websocket returns this:
call_service InvalidServiceException: Service /cac/GetMapInfo does not exist
Running the script results in:
{"values": "Service /cac/GetMapInfo does not exist", "result": false, "service": "cac/GetMapInfo", "op": "service_response"}
But when I run rossrv list | grep cac
, the service does exist. Am I missing something? Calling topics through ROSbridge works just fine.
Asked by mneumann on 2018-09-21 02:47:39 UTC
Comments
what is the service called? is it
/cac/getMapInfo
as written in the first line or/cac/GetMapInfo
as in your code. This is case sensitive!Also, the error message about
/cac/getBatteryStatus
is probably a c'n'p error, or not?Asked by mgruhler on 2018-09-21 03:59:47 UTC
Yes, I have multiple services I tried to call, all in the same
cac
package. I tried both/cac/GetMapInfo
as well as/cac/getMapInfo
. Further, I triedcac/GetMapInfo
as well, and none of them worked. I edited my post to avoid confusion.Asked by mneumann on 2018-09-21 04:02:06 UTC
Please show us the output of
rosservice list | grep cac
.Asked by gvdhoorn on 2018-09-21 05:44:48 UTC