Error: Device /dev/ttyACM0 is already locked
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.
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?
that "first time" is probably an indication of what is going on.
How are you stopping the node?
ctrl+c or ✕ on terminal.
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
thank you may friend.I can do it!!