ccny_openni_launch

roslaunch ccny_openni_launch openni.launch

ccny_openni_launch_第1张图片

roslaunch ccny_openni_launch openni_record.launch bag_name:=

ccny_openni_launch_第2张图片

roslaunch ccny_openni_launch openni_play.launch bag_name:=

ccny_openni_launch_第3张图片

Configuration files

There are four configuration files of interes

· rgb.yml: RGB camera intrinsics and distortion 内部参数和畸变系数

· depth.yml: Depth (or more accurately, IR) camera intrinsics and distortion

· extr.yml: Extrinsic matrix between the RGB and Depth cameras (rotation and translation) RGBh和Depth之间的矫正矩阵

· warp.yml: Per-pixel depth unwarping of the depth image, according to some polynomial model.

rgb.yaml and depth.yml are passed to the OpenNI driver ,which distributes them as CameraInfo topics. They can be generated using the camera_calibration package.

extr.ymland warp.yml are passed to rgbd_image_proc. They can be generated using ccny_rgbd_calibrate (coming soon).

Using warp.yml is optional and be disabled using a flag in rgbd_image_proc.

· ccny_rgbd/rgbd_image_proc

ccny_openni_launch_第4张图片

Ccny_rgbd

ccny_openni_launch_第5张图片

Visual_odometry

1、初始化参数( initParams ) ( 包括feature和Detector )

2、订阅主题( rgbd/rgb /rgbd/depth /rgbd/info )

3、同步输入( message_filters::Synchronizer)::Synchronizer() )

4、注册回调函数( registerCallback() )

回调函数:

1. 初始化相机位置

2. 创建frame结构(在这里可以计算所有关键点的均值和协方差(对应三维空间内))

3. 找关键点(在FeatureDetector中完成)

4. 运动的估计(使用ICP算法,在关键点之内完成这部分工作)

5. 发布消息——(Tf) Odme (FeatureCloud)

Visual odometry算法具体过程:

Input:

RGBDFrame 此类中存储了图像中关键点对应的均值和协方差,以及可用点的下标

tf::Transform& prediction 预先估计的运动

output

tf::Transform& motion 计算结果

1.去除关键点中无效点;

2.转化坐标系,相对于base_link;

3.If 如果模型大小为0,即是第一帧图像

使用这一帧图像来初始化模型

else

align using icp

1. 从data_means(三维点云的均值)获取目标点云数据

2. for iteration

for data_point in data_cloud

在mode_cloud中搜索其欧拉距离最近的点,返回其对应下标

end

根据这些对应的点估计旋转量(svd)transformation

将data_cloud旋转transformation

final_transformation = transformation* final_transformation

计算transformation的线性长度linear以及角度abgular

if linear

break;

3. 将最后旋转后的点云数据添加到模型中去,以更新点云数据,注意,这里同样包括了(均值以及协方差);

4.发布transformatiion消息。

Keyframe_mapper

1、 初始化参数,以及实例化KeyframeFraphSolverG2o;

2、 订阅消息(/rgbd/rgb /rgbd/depth /rgbd/info);

3、 同步消息并且注册回调函数(主要功能在回调函数中实现);

回调函数:

Input: rgb 彩色图像

Depth 深度图像

Info 相机信息

Output:

1、 等待并查询消息(transform( form /odom ));

2、 用所订阅接受到同步的消息实例化RGBDFrame;

3、 处理:比较transform 和前一帧的transform,计算两姿态的线性长度以及夹角,如果大于设定的最小值,则将这一帧添加到帧序列中去。

转载于:https://my.oschina.net/xushizhe/blog/318947

你可能感兴趣的:(ccny_openni_launch)