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

How to write a node to communicate with USB?

asked 2013-07-16 18:28:10 -0500

lifelonglearner gravatar image

updated 2014-01-28 17:17:17 -0500

ngrennan gravatar image

Using ROS I want to communicate with robot base which receives data through USB. So I want to write a ROS node that can write data on USB port. Please help me. can some one provide me python or C++ code for opening USB port, initializing it and to send the data on the port?

edit retag flag offensive close merge delete


Check the source of ROS serial?

davinci gravatar image davinci  ( 2013-07-30 01:39:23 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-16 22:29:04 -0500

davinci gravatar image

What kind of usb device and robot base is it? You could look at ROS serial:

edit flag offensive delete link more


It is FTDI device. means the base is having a microcontroller based circuit for motor control. the microcontroller can actually handle RS-232 and the FTDI device converts RS-232 data in to packets of USB to support the communication. I just need to send specific data to USB port.

lifelonglearner gravatar image lifelonglearner  ( 2013-07-17 01:44:45 -0500 )edit

answered 2013-07-30 12:15:34 -0500

forrestv gravatar image

Look at PySerial examples.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-07-16 18:28:10 -0500

Seen: 3,994 times

Last updated: Jul 30 '13