Skip to content

pcdangio/ros-driver_tcpip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

driver_tcpip

A ROS package that provides a driver node for TCP/IP communications outside of ROS. It enables sending TCP and/or UDP packets over an existing network interface.

Author: Paul D'Angio, pcdangio@gmail.com

License: MIT

Contents:

  1. Installation: Instructions for downloading and building this package.
  2. Usage: How to use the node.

1: Installation

1.1: Dependencies

1.2: Building

To build from source, clone the latest version from this repository into your catkin workspace and compile the package using

cd catkin_workspace/src
git clone https://github.com/pcdangio/ros-driver_tcpip.git driver_tcpip
cd ../
catkin_make

2: Usage

2.1: Running the Node

Run the driver with the following command:

rosrun driver_tcpip driver_tcpip

2.2: Services

Service Type Description
~/resolve_ip driver_tcpip_msgs/resolve_ip Resolves the IP address of a specified hostname.
~/start_tcp_server driver_tcpip_msgs/start_tcp_server Starts a new TCP server on a specified local endpoint. The server will create new TCP sockets for incoming connections.
~/stop_tcp_server driver_tcpip_msgs/stop_tcp_server Stops an active TCP server.
~/start_tcp_client driver_tcpip_msgs/start_tcp_client Starts a new TCP client on a specified local endpoint. The client will attempt to connect to the specified remote endpoint.
~/stop_tcp_client driver_tcpip_msgs/stop_tcp_client Stops an active TCP client.
~/open_udp_socket driver_tcpip_msgs/open_udp_socket Opens a UDP socket at a specified local endpoint.
~/close_socket driver_tcpip_msgs/close_socket Closes the specified TCP or UDP socket.

2.3: Published Topics

Topic Type Description
~/status driver_tcpip_msgs/status Indicates the current status of all active TCP servers, TCP clients, and open TCP/UDP sockets.

2.4: Data Transmission

When a TCP or UDP socket is opened, special topics and services are created that allow sending and receiving data through the socket. Each socket is assigned a unique ID, referenced as {SOCKET_ID} in the tables below.

TCP:

Topic/Service Type Description
~/sockets/{SOCKET_ID}/tx driver_tcpip_msgs/send_tcp A service that sends a TCP packet over the socket specified by {SOCKET_ID}. The service succeeds only if the TCP message was sent and recieved.
~/sockets/{SOCKET_ID}/rx driver_tcpip_msgs/tcp_packet Published any time a new TCP packet is received from the socket specified by {SOCKET_ID}

UDP:

Topic Type Description
~/sockets/{SOCKET_ID}/tx driver_tcpip_msgs/udp_packet A subscriber that sends a packet of data over the UDP socket specified by {SOCKET_ID}.
~/sockets/{SOCKET_ID}/rx driver_tcpip_msgs/udp_packet Published any time a new UDP packet is received from the socket specified by {SOCKET_ID}

About

A ROS driver for TCP/IP modems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published