0
$\begingroup$

Rosanswers logo

I have servos that communiate via rs232 and I was wondering if anybody knew of any ros libraries or packages that can communicate with devices over rs232. I looked at rosserial, and I think it is aimed toward arduino, so probably not what I want. Any advice? Thanks!


Originally posted by jbrown on ROS Answers with karma: 101 on 2015-04-06

Post score: 0


Original comments

Comment by 130s on 2015-04-06:
Worth looking at this QA thread http://answers.ros.org/question/84821/how-to-use-serial-port-in-ros/

Comment by jbrown on 2015-04-06:
Thanks! I was looking at the rosserial_python package, that just might do what I want if I use some rs232 to usb converters. I can specify the ports in the launch file.

Comment by gvdhoorn on 2015-04-07:
@jbrown: rosserial_python is actually a pkg that implements a bridge over a RS232 link that allows embedded devices to use the ROS pub/sub and svc model to communicate with a full ROS system without having to install full ROS on the embedded device. It is not a generic RS232 library for Python&ROS

Comment by jbrown on 2015-04-07:
Thanks! That does help me understand the python library better. I guess there isn't a generic rs232 library then. At one time, ros communicated with these servos via usb to rs232 converters.

Comment by yuanye on 2017-10-26:
Hi jbrown, I want to use ROS to control a robot arm by RS232C. Did you find out how to communicate via rs232? thank you

Comment by jbrown on 2017-10-27:
@yuanye: The previous comment from gvdhoorn is pretty good advice, it can communicate with a device over RS232 without ROS being installed on the device (Thanks gvdhoorn!). I like using rosserial_python myself. It may take some reading and trail and error, but there are tutorials and code samples.

Comment by jbrown on 2017-10-27:
There is a ROS Wiki page for rosserial if you google it, it is informative and helpful. I would also recommend that you look for sample code that uses rosserial as well as the Wiki page, the sample code will show you how to use rosserial_python in your code. What kind of robot arm are you using?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I guess there isn't a generic rs232 library then. At one time, ros communicated with these servos via usb to rs232 converters.

There is a 'generic' ROS serial communication library, it is called serial. It's C++ only though.

For Python you could take a look at what rosserial_python itself uses.


Originally posted by gvdhoorn with karma: 86574 on 2015-04-07

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by jbrown on 2015-04-07:
Yea, that just might work! Thanks! Should you git clone into a catkin_ws and catkin_make, or build it like they said?

Comment by gvdhoorn on 2015-04-08:
No. Assuming you use a Ubuntu release (or derivative), you should install it using apt-get. More precisely: sudo apt-get install ros-DISTRO-serial. Only install things from source if you need to.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.