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

Use of TCP/IP Protocol under ROS

asked 2011-03-17 03:17:23 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi all,

I am kind of new in ROS (well … finished the turtlesim tutorial though :-D…) and currently trying to get functional a new stack to control an arm-robot through TCP/IP.

I understand that ROS allows us to communicate using the TCP/IP protocol and that there is some kind of library called TCPROS which can be implemented to do so (explained in http://www.ros.org/wiki/ROS/TCPROS.

I was wondering if anybody already implemented it, or if there were any existing packages I could get inspiration from.

Cheers,

Gael

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted
2

answered 2011-03-17 03:54:39 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

All of the ROS client libraries (e.g. roscpp, rospy) implement this protocol for you. I probably wouldn't recommend reimplementing TCPROS as first step in getting used to ROS. You should be able to write a program using one of the client libraries.

FYI: I would also look for existing packages that may already implement drivers for your hardware here:

http://www.ros.org/browse/list.php

edit flag offensive delete link more

Comments

We are currently working on the hardware part, so I don't think there is any packages that have been implemented to control our hardware. Anyway i'm sur there are already packages already implemented to allow TCP/IP communication. I cannot find any of those.
Gael gravatar image Gael  ( 2011-03-17 04:33:46 -0500 )edit
I did not know the protocol was implemented in roscpp library. Is there any information about this you could give me ?
Gael gravatar image Gael  ( 2011-03-17 04:35:27 -0500 )edit
1

answered 2011-03-17 03:54:34 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Could you describe your setup a little bit more? Do you have a embedded board or PC on connected to the arm and you want to connect to it from a different PC (similar question)? Or is the communication protocol of the low-level arm interface based on a TCP/IP communication protocol (like KUKA FRI for example)?

edit flag offensive delete link more

Comments

The ROS GUI is running on the host PC (Ubuntu). The Targets are a couple of Embedded Boards (DSPs which control the arm), all communicating with the host PC through a hub using TCP/IP. I'm interrest to implement the ROS part of the TCP/IP communication.
Gael gravatar image Gael  ( 2011-03-17 04:28:28 -0500 )edit
0

answered 2011-03-17 04:35:03 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Gael,

One of the main point of ROS is to enable distributed architectures easily. It therefore makes use of TCPROS to make inter-process communication transparent to the programmer. I.e. if your node runs on your local machine or on a machine at the other side of the world, your code stays the same. This is realized via the publisher/subscriber paradigm. A bit like CORBA if I am not wrong.

In your case, you want to have two nodes collaborating together:

  • One node that is the driver for your arm: It speaks with the arm hardware, subscribes to command topics, and broadcasts the internal state(s) of your arm.
  • One node that acts as a remote interface for your arm: It reacts to user inputs, subscribes to the internal arm state topic(s) and broadcast commands to your arm.

Check the Cturtle tutorial on writting subscriber and broadcasters.

As Koen and Ken advise, you should have a look at the existing arm packages and inspire from them.

Raph

edit flag offensive delete link more

Comments

Yes, I'm focussing on the node which drive the arm (node which communicate with the hardware). And I understand the publisher/subscriber paradigm. I am looking for the way to express the node how to communicate with the hardware (through TCP/IP).
Gael gravatar image Gael  ( 2011-03-17 04:44:07 -0500 )edit
-1

answered 2011-03-17 04:59:09 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

@kwc

About roscpp, I found this wiki about RosCPP Publishers and Subscribers.

http://www.ros.org/wiki/roscpp/Overview/Publishers%20and%20Subscribers#Publishing_to_a_Topic

" transport_hints

The transport hints allow you to specify hints to roscpp's transport layer. This lets you specify things like preferring a UDP transport, using tcp nodelay, etc."

I will try to find more on that and get something working.

Thanks all,

Gael

edit flag offensive delete link more

Comments

@Gael: you shouldn't have to write to TCPROS directly. roscpp does that for you. Think of it like a web server -- it does all the TCP/IP for you. Just follow the tutorials for writing a node, and you're set.
kwc gravatar image kwc  ( 2011-03-17 05:07:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2011-03-17 03:17:23 -0500

Seen: 8,203 times

Last updated: Mar 17 '11