[ros-users] TCPROS Header Fields

Ken Conley kwc at willowgarage.com
Thu Jan 27 17:05:44 UTC 2011


On Thu, Jan 27, 2011 at 8:33 AM, Jenkins, Odest Chadwicke
<odest_jenkins at brown.edu> wrote:
> Is it possible to interpret the header fields without using rospy?  My
> interpretation of the original question was that xmlrpclib was being
> used outside of rospy and ROS build environment for custom code that
> can interpret ROS messaging.  Even if my interpretation is off, it
> would still be very interesting to have a description of how to write
> code for sending and interpreting valid ROS messages...  Maybe even a
> protocol specification for interoperating with ROS?  This could be
> helpful for people trying to use ROS with Windows, embedded systems,
> etc.

While it is possible, and easy, to read the connection headers
yourself, I caution against most motivations for doing this.

 * rospy can be used on Window and roscpp support is getting closer
 * there is a complete ROS node implementation for Arduino that James
Bowman is putting the finishing touches on, and other embedded
platforms continue to improve support
 * rospy and roscpp have high and low-level libraries that can be reused

So, while it would be possible to read:

http://www.ros.org/wiki/ROS/Connection%20Header

You could also, in Python, just call
roslib.network.read_ros_handshake_header -- or better, just use the
high-level rospy accessors, because it's highly likely that I will
relocate this internal method in ROS 1.5.

That routine is not particularly difficult to write, but it's not
something we encourage being done in a widespread manner.  Similarly,
the code for deserializing a ROS message is not something that should
be duplicated either, as the current message generators already
provide this code.

We will, in the future, continue to evolve the ROS communication layer
in order to support more scenarios and improve performance.  For
example, the Connection Header format was rewritten a year and a half
ago.  If you reuse the existing libraries for doing this, you have a
greater chance of your code still working as this evolution occurs.
In most scenarios I can envision, you're better off spending effort
making the existing code work with your needs than attempting to
reinvent the wheel.

 - Ken


> -Chad
>
> Date: Tue, 25 Jan 2011 07:24:52 -0800
> From: Ken Conley <kwc at willowgarage.com>
> Subject: Re: [ros-users] TCPROS Header Fields
> To: User discussions <ros-users at code.ros.org>
> Message-ID:
>       <AANLkTimR6T9_KW8xkEXfJP9z4K_M_naqJcHeAdStdy+m at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> In rospy, the subscriber can read this field using the
> _connection_header field of a message.  See bottom of:
>
> http://www.ros.org/wiki/rospy/Overview/Publishers%20and%20Subscribers
>
>  - Ken
>
> On Tue, Jan 25, 2011 at 2:41 AM, safdar_zaman <safdaraslam at yahoo.com> wrote:
>>
>> Hi all,
>> I have access and can read ROS SytemStatus through xmlrpclib. Now I want to
>> write code to read "TCPROS Header Fields" explained on
>> http://www.ros.org/wiki/ROS/Connection%20Header but I did not find any clue
>> about it :-(
>> Did any one try to read in these fields? any clue please?
>> thanks and regards,
>> --
>> View this message in context: http://ros-users.122217.n3.nabble.com/TCPROS-Header-Fields-tp2328063p2328063.html
>> Sent from the ROS-Users mailing list archive at Nabble.com.
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list