第一话:用MATLAB从ROSBAG读取激光雷达和相机数据(来自MATLAB官方文件,权威)

Main object:1.to read and save images and point cloud data from a rosbag file(机器人文件数据包)2. to prepare the data for lidar camera calibration.Solution:(1)使用helperDownloadRosbag helper函数从给定的URL下载rosbag文件 。outputFolder = fullfile(tempdir,'RosbagFile.
摘要由CSDN通过智能技术生成

Main object:

1.to read and save images and point cloud data from a rosbag file(机器人文件数据包)

2. to prepare the data for lidar camera calibration.

Solution:

1使用helperDownloadRosbag helper函数从给定的URL下载rosbag文件  

outputFolder = fullfile(tempdir,'RosbagFile');
rosbagURL = ['https://ssd.mathworks.com/supportfiles/lidar/data/' ...
    'lccSample.zip'];
helperDownloadRosbag(outputFolder,rosbagURL);

解释:

outputFolder = fullfile(tempdir,'RosbagFile');

%%fullfile 函数作用是作用是利用文件各部分信息创建并合并成完整文件名

tempdir为临时文件夹(MATLAB中系统文件夹,查询过我的文件路径是'C:\Users\28674\AppData\Local\Temp\')

rosbagURL = ['https://ssd.mathworks.com/supportfiles/lidar/data/lccSample.zip];

%%这个网站暂时打不开

helperDownloadRosbag(outputFolder,rosbagURL); 

%%outputFolder为接口文件的文件夹,此函数说明无法找到,个人理解将rosbagURL中的文件放入接口文件夹

(2)从包文件中检索信息。

path = fullfile(outputFolder,'lccSample.bag');
bag = rosbag(path);

解释:

path = fullfile(outputFolder,'lccSample.bag');

%%拼接文件名

bag = rosbag(path);

%%提取所有路径名下的ros文件放入bag中

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值