Errors when running hokuyo_node

Error: No such device

  • Failed to open port: /dev/ttyACM0. No such device (errno = 19). (in hokuyo::laser::open) You may find further details at http://www.ros.org/wiki/hokuyo_node/Troubleshooting

Also dmesg might show the error :

  • cdc_acm 3-1:1.0: no more free acm devices[ 1573.092691] cdc_acm 3-1:1.0: ttyACM3:

And there are repeated dmesg messages

  • USB ACM device
    [ 1581.705084] hub 3-0:1.0: port 1 disabled by hub (EMI?), re-enabling...

Solution The USB cable connecting the computer is too long or has bad signal quality. Use a better cable. Also, you may need to reboot the machine (or unload and reload the cdc_acm kernel module) because all the ttyACM device node have been used.

Error: Failed to open port

  • [ERROR] 1263845857.096606000: Exception thrown while opening Hokuyo.
    Failed to open port: /dev/ttyACM. No such file or directory (errno = 2). The requested port does not exist. Is the hokuyo connected? Was the port name misspelled? (in hokuyo::laser::open) You may find further details at http://www.ros.org/wiki/hokuyo_node/Troubleshooting

Solution:

  • Is the hokuyo connected?
  • Was the port name misspelled?
    • Usually USB hokuyos show up at /dev/ttyACM* you can try looking for them there

      ls /dev/ttyACM*
  • On the PR2 only: was one of the Hokuyos recently replaced?
    • You will have to update the /etc/ros/sensors/*_hokuyo symbolic link to point to the new name of the hokuyo device, which should be /dev/sensors/hokuyo_H*.
  • On the PR2 only: does the /dev/sensors/hokuyo_H* symbolic link exist for your device?
    • The hokuyo_nodes connect to /etc/ros/sensors/*_hokuyo, which is a symbolic link to a specific hokuyo device in /dev/sensors/hokuyo_H*. The link in /dev/sensors gets created by udev when the Hokuyo is plugged in. If you restart udev while a hokuyo_node is running, it will fail to recreate the link because it will be unable to connect to the Hokuyo to determine its ID. The next time the hokuyo_node tries to reopen the port it will be unable to do so as the symbolic link will be missing. In this case, you need to stop the running hokuyo_nodes, and restart udev:
      • /etc/init.d/udev stop
        /etc/init.d/udev start

Error: Failed to open port. Permission denied.

  • [ERROR] 1263843357.793873000: Exception thrown while opening Hokuyo.
    Failed to open port: /dev/ttyACM0. Permission denied (errno = 13). You probably don't have premission to open the port for reading and writing. (in hokuyo::laser::open) You may find further details at http://www.ros.org/wiki/hokuyo_node/Troubleshooting

Solution:

  • Use chmod to change the permissions on the port

    • You can use chmod as illustrated in the tutorial. You will also need execute access on the directories containing the device.

  • Use udev

    • For more permanent use, you should use udev to automatically set the correct permissions on the device. For example, the pr2 currently has the following udev rule to name the hokuyo device based on the hardware ID of the device:

      • SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ATTRS{manufacturer}=="Hokuyo Data Flex for USB", ATTRS{product}=="URG-Series USB Driver", PROGRAM=="/etc/ros/run.sh hokuyo_node getID %N q", SYMLINK+="sensors/hokuyo_%c"

Error: Device /dev/ttyACM0 is already locked

  • [ERROR] 1263845673.069465000: 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

Solution:

  • Is more than one process trying to access the hokuyo?
    • Stop other hokuyo_nodes.

      You can use lsof to find which other task has the hokuyo open:

      lsof|grep /dev/ttyACM0

Warning: Frequency Too Low

  • This message would show up in the node's diagnostics.

Solution:

  • Are you working with a high data rate (intensity on, wide angle range, no scan skipping, no clustering)?
    • The amount of data you are trying to get off the Hokuyo may exceed its available bandwidth. Try to reduce the required bandwidth by turning off intensity, reducing the scan range, skipping some scans or clustering some samples. See guidelines for the UTM-30LX at the hokuyo_node page.

Scans appear disjointed

  • With some firmware versions, the hokuyo may mix two adjacent scans if the data rate is too high.

Solution:

  • Are you working with a high data rate (intensity on, wide angle range, no scan skipping, no clustering)?

    The amount of data you are trying to get off the Hokuyo may exceed its available bandwidth. Try to reduce the required bandwidth by turning off intensity, reducing the scan range, skipping some scans or clustering some samples. See guidelines for the UTM-30LX at the hokuyo_node page.

Error: Checksum failed on status code

The hokuyo_node only supports SCIP 2.x, not SCIP 1.x. Some older URG-04LX models only support SCIP 1.x.

[ERROR] 1277434561.027264000: Exception thrown while opening Hokuyo.
Checksum failed on status code. (in hokuyo::laser::sendCmd) You may find further details at http://www.ros.org/wiki/hokuyo_node/Troubleshooting

Solution:

  • Use a terminal emulator like picocom to verify the firmware version. Make sure the hokuyo_node is not running. Run picocom
     sudo picocom /dev/ttyACM0

    Type "VV"+Enter. The protocol version should be displayed.

  • Download updated firmware here:

http://www.hokuyo-aut.jp/02sensor/07scanner/download/u_dl_license.html

Error: Locale name not valid

  • terminate called after throwing an instance of 'std::runtime_error'
    what():  locale::facet::_S_create_c_locale name not valid

Check the locale settings on your device:

  • $ locale

If you do not get

  • LC_ALL=C

this is what is creating the error.

Test to confirm

Input

  • $ export LC_ALL=C

then run hokuyo_node and see if the message clears.

Solution

If the error clears you need to set Locale on your system.

First, check for installed locales

  • $ locale -a

If the language you prefer is listed skip the next step. If the language you prefer is not listed you must add it to the locale options (Example shows how to add English-US)

  • $ sudo locale-gen en_US.UTF-8

Update the locale settings to use this language:

  • $ sudo update-locale LANG=en_US.UTF-8 LANGUAGE=en_US

Reboot to activate new locale settings:

  • $ sudo reboot

Log back in and run $ locale again to confirm the change has been applied.

Error Codes

The hokuyo sometimes returns error codes. They can be found in the "Driver Status" diagnostics. These error codes are not documented. They are displayed as [0->xx], where xx is the number of the error. Known codes are listed below:

[0->33]

There is interference from another IR source (often another Hokuyo). Unplugging and replugging the power seems to fix the problem.

[0->75]

Unknown (but we have observed it). Unplugging and replugging the power seems to fix the problem.

[0->98]

The Hokuyo is recovering from an error. At least in some cases this error goes away on its own.

[0->75] Code

The [0->75] error code requires a reset of the Hokuyo scanner. This can be accomplished in two ways:

  • Power cycling the Hokuyo
  • Running a "reset" command to clear the code.

To run the reset command, you will need the files reset.cmd and upgrade, which are attached to this wiki. Move the files onto the computer that is attached to the Hokuyo.

Before running this command, shut down the hokuyo_node. Run:

./upgrade /dev/ttyACM0 reset.cmd

Replace /dev/ttyACM0 with the port the scanner is running on.

Wiki: hokuyo_node/Troubleshooting (last edited 2013-06-13 01:31:34 by TJump)