Robotics System Toolbox installed but not working

7 views (last 30 days)
I am trying to use the robotics system toolbox, I have checked to see if it is installed (which it is) and have added the path to set path.
slamAlg = robotics.LidarSLAM(mapResolution, maxLidarRange);
this is part of the code it has an issue with and the error shown below:
>> SLAM_ALG
Unable to resolve the name 'robotics.LidarSLAM'.
Error in SLAM_ALG (line 9)
slamAlg = robotics.LidarSLAM(mapResolution, maxLidarRange);
is this error to do with the robotics system toolbox or is something else at play? I am using R2023a.

Accepted Answer

Cris LaPierre
Cris LaPierre on 7 Jun 2023
I'll start by admitting I am not familiar with this function, but based on what I can find in the documetnation, it appears you may not be using the correct syntax. First, lidarSLAM is part of the Navigation Toolbox, not the Robotics System Toolbox.
Also, note that MATLAB is case sensitive, so LidarSLAM and lidarSLAM are not the same thing. The function in MATLAB is lidarSLAM.
Based on the examples in that page, you would call it using one of the following syntaxes:
slamObj = lidarSLAM
slamObj = lidarSLAM(mapResolution,maxLidarRange)
slamObj = lidarSLAM(mapResolution,maxLidarRange,maxNumScans)
So I would expect your code to look like this
slamAlg = lidarSLAM(mapResolution, maxLidarRange);

More Answers (0)

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!