ROSbot 2 PRO: Rplidar doesn't work `root operation not permitted`

Hello, I encountered this error, and lidar doesn’t work

rplidar | error: failed switching to “root”: operation not permitted

Hello @yongyun_song,

Please write instructions that will help reproduce the error.

I was running this command:

docker compose up rplidar

And the docker setup is built-in setup in the home directory

  1. Check if the compose file contains privileged permission.
  2. Check if rplidar service differs from following description:
  rplidar:
    image: husarion/rplidar:humble
    container_name: rplidar
    <<: *common-config
    devices:
      - /dev/ttyRPLIDAR:/dev/ttyUSB0
    command: >
        ros2 launch sllidar_ros2 sllidar_launch.py
        serial_baudrate:=${RPLIDAR_BAUDRATE:-256000}

If nothing helps, please send me the robot’s serial number along with the entire compose file.

I am having the same exact issue. The compose file does not contain the privileged permission. The rplidar service matches the description that was provided. This is a new issue that was not occurring last week. I have confirmed that lidar is showing up on the devices section, so it does not appear to be a hardware issue. What should I do?

Hello @das.lab,
Please answer the following questions:

  1. Please provide the serial number (SN) of the robot.
  2. I would like to ask you to check whether there are several processes using the same device. For example, you can run the sensor using snap and docker. If snap is running, do not run the docker version. If the ros2 topic list command does not return the /scan topic, it is probably OK.
  3. Sending the running compos with additional logs.
    Regards
  1. I have 2 ROSbot 2.0 Pros. The serial numbers are 4b6e3f and 86084d. Both ROSbots are encountering the same exact issue.

  2. I am trying to run rplidar through the docker container.


    The scan topic does not show up and the lidar does not spin up or activate.

    The rplidar container gets permanently stuck in a “restarting” status loop.

  3. The docker error logs only show “error: failed switching to “root”: operation not permitted”.

Hello @das.lab,

I managed to determine the problem. Please execute the docker compose pull command and start the docker compose up rplidar container. Everything should be working now.

I would be grateful if you could confirm whether the lidar is already working, and thank you for pointing out this error.

Regards

The rplidar containers of both ROSbots now work after updating. The /scan topic now shows up as well. Thank you.

1 Like