Lidar Labeler Rosbag Loading Error (Ubuntu 20.04): Could not locate the base directory for ros.
4 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I try to make use of the Rosbag loading feature (https://de.mathworks.com/help/lidar/ref/lidar.labeler.loading.rosbagsource-class.html). I selected Import > Add Point Cloud and then switched to Rosbag and the loading error appeared.
I have installed the Matlab ROS Toolbox and I have installed ROS noetic
env | grep ROS
ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/opt/ros/noetic/share
ROSLISP_PACKAGE_DIRECTORIES=
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic
and I have sourced ROS
source /opt/ros/noetic/setup.bash
Why does this loading error still appear?
Thanks in advance
0 个评论
采纳的回答
Cam Salzberger
2021-4-6
Hello Daniel,
Does the error occur if you try to load the rosbag data outside of the Lidar Labeler?
bag = rosbag(filePath);
msgs = readMessages(bag, 1); % Testing with just the first message to start, try more if it works
If the error occurs, my suspicion is that you are seeing a library conflict between the ROS MATLAB libraries and the installed ROS libraries and their dependencies. MATLAB uses ROS Melodic, while you have ROS Noetic installed, so there will be a fair number of different library versions.
Try starting MATLAB without having sourced ROS Noetic and without pointing towards the installed Noetic folders. You may have to double-check your PATH and LD_LIBRARY_PATH environment variables to make sure that no "noetic" folders are still present before starting MATLAB.
It would be helpful to see exact error messages too, at least to make it easier for other users to find this post.
-Cam
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Network Connection and Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!