Arduino Ethernet Driver | Custom hardware publishing on topic via ethernet
I have a custom sensor which I am using with an Arduino. My ultimate goal (TL:DR) is to publish these sensor values on a ROS topic via Ethernet.
I am using a Ethernet shield and have completed the Arduino Ethernet tutorial which walked through creating a server which 'publishes' the sensor data via HTTP. On my PC browser (on the same network) I can navigate to the server/ethernet shield IP address and view the sensor values. I am familiar with fundamental ROS concepts but just a beginner in Ethernet communication, TCP/IP, etc
So what I'm trying to do is write a driver which 'reads' these sensor values, formats them into a custom rosmsg and publishes this rosmsg on a topic.
I would appreciate some tips if anyone is familiar with interfacing between custom hardware and ROS via ethernet. How would one go about the above things I mentioned? I guess it's to set up a socket listening to the sensor but have no idea how to start on this. I realise that a many sensor drivers do a similar thing as I'm trying to do. I know some SICK sensors communicate via Ethernet so effectively I'm trying to reproduce the same funtionality with my custom hardware. I did look at some of these drivers however couldn't understand them very well. If anyone has any links to tutorials / guide of something similar that would be great.
Also if anyone has any wisdom to impart or tips to offer, that would be great!
Cheers