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

Revision history [back]

click to hide/show revision 1
initial version

Will answer this myself.

I used the Arduino example "WebServer" from the library Ethernet2 as my Server. I then needed a client socket to 'listen' to this data. I used this code from the website Binary Tides as a base for my client socket. and this tutorial to understand how the code works.
The next part was to use a string stream to convert the data being received into int arrays (actually vectors) of my desired size. I then created a custom ROS msg by following this tutorial then formatted my data as desired and published it using a basic ros publisher node.

If anyone is trying to publish data from an arduino (e.g. custom sensor) on a ROS topic via ethernet (TCP/IP) feel free to ask for help

Will answer this myself.

I used the Arduino example "WebServer" from the library Ethernet2 as my Server. I then needed a client socket to 'listen' to this data. I used this code from the website Binary Tides as a base for my client socket. socket and this tutorial to understand how the code works.
The next part was to use a string stream to convert the data being received into int arrays (actually vectors) of my desired size. I then created a custom ROS msg by following this tutorial then formatted my data as desired and published it using a basic ros publisher node.

If anyone is trying to publish data from an arduino (e.g. custom sensor) on a ROS topic via ethernet (TCP/IP) feel free to ask for help