Access XMLRPC Struct in URScript

Is ist possible to access members of an XMLRPC struct in URScript?

In our Use Case we have something like this:

{
"returnCode":0,
 "returnValueType":"Pose",
 "returnValue":{"x":-0.259182,"y":-0.443102,"z":0.643896,"rx":1.08664,"ry":2.64558,"rz":0.112022}
}

Now we would like to use the Pose in URScript.
Is there a way to do this?

short answer is no, urscript cannot handle lists of various types and therefore cannot handle a dictionary-like object.

however - there is one exception: poses. they can be transferred via xmlrpc with a dictionary-like object, but afaik only on their own. the format in order for urscript to interpret it as a pose is exactly as you have it:
{"x":-0.259182,"y":-0.443102,"z":0.643896,"rx":1.08664,"ry":2.64558,"rz":0.112022}

return that from the xmlrpc server and urscript reads it as a pose.

See here:
https://www.universal-robots.com/articles/ur/interface-communication/xml-rpc-communication/

the zip at the bottom has a python and cpp example that return poses via xmlrpc.

Thanks for the response :+1:

Yes, we have used XMLRPC to provide poses. We hoped since this somehow magically works, that there is some way to also parse maps with different content.

But we will look for a different way :slight_smile: