0
$\begingroup$

ubuntu 20.04, Noetic, turtlebot3

Right now I'm doing below thing

https://emanual.robotis.com/docs/en/platform/turtlebot3/bringup/#bringup

The Problem is that my raspberry pi didn't cognize /dev/ttyACM0(ACM1)(Opencr). And I don't know why... I'm doing that All day long... I unplugged many times. and then I re-install ROS on raspberry. then It worked about 30 minuates.. And then ls: cannot access '/dev/ttyACM0': No such file or directory Again

$\endgroup$

3 Answers 3

0
$\begingroup$

Reinstalling ROS isn't going to help you here, because this isn't a ROS problem. This error is very revealing:

ls: cannot access '/dev/ttyACM0': No such file or directory

This error is telling us that the file that should represent your hardware device doesn't exist, meaning that the raspberry pi itself is unable to connect to the hardware. As a result, rather than investigating ROS, we should be investigating how the Pi is trying to connect to the Turtlebot:

  1. When you plug in the USB, does the Pi recognize that a new USB device has been connected? You can use view the kernel messages in wall mode (dmesg -w) to see if the operating system detects something being plugged in.
  2. If a device is recognized, is it connecting to /dev/ttyACM0 or somewhere else? It might be using /dev/ttyUSB0 instead, for example. You can observe how the output of ls /dev/tty* changes before and after plugging in the turtlebot to see what port is being used.
  3. Is the Pi able to interact with other serial devices? Plugging in an Arduino, for example, should result in the creation of /dev/ttyACM0. If it does, there's something wrong with your turtlebot (is it charged, everything powered on, cables fully connected, etc?). If it doesn't, there's an issue with you Pi (bad port, bad configuration?).
$\endgroup$
3
  • $\begingroup$ 1. Pi recognize new USB(Lidar) But they don't recognize the OPENCR. 2.Lidar connecting to ttyUSB0. I think Port and cable is OK. $\endgroup$
    – cocoromina
    Aug 18, 2023 at 6:33
  • $\begingroup$ Right now I connect electricpower-micro 5pin - pi - micro 5pin - OPENCR. $\endgroup$
    – cocoromina
    Aug 18, 2023 at 6:37
  • $\begingroup$ It's turn out to port's Problem. It works irregularly. your answer was very helpful to me. thanks $\endgroup$
    – cocoromina
    Aug 19, 2023 at 7:01
-1
$\begingroup$

Can you change your cable? May be your cable is only for power, not data. Otherhand you can give permission via using this command;

sudo chmod 666 /dev/ttyACM0
$\endgroup$
1
  • 1
    $\begingroup$ It's unlikely to be a permissions error, because ls returned 'cannot access' instead of 'permission denied'. Additionally, you should not chmod a tty device! the permissions will reset when you unplug it, so the correct way to do this is to add your user to the dialout group. $\endgroup$
    – cst0
    Aug 17, 2023 at 17:45
-1
$\begingroup$

The port /dev/ttyACM0 will not exist if the Raspberry Pi is mounted as a thumb drive. This is common for transferring files to the device.

Try unplugging/plugging the USB connector to get get out of the file xfer mode.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.