# CVProject_ROS **Repository Path**: HeGang80/cvproject_-ros ## Basic Information - **Project Name**: CVProject_ROS - **Description**: it is the cv project - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-08 - **Last Updated**: 2022-08-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CV Project in ROS ## Introduction CV的大作业。内容是基于SAC+ICP的模板匹配,以及AAE的深度学习识别。 ## SAC-ICP Usage 1. 可以直接通过运行可执行文件来运行代码。 ` cd CVproject/devel/lib/scripts ` ` ./test_node ` 2. 可以通过ROS环境运行。 ` source devel/setup.bash ` ` rosrun scripts xxx_node ` 3. 因为之前没有看到“思路提示.docx”里面有教程,所以有一堆乱七八糟的代码,别管他就行。。。 4. 首先使用`load_rgbd.cpp`将测试图片读取并转化为`.pcd`,保存至/pcds文件夹。 5. 调参:建议直接运行`sac_ICP_simplify.cpp`(rosrun,或者c++运行)。其中,所有结果图像保存于/pcds/results下面,包括图像的降采样、滤波、匹配结果,与模板降采样等。 测试运行:运行`sac_ICP.cpp`。需要输入一个数字,例如需要匹配44.pcd,则输入44并回车,所有结果将分别存储与/pcds/results2/的以该数字命名的文件夹下。 ## AugmentedAutoencoder(AAE) Usage 1. environment setup and fork from: [AAE](https://github.com/DLR-RM/AugmentedAutoencoder#headless-rendering) ``` @InProceedings{Sundermeyer_2018_ECCV, author = {Sundermeyer, Martin and Marton, Zoltan-Csaba and Durner, Maximilian and Brucker, Manuel and Triebel, Rudolph}, title = {Implicit 3D Orientation Learning for 6D Object Detection from RGB Images}, booktitle = {The European Conference on Computer Vision (ECCV)}, month = {September}, year = {2018} } ``` 3. Machine used: NVIDIA 3060 laptop + 11th Gen Intel® Core™ i7-11800H @ 2.30GHz × 16 + 16G RAM 2. (in acquired environment from 1.) run /aae_image.py to test. ` export AE_WORKSPACE_PATH=/home/he/CVproject/src/AugmentedAutoencoder/AugmentedAutoencoder/autoencoder_ws ` ` cd /home/he/CVproject/src/AugmentedAutoencoder/AugmentedAutoencoder/auto_pose/test ` ` python aae_image.py exp_group/my_autoencoder -f /home/he/CVproject/src/AugmentedAutoencoder/peg2/rgb/1.jpg ` #### Discussion 1. 参考测试结果,可以发现识别精度并不是非常高,旋转矩阵二范数误差在1~2左右。查看图片实际上可以发现,除了匹配的比较小的误差外,另外来源于目标为沿z轴旋转90度不变的物块,所以很难分辨出实际的z轴旋转角。针对这一点,我考虑能不能在训练模型时,将训练图片加大锐度,将物体上端柱子在平面上的阴影更突出,以此保留这个z轴旋转角相关的特征。 ## Install 1. 在ROS环境下,按以下操作建立工作空间。 ` mkdir -p CVproject ` ` git clone https://gitee.com/HeGang80/cvproject_-ros.git ` ` catkin_make ` 2. AAE install from: [AAE](https://github.com/DLR-RM/AugmentedAutoencoder#headless-rendering) ## Debug 1. 报错:“[pcl::PCDWriter::writeASCII] Number of points different than width * height!“; 需要对width,height进行赋值。 ` //对于无序点云hight默认是1 ` ` cloud_extract->height = 1; ` ` //cloud_extract点云文件中push_back了j个点,故width=j ` ` cloud_extract->width = j; ` 2. 使用pcl-tools查看pcd文件。 ` cd CVproject/devel/lib/scripts/src/pcds/results ` ` pcl_viewer xxx.pcd `