I have an old robot that only works with Ubuntu 14.04 and Python 2. The robot arm is controlled using ROS1. I wish to program the robot using python 3. I cannot upgrade the robot or its operating system. I am thinking of connecting another laptop to the robot laptop to send and receive data to and from that laptop simultaneously. I would like my main laptop to work with higher version of ubuntu like 18.04 and does all the calculation in python 3 and only send the final data to the laptop connected to the robot. Then robot laptop gets data from the robot sensor and sends it back to the main laptop. This must be done in a loop without user intervention. I am wondering if this method is basically possible? is it possible that two computers send and receive data like that? It is OK if they send data in the form of text files since I work with Python and can read from files but I do not know if basically, this method is possible. If not possible, do you have any other solution or suggestion for my problem? Thank you.
Asked
Active
Viewed 753 times
2 Answers
0
Right off my head, the easiest way is to use sockets, I am assuming you want the data transfer to be wireless. Sockets is a pretty easy option and you can essentially run the robot(laptop) as the server and the other laptop as a client. Here is something that might help you get started with sockets: https://www.bogotobogo.com/python/python_network_programming_server_client_file_transfer.php
0
You can probably try to script something using socat. It is a very useful tool that allows to connect various data sources and targets basically in any combination. For example you can connect input/output of some script to some TCP port on one machine, and use stdin/stdout to communicate with that port over TCP on another machine.
raj
- 11,409