ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Please help with requestTopic in ROS XMLRPC Slave API

asked 2014-06-03 21:03:03 -0500

unknown_entity1 gravatar image

updated 2014-06-03 21:05:37 -0500

Is it possible somebody who has a functional UDP Subscriber implemented can perform a Wireshark trace on the XML in the XMLRPC call and post it as the answer to this question?

It will help me out greatly, as I will be able to cross reference what my client is sending vs what is supposed to be sent.

My Java client calls requestTopic by passing in an array of String Protocol names (I am aware the ROS Java client does not support UDPROS, this is a different client). If I pass in using TCPROS, followed by UDPROS, then XMLRPC returns correct protocol information on TCPROS the default protocol. If I reverse the order, or only specify UDPROS, ROS returns an Unknown Error message. I've traced it back to a ROS cpp method called requestTopicCallback (or something like that, I was debugging this morning, and may be off on the exact method name).

All help will be appreciated!

Sincerely,

Aaron

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-06-04 13:00:45 -0500

ahendrix gravatar image

The only UDP client that I'm aware of is roscpp. You should be able to run the unreliable node from the tutorials package and capture the output you're looking for yourself:

rosrun roscpp_tutorials listener_unreliable
edit flag offensive delete link more

Comments

Thank you ahendrix! That is exactly what I needed! Aaron

unknown_entity1 gravatar image unknown_entity1  ( 2014-06-04 22:19:11 -0500 )edit

I spoke to soon. The stack trace shows that requestTopic is passing in TCPROS as the protocol. I wonder why the UDPROS example is running TCPROS? POST / HTTP/1.1 User-Agent: XMLRPC++ 0.7 Host: thyatira:46487 Content-Type: text/xml Content-length: 302 <methodcall><methodname>requestTopic</methodname> <params><value>/rosout</value><value>/rosout</value><value><array><data><value><array><data><value>TCPROS</value></data></array></value></data></array></value></params></methodcall>

unknown_entity1 gravatar image unknown_entity1  ( 2014-06-04 23:31:35 -0500 )edit
0

answered 2014-06-08 22:26:10 -0500

unknown_entity1 gravatar image

updated 2014-06-14 22:38:02 -0500

Update: Unknown Error XMLRPC message on requestTopic for UDPROS is caused by invalid base64 UDPROS connection header.

@ahendrix - reading the roscpp tutorials, generating talker and listener, then replacing listener with unreliable_listener did the trick. I did not understand the prerequisites of your suggestion, but after a few hours of research I came up with the following Request and Response for requestTopic on XMLRPC for UDPROS (Now I know why multiple implementers have built the UDPROS, and not finished them. The state of my client the last year was hung up on the missing requestTopic documentation that is required to establish a connection on the UDPROS Clients components I wrote. I hope this helps other ROS Client implementers - if you decode the base64 you will discover it is the typical connection header parameters from TCPROS Protocol being passed in as base 64 String. Behavior Note: The Subscriber port is connected to from the Publisher, and in the test I performed the Publisher Port did not match the response port provided by the Publisher in the XMLRPC Request):

POST / HTTP/1.1 User-Agent: XMLRPC++ 0.7 Host: thyatira:46120 Content-Type: text/xml Content-length: 590

<?xml version="1.0"?> <methodCall><methodName>requestTopic</methodName> <params><param><value>/listener_unreliable</value></param><param><value>/chatter</value></param><param><value><array><data><value><array><data><value>UDPROS</value><value><base64>HQAAAGNhbGxlcmlkPS9saXN0ZW5lcl91bnJlbGlhYmxlJwAAAG1kNXN1bT05OTJjZThhMTY4 N2NlYzhjOGJkODgzZWM3M2NhNDFkMQ4AAAB0b3BpYz0vY2hhdHRlchQAAAB0eXBlPXN0ZF9t c2dzL1N0cmluZw==</base64></value><value>thyatira</value><value><i4>39861</i4></value><value><i4>1500</i4></value></data></array></value></data></array></value></param></params></methodCall>

HTTP/1.1 200 OK Server: XMLRPC++ 0.7 Content-Type: text/xml Content-length: 569

<?xml version="1.0"?> <methodResponse><params><param> <value><array><data><value><i4>1</i4></value><value></value><value><array><data><value>UDPROS</value><value>thyatira</value><value><i4>33184</i4></value><value><i4>1</i4></value><value><i4>1500</i4></value><value><base64>EAAAAGNhbGxlcmlkPS90YWxrZXInAAAAbWQ1c3VtPTk5MmNlOGExNjg3Y2VjOGM4YmQ4ODNl YzczY2E0MWQxHwAAAG1lc3NhZ2VfZGVmaW5pdGlvbj1zdHJpbmcgZGF0YQoOAAAAdG9waWM9 L2NoYXR0ZXIUAAAAdHlwZT1zdGRfbXNncy9TdHJpbmc=</base64></value></data></array></value></data></array></value> </param></params></methodResponse>

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-06-03 21:03:03 -0500

Seen: 874 times

Last updated: Jun 14 '14