CCM-SLAM跑自己的USB摄像头

本文档介绍了如何使用CCM-SLAM配合USB摄像头进行建图。首先,你需要创建相机校准文件,然后创建启动文件并调整参数。接着,通过修改启动文件来调用USB摄像头,并测试摄像头是否正常工作。最后,启动CCM-SLAM服务端、代理及rviz进行实时建图。文章详细说明了每个步骤和关键参数的含义。
摘要由CSDN通过智能技术生成

ccm_slam/readme.md

# 5. Using your own Data

For using you own datasets or camera, you need to create according calibration and launch files:
* Create a new camera calibration file, e.g. by copying and adjusting ```conf/vi_euroc.yaml```.
    * If you don't know the parameters of your camera, you can find them using a camera calibration toolbox, such as [kalibr](https://github.com/ethz-asl/kalibr).
* Create a new launch file, e.g. by copying and adjusting ```launch/EuRoC/Client0_euroc.yaml```.
    * Change the parameter ```cam```to the path of your new camera file.
    * Change the parameter ```TopicNameCamSub```to the name of your camera topic.
    * Hint: If you have an existing rosbag-file with camera data, you can directly modify the topic when playing the bagfile: ```rosbag play mybag.bag existing_topic:=new_name```
* There is no need to change ```Server.launch```, however, you can adjust the number of Agents in the system by changing ```NumOfClients```. The maximum is set to **4** in the current implementation.
* If you are using a downward-looking camera instead of a forward-looking (as in the EuRoC sequences), it is recommended to change the rotational part of the [static transform publishers](http://wiki.ros.org/tf#static_transform_publisher) in the launch files to ```0 0 -3.142```, e.g. ```<node pkg="tf" type="static_transform_publisher" name="linkS0_broadcaster" args="0 0 5 0 0 -3.142 world odomS0 100" />```.
* There should be no need to change the name of the frame-IDs, such as ```odomC0```.

# 6. Parameters

System parameters are loaded from ```conf/config.yaml```. We explain the functionality of the most important parameters in the following lines:

**Mapping**
* ```Mapping.LocalMapSize```: The Local Map of the Agent is limited to n KFs.
* ```Mapping.LocalMapBuffer```: If LocalMapSize can not be reached, e.g. due to communication loss, there is a buffer of n KFs that is filled before KFs are irreversibly removed from the map.
* ```Mapping.RecentKFWindow```: The most recent n KFs of every map are excluded from KF culling.
* ```Mapping.RedThres```: Threshold for KF redundancy. 1.0 means no KF removal. (We recommend to use a value in the range of [1.0,0.95]. Please refer to the publications for details.)

**Communication** 
* ```Comm.Client.PubFreq```: The Agent publishes new data from the local map at this frequency.
* ```Comm.Server.PubFreq```: The Server publishes data for the Agents to augment/update their local map at this frequency.
* ```Comm.Server.KfsToClient```: In every message to one Agent, the Server sends the data of the ```n```closest KFs to the Agent's current position.
* ```Comm.Client.PubMaxKFs```: Maximimum number of KFs per message.
* ```Comm.Client.PubMaxMPs```: Maximimum number of MPs per message.

**Place Recognition**
* ```Placerec.NewLoopThres```: Between two Loop Closures, ```n```KFs need to pass.
* ```Placerec.StartMapMatchingAfterKf```: Map Matching does not consider the first ```n```KFs to ensure enough overlap between two map when matching and merging.

**Visualization**
* ```Viewer.Active```: Activate/Deactivate the visualization functionalities.
* ```Viewer.ScaleFactor```: Scales the visualization. Useful since monocular estimates exhibit arbitrary scale.

**Other**
* ```Stats.WriteKFsToFile```: Write KFs to cslam/output. **Attention**: Before being written to the csv-file, KFs are transformed to the body frame of the robot using the transformation given in the camera calibration file by ```T_imu_cam0```.

如何使用自己的数据

为了使用自己的数据集或相机,您需要创建校准和启动文件:

  • 创建一个新的相机校准文件,例如通过复制和调整cslam/conf/vi_euroc.yaml
    ----* 如果您不知道相机的参数,则可以使用相机校准工具箱找到它们,比如kalibr
  • 创建一个新的启动文件,例如通过复制和调整cslam/launch/EuRoC/Client0_euroc.launch
    ----* 将参数cam更改为新相机文件的路径。
    ----* 将参数TopicNameCamSub更改为相机主题的名称。
    ----* 提示:如果您现有一个带有照相机数据的rosbag文件,则可以在播放bagfile时直接修改该主题:
    rosbag play mybag.bag exist_topic:= new_name
    
  • 无需更改Server.launch,但是,您可以通过更改NumOfClients来调整系统中的代理数量。在当前实现中,最大值设置为4
  • 如果您使用的是向下看的摄像头而不是向前看的摄像头(如EuRoC序列中所示),建议更改[static transform publishers]的旋转部分,在启动文件中将其设置为"0 0 -3.142",例如
    <node pkg =“ tf” type =“ static_transform_publisher” name =“ linkS0_broadcaster” args =“ 0 0 5 0 0 -3.142 world odomS0 100” />
  • 无需更改帧ID的名称,例如odomC0

参数功能

系统参数是从cslam/conf / config.yaml加载的。我们在以下几行中解释最重要参数的功能:

Mapping建图

  • Mapping.LocalMapSize: 代理的本地地图限制为n个KF。

  • Mapping.LocalMapBuffer: 如果无法达到LocalMapSize,例如:由于通信丢失,在将KF不可逆地从地图中删除之前,将填充n个KF的缓冲区。

  • Mapping.RecentKFWindow: 每张地图的最近n个KF都排除在KF剔除之外。

  • Mapping.RedThres:KF冗余的阈值,1.0表示不删除KF。 (我们建议使用[1.0,0.95]范围内的值,有关详细信息,请参阅出版物)

  • Communication 通信

  • Comm.Client.PubFreq: 代理以该频率从本地地图发布新数据。

  • Comm.Server.PubFreq: 服务器以该频率发布数据以供代理增加/更新其本地地图。

  • Comm.Server.KfsToClient: 在发送给一个代理的每条消息中,服务器都会发送最接近代理当前位置的“ n”个KF的数据。

  • Comm.Client.PubMaxKFs: 每条信息(message)的KF数上限。

  • Comm.Client.PubMaxMPs: 每条信息(message)的MP数上限。

评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值