Ask Your Question

Error connecting to Hokuyo: Could not open serial Hokuyo:

asked 2018-03-27 02:35:44 -0500

DesmondTan gravatar image

Hi, I'm new to ROS. Currently, I'm using ROS kinetic on raspberry pi 3, ubuntu mate.I've also installed urg-node with sudo apt-get install ros-kinetic-urg-node I'm trying to use Hokuyo sensor, UTM-30LX, connected to my raspberry pi 3 through USB port. However, after running the command: rosrun urg_node urg_node , I got the following output:

/dev/ttyACM0 @ 115200 could not open serial device.

Also, when I'm trying to get the ID of Hokuyo sensor with the command: rosrun urg_node getID /dev/ttyACM0 , I got a similar output:

getID failed: Could not open serial Hokuyo: /dev/ttyACM0 @ 115200 could not open serial device.

Am I suppose to run any command beforehand or set any configuration? Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-27 02:57:24 -0500

mgruhler gravatar image

Most probably you don't have the rights to open the port. You can easily check with the following command od /dev/ttyACM0. If this does not work, but works with sudo od /dev/ttyACM0, this is the reason.

You need to add yourself to the dialout group: sudo adduser <YOUR_USERNAME> dialout, log out and log back in. Check if you really are in the dialout group by checking the output of groups. This should get you access.

Please report back if this does not solve the issues, preferably with any additional details.

edit flag offensive delete link more


I encountered exactly the same issue as Desmond and following the above answer I was able to resolve the issue.

However, after creating a master machine and ssh'ing into the drone with the Hokuyo, the issue has returned. Any idea how to resolve it this time?

Justin-RR2-IP gravatar imageJustin-RR2-IP ( 2018-07-17 05:20:33 -0500 )edit

I am unable to run the command od /dev/ttyAMC0 or sudo od /dev/ttyAMC0

I get the output:

od: dev/ttyACM0: No such file or directory

Justin-RR2-IP gravatar imageJustin-RR2-IP ( 2018-07-18 01:21:41 -0500 )edit

I also encountered the same issue. od/dev/ttyACM0 gives me od: /dev/ttyACM0: Device or resource busy while sudo od /dev/ttyACM0 works and is able to got data from my Hokuyo. I added the user to dialout as @mgruhler said, but after logging back in, I still run into this problem. Any ideas?

kyleGao gravatar imagekyleGao ( 2018-09-14 14:27:15 -0500 )edit

Up date: od /dev/ttyACM0 is working now after I reboot the computer. But when I rosrun urg_node urg_node I still got errors:

Error connecting to Hokuyo: Could not open serial Hokuyo: /dev/ttyACM0 @ 115200 no response.
kyleGao gravatar imagekyleGao ( 2018-09-14 14:33:49 -0500 )edit

Not sure if this will help but it turned out my issue was a timing issue, with the drone's clock being reset to Feb 2016 after every reboot. We fixed the timing issue by making the PC an NTP server and syncing the drone's time from it. After doing this, we stopped getting the error

Justin-RR2-IP gravatar imageJustin-RR2-IP ( 2018-09-15 01:19:52 -0500 )edit

Thank you @Justan-RR2-IP the time is not an issue in my case. Still suffering from this.

kyleGao gravatar imagekyleGao ( 2018-09-18 17:09:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2018-03-27 02:35:44 -0500

Seen: 1,508 times

Last updated: Mar 27 '18