#RPLidar A1 Setting up
1 messages · Page 1 of 1 (latest)
Looks like we should update the README here but you can use serial_path in your config attributes. https://github.com/viam-modules/rplidar/blob/main/rplidar.go
Will go through this and try again. Will advise on progress.
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.
Do you see any other errors in the LOGS around this error? That usually indicates there's an issue occurring starting the underlying module.
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.
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.
And additional error message;
24/03/2025, 13:45: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
Thanks for the additional logs and context. I will take a look at recreating this setup. Are you powering the LIDAR by USB?
Yes. Power via USB. And using Pi4.
@vast swallow @soft sluice - good news. I got the lidar and cartographer to show up on Viam App page. These are the changes made;
- 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.
- add serial port in JSON;
{
"serial_path": "/dev/ttyUSB0"
} - SLAM only depends on lidar
I had charging cable only earlier. Changed to charging + data cable, so the green LED lits up. And the the rest just fixed the configuration.
Hope this is useful to others. It's time to play with the lidar and cartographer.
@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.
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.
Following up, this is a known issue that the team is investigating. We will let you know once it is resolved.
Yes. When clicked View Map from SLAM Library we got blank map. TQ for having the team investigating this issue. Also for your info, we plan to introduce the SLAM feature to university this 30th April. Will share more on that as we put together the tutorial for SLAM and navigation using saved map.