#RPLidar A1 Setting up

1 messages · Page 1 of 1 (latest)

ancient ibex
#

19/10/2024, 15:36:29 error rdk.resource_manager.rdk:component:camera/lidar resource/graph_node.go:282 resource build error: rpc error: code = Unknown desc = need to specify a devicePath (ex. /dev/ttyUSB0): no usb devices found resource rdk:component:camera/lidar model viam:lidar:rplidar; where do I define device path? #lidar

soft sluice
ancient ibex
ancient ibex
#

Hi @soft sluice , I am back testing the RPLidar A1 on Pi4 again. And still get this error message; 20/03/2025, 15:07:45 error rdk.resource_manager.rdk:component:camera/rplidar   resource/graph_node.go:297   resource build error: unknown resource type: API "rdk:component:camera" with model "viam:lidar:rplidar" not registered   resource rdk:component:camera/rplidar  model viam:lidar:rplidar. - Adding @vast swallow to the conversation as well.

vast swallow
ancient ibex
# vast swallow Do you see any other errors in the LOGS around this error? That usually indicate...

I've added the serial_path in the Config attribute as suggested by @soft sluice and added dependencies on local for the rplidar. Also for the service Cartographer I've added dependencies on rplidar.
These are new error & warn I received in the logs;
24/03/2025, 13:24:32 error rdk.resource_manager.rdk:component:camera/rplidar   resource/graph_node.go:297   resource build error: rpc error: code = Unknown desc = resource client registration doesn't exist   resource rdk:component:camera/rplidar  model viam:lidar:rplidar
24/03/2025, 13:24:32 warn rdk.resource_manager.rdk:service:slam/slam-1   resource/graph_node.go:551   unexpected resource state transition   from Unhealthy  to Configuring

#

The rest looks good, I think;
4/03/2025, 13:25:57 info rdk.modmanager.viam_rplidar   modmanager/manager.go:566   Adding resource to module   resource rplidar  module viam_rplidar

24/03/2025, 13:25:52 info rdk.modmanager.viam_rplidar   modmanager/manager.go:566   Adding resource to module   resource rplidar  module viam_rplidar

24/03/2025, 13:25:52 info rdk.resource_manager   impl/resource_manager.go:728   Now configuring resource   resource rdk:component:camera/rplidar

24/03/2025, 13:25:47 info rdk.resource_manager   impl/resource_manager.go:728   Now configuring resource   resource rdk:service:slam/slam-1

24/03/2025, 13:25:47 info rdk.modmanager.viam_rplidar   modmanager/manager.go:566   Adding resource to module   resource rplidar  module viam_rplidar

24/03/2025, 13:25:47 info rdk.resource_manager   impl/resource_manager.go:728   Now configuring resource   resource rdk:component:camera/rplidar

24/03/2025, 13:25:42 info rdk.resource_manager   impl/resource_manager.go:728   Now configuring resource   resource rdk:service:slam/slam-1

24/03/2025, 13:25:42 info rdk.modmanager.viam_rplidar   modmanager/manager.go:566   Message logged 13 times in past 1m0s: Adding resource to module   resource rplidar  module viam_rplidar

24/03/2025, 13:25:42 info rdk.resource_manager   impl/resource_manager.go:728   Now configuring resource   resource rdk:component:camera/rplidar

24/03/2025, 13:25:38 info rdk.resource_manager.rdk:service:data_manager/data_manager-1   builtin/builtin.go:216   Reconfigure END

24/03/2025, 13:25:38 info rdk.resource_manager.rdk:service:data_manager/data_manager-1.capture   capture/capture.go:216   Capture Disabled

24/03/2025, 13:25:38 info rdk.resource_manager.rdk:service:data_manager/data_manager-1   builtin/builtin.go:174   Reconfigure START

24/03/2025, 13:25:37 info rdk.resource_manager   impl/resource_manager.go:728   Now configuring resource   resource rdk:service:slam/slam-1

#

Adding @craggy spade to this conversation as he is also having same setup issue.

#

Just to share with @soft sluice and @vast swallow, what we are doing is part of 2025 plan to promote Autonomous Robots with SCUTTLE Build-on-Viam as alternative to ROS/ROS2.

sage slate
#

The Autonomous SCUTTLE on Viam will have also a USB camera, 2 ultrasonic sensors and a pair of encoder.

#

Once we have the RPlidar and SLAM setup on SCUTTLE we can start promote this as alternative to AMR using more expensive computer and ROS.

ancient ibex
vast swallow
#

Thanks for the additional logs and context. I will take a look at recreating this setup. Are you powering the LIDAR by USB?

sage slate
#

Yes. Power via USB. And using Pi4.

ancient ibex
#

@vast swallow @soft sluice - good news. I got the lidar and cartographer to show up on Viam App page. These are the changes made;

  1. changed micro-USB cable to one that carry data (so we should see green LED lights up on the interface board between lidar and USB cable.
  2. add serial port in JSON;
    {
    "serial_path": "/dev/ttyUSB0"
    }
  3. SLAM only depends on lidar
sage slate
#

Hope this is useful to others. It's time to play with the lidar and cartographer.

ancient ibex
#

@vast swallow we got the map saved but could not show the map. It is not critical at this point as we will continue to explore the features in SLAM module. The aim is to create a tutorial to map a room then perform navigation based on the saved map. Copying @craggy spade who is working on this topic.

vast swallow
#

Thanks for the update @ancient ibex . To confirm, when “View Map” from the SLAM library, it shows the blank map you’ve shared in the second screenshot? I’ll let the SLAM team know about this.

vast swallow
#

Following up, this is a known issue that the team is investigating. We will let you know once it is resolved.

sage slate