Connect two computers with RS-232 cable.
I am using Ubuntu 16.04 and ROS Kinetic. I want to connect a computer running ROS to another (without ROS) with a USB to serial connector (RS-232 cable), in order to send data (ex. send 3 decimals from a PC using ROS, and be able to see them in another's PC terminal). My research so far led me to install rosserial package, but I couldn't find any tutorial or sample code to see how exactly is going to work. I am new to ROS. Any suggestions or possible solutions would be appreciated.
rosserial
does not do what I believe you think it does.It is a ROS-specific (and ROS-only) implementation of a ROS-like middleware transport over low-bandwidth connections. It does not make it easier to use serial ports with ROS nodes.
For that, look at serial fi.
in this link you can see an example of rosserial
@hamid: the file you link is not part of rosserial, nor is it used in
rosserial
afaik?It is part of the
serial
library though.@gvdhoorn I am not sure if I understand what you are saying. All I want to know is if it's possible to make that kind of communication using ROS, and if it is, how is that going to work? Does ROS has any package supporting USB to serial, RS-232 communication? If it does, where can I find an example?
@Spyros: I don't understand how this is a ROS-specific question. Do you want to exchange ROS msgs over a serial connection, or just raw bytes?
ROS does not need to support any serial to usb converter, your Linux OS needs to do that. It just so happens that the
serial
library provides some .... convenience functions you can use to interact with a serial port under Linux.
Now if you want to send and receive ROS msgs across a serial link, then
rosserial
would make sense.@gvdhoorn My ultimate goal is to connect a PIC18F4331 microcontroller with my ROS environment in order to send its input data (maybe with a ros node). I am trying to make the connection between the two PCs just to make sure the connection works ok, before I try anything with the microcontroller.
@Spyros I would recommend using a micro-controller which we know works out of the box, such as an arduino with the rosserial examples. You cannot use rosserial with two desktop PCs so it wont help you to prototype this.
Getting the simple arduino example working will give you a much better system to build from.