# Send a Pose as Parameter to an XMLRPC Function

**URL:** <https://forum.universal-robots.com/t/send-a-pose-as-parameter-to-an-xmlrpc-function/6021>\
**Category:** URCap Development\
**Tags:** xml-rpc\
**Created:** [January 8, 2020, 5:50pm UTC](https://forum.universal-robots.com/t/send-a-pose-as-parameter-to-an-xmlrpc-function/6021 "2020-01-08T17:50:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ocohen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ocohen/32/2067_2.png) [@ocohen](https://forum.universal-robots.com/u/ocohen)\
**Post date:** [January 8, 2020, 5:50pm UTC](https://forum.universal-robots.com/t/send-a-pose-as-parameter-to-an-xmlrpc-function/6021/1 "2020-01-08T17:50:58Z")

</div>

I need to send the get\_actual\_tool\_flange\_pose() to my daemon via xmlrpc.

```auto
    pose = get_actual_tool_flange_pose() 
    myDaemon.function(pose)

```

this fails due to “parameter should be a list”

is there anyway to send a pose as a parameter? or at least a convenient way to cast the pose to a list.  
I am aware of the trivial solution below, but was looking for something cleaner:

```auto
pose_list = [pose[0], pose[1], pose[2], pose[3], pose[4], pose[5] ]
myDaemon.function(pose_list)

```

---

<div class="post-metadata">

**Author:** ![m.nagel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.nagel/32/2326_2.png) [@m.nagel](https://forum.universal-robots.com/u/m.nagel)\
**Post date:** [January 8, 2020, 7:15pm UTC](https://forum.universal-robots.com/t/send-a-pose-as-parameter-to-an-xmlrpc-function/6021/2 "2020-01-08T19:15:54Z")

</div>

did you define: _pose_?

eg installation variables  
i\_var\_1 = p[0.0,0.0,0.0,0.0,0.0,0.0]

script  
i\_var\_1 = get\_actual\_tool\_flange\_pose()  
…

log converted to json:  
_{ […], “value”: {“rx”: -0.001221359681592564, “ry”: 3.116276528481975, “rz”: 0.03889191563688683, “y”: -0.4356200608031921, “x”: -0.14396865671352166, “z”: 0.2020300254283846} }_

---

<div class="post-metadata">

**Author:** ![ocohen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ocohen/32/2067_2.png) [@ocohen](https://forum.universal-robots.com/u/ocohen)\
**Post date:** [January 8, 2020, 8:10pm UTC](https://forum.universal-robots.com/t/send-a-pose-as-parameter-to-an-xmlrpc-function/6021/3 "2020-01-08T20:10:04Z")

</div>

Sorry i’m not sure I understand.  
“pose” is defined in this line:  
`pose = get_actual_tool_flange_pose() `  
it is not an installation variable, just a local variable.

---

<div class="post-metadata">

**Author:** ![m.nagel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.nagel/32/2326_2.png) [@m.nagel](https://forum.universal-robots.com/u/m.nagel)\
**Post date:** [January 8, 2020, 9:00pm UTC](https://forum.universal-robots.com/t/send-a-pose-as-parameter-to-an-xmlrpc-function/6021/4 "2020-01-08T21:00:54Z")

</div>

I did a test in URSim 5.6 with the sample: [Communication example with a webservice](https://forum.universal-robots.com/t/sample-communication-example-with-a-webservice/5926)  
It is working with global/local variable.  
How does your daemon look like?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/system/32/1_2.png) [@system](https://forum.universal-robots.com/u/system)\
**Post date:** [January 27, 2021, 2:59am UTC](https://forum.universal-robots.com/t/send-a-pose-as-parameter-to-an-xmlrpc-function/6021/5 "2021-01-27T02:59:50Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
