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

rosrun rosserial_python _port:=/dev/ttyACM0 on RasPi giving "could not open port /dev/ttyUSB0" error

asked 2014-09-21 05:54:45 -0600

Nightstalker gravatar image

updated 2014-09-22 03:57:30 -0600

I have installed rosserial_arduino on my RasPi and my Arduino code for Push Button has been uploaded successfully. To run the code, I am following the following steps as mentioned in the tutorial:
1. Startup roscore using roscore
2. Run the run the rosserial_python using rosrun rosserial_python _port:=/dev/ttyUSB0
3. Watch button status on rostopic echo pushed

Now, the issue here is that when I try step 2 using rosrun rosserial_python _port:=/dev/ttyACM0 (my Arduino is on ACM0), the error message I receive is

[ERROR] [WallTime: 1411295710.119812] Error opening serial: could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'

For some reason, it keeps taking USB0 as the input even if I specify ACM0 as the port. This error does not occur on my Ubuntu 14.04 distro running _Indigo_. My RasPi is running _Groovy_. I have also added the necessary group permissions (adding user to dialout, etc.) but to no avail. Please suggest methods to solve this issue.

Thanks to ahendrix for having found out the problem. But there is a follow up issue here. Please check.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-22 01:13:02 -0600

ahendrix gravatar image

I think in the Groovy version, the serial port was passed directly as an argument, rather than as a ROS parameter. Try:

rosrun rosserial_python /dev/ttyACM0
edit flag offensive delete link more


You deserve a cookie. That worked. But it gives an error of Failed Packet Flags. Any thoughts?

Nightstalker gravatar image Nightstalker  ( 2014-09-22 02:14:48 -0600 )edit

I think the rosserial message format changed at some point. You should check that you're running a groovy version of the rosserial arduino library and the arduino sketch.

ahendrix gravatar image ahendrix  ( 2014-09-22 03:08:43 -0600 )edit

Yeah, I checked that. It's all groovy.

Nightstalker gravatar image Nightstalker  ( 2014-09-22 03:11:30 -0600 )edit

@ahendrix, please check this

Nightstalker gravatar image Nightstalker  ( 2014-09-22 03:56:07 -0600 )edit

Question Tools

1 follower


Asked: 2014-09-21 05:54:45 -0600

Seen: 7,938 times

Last updated: Sep 22 '14