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

Error: Device /dev/ttyACM0 is already locked

asked 2018-12-03 00:57:28 -0500

saito gravatar image

updated 2018-12-03 09:46:14 -0500

Hello. I am a ROS beginner. I am doing SLAM of turtlebot 2 in the ubuntu 14.04, ros (indigo) personal computer environment.

I am doing this tutorial to add hokuyo.

http://wiki.ros.org/turtlebot/Tutoria...

However, the hokuyo node does not start except the first time.

$ rosrun hokuyo_node hokuyo_node
[ERROR] [1543820081.096981504]: Exception thrown while opening Hokuyo.
Device /dev/ttyACM0 is already locked. Try 'lsof | grep /dev/ttyACM0' to find other processes that currently have the port open. (in hokuyo::laser::open) You may find further details at http://www.ros.org/wiki/hokuyo_node/Troubleshooting

and

$ lsof | grep /dev/ttyACM0
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /home/ujhou/.gvfs
      Output information may be incomplete.
hokuyo_no 29683          a    9uW     CHR              166,0       0t0      505 /dev/ttyACM0
hokuyo_no 29683  7681    a    9uW     CHR              166,0       0t0      505 /dev/ttyACM0
hokuyo_no 29683 29692    a    9uW     CHR              166,0       0t0      505 /dev/ttyACM0
hokuyo_no 29683 29693    a    9uW     CHR              166,0       0t0      505 /dev/ttyACM0
hokuyo_no 29683 29694    a    9uW     CHR              166,0       0t0      505 /dev/ttyACM0
hokuyo_no 29683 29699    a    9uW     CHR              166,0       0t0      505 /dev/ttyACM0
hokuyo_no 29683 29742    a    9uW     CHR              166,0       0t0      505 /dev/ttyACM0

What should I do?

edit retag flag offensive close merge delete

Comments

hokuyo node does not start except the first time.

that "first time" is probably an indication of what is going on.

How are you stopping the node?

gvdhoorn gravatar image gvdhoorn  ( 2018-12-03 02:47:36 -0500 )edit

ctrl+c or ✕ on terminal.

saito gravatar image saito  ( 2018-12-03 03:42:01 -0500 )edit

you could run ps aux | grep hokuyo and see if there are some processes still running with hokuyo name. If it is the case kill them by running kill -9 pocess_id

Mehdi. gravatar image Mehdi.  ( 2018-12-03 11:13:21 -0500 )edit

thank you may friend.I can do it!!

saito gravatar image saito  ( 2018-12-04 01:12:29 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-12-04 01:13:16 -0500

saito gravatar image

updated 2019-01-09 03:06:13 -0500

jayess gravatar image

It can be erased by this command.

kill -9 pocess_id
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-12-03 00:57:28 -0500

Seen: 1,465 times

Last updated: Jan 09 '19