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

Ros communicate via rs232

asked 2015-04-06 11:40:15 -0500

jbrown gravatar image

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!

edit retag flag offensive close merge delete

Comments

Worth looking at this QA thread http://answers.ros.org/question/84821...

130s gravatar image 130s  ( 2015-04-06 20:56:18 -0500 )edit

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.

jbrown gravatar image jbrown  ( 2015-04-06 21:19:24 -0500 )edit

@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

gvdhoorn gravatar image gvdhoorn  ( 2015-04-07 03:17:24 -0500 )edit

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.

jbrown gravatar image jbrown  ( 2015-04-07 07:12:39 -0500 )edit

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

yuanye gravatar image yuanye  ( 2017-10-26 09:44:33 -0500 )edit

@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.

jbrown gravatar image jbrown  ( 2017-10-27 07:04:19 -0500 )edit

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?

jbrown gravatar image jbrown  ( 2017-10-27 07:08:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-07 07:32:39 -0500

gvdhoorn gravatar image

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.

edit flag offensive delete link more

Comments

Yea, that just might work! Thanks! Should you git clone into a catkin_ws and catkin_make, or build it like they said?

jbrown gravatar image jbrown  ( 2015-04-07 16:17:52 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2015-04-08 02:58:03 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-04-06 11:40:15 -0500

Seen: 2,543 times

Last updated: Apr 07 '15