Lightweight remote python enquiry to gazebo object pose?
I am happily running gazebo with robots in a multi vm environment hosted remotely.
Gzweb interface works great for general inspection and control.
However I have a local python script that I want to enquire the pose of an object with the gazebo world space coordinates. My local machine needs to stay as thin a client as possible, I can't be joining as a ros node within the overall ecosystem.
I assume there are reasonable rest api or web socket methodologies to support gzweb, so if I want a thin method to to enquire of an objects pose without being "in ROS" what documentation should I be reading?
I am generally happy to go spelunking and spin up a proof of concept, but being pointed at a sensible approach will really help.
Any help appreciated, thanks
Changed Gazebo tag to 11
I currently have a solution, leveraging GZWeb on the host system and sending the following over port 7070
ws.send( '{"op":"subscribe","id":"subscribe:~/scene:3","type":"scene","topic":"~/scene","compression":"none","throttle_rate":0}')
and sniffing the responses until I see
if z["topic"] == "~/scene":
result = z["msg"]
But this gives me the full scene tree, and I would like to really be able to get the pose of a specific element and none of its children. The base link of the robot of interest has a lot of children!
In my specific use case this response is ~250K for a few bytes of information.
My "solution" works for the incidental use case, but I would like to be more gracefull.
Noting I cannot use remote access to ros via roslibpy as the standard ros traffic is firewalled away.