Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关掉闭环后的漂移 #1

Open
yuyadanyadan opened this issue May 30, 2019 · 2 comments
Open

关掉闭环后的漂移 #1

yuyadanyadan opened this issue May 30, 2019 · 2 comments

Comments

@yuyadanyadan
Copy link

您好:
首先非常感谢您的开源.论文和代码都写的非常棒, 简洁明了. 用您的数据集测试的结果也比较好.

我用我们自己的robot采集的数据集进行测试,走一个大圈,大概60-70米之后,回到初始位置,关闭闭环之后,漂移比较大x:-0.178m, y:0.945m, theta:9.42度. 打开回环之后: x: -0.0118m, y:0.00549m, theta: 2.8度. 而单里程计计算的结果为: x: -0.014675, y: 0.1735, theta: 4.68.
也就是说,如果没有回环, 系统计算的结果没有单里程计计算的结果准确.

想咨询下, 您有没有做过类似的测试,是否也有如此的情况. 我现在怀疑有几个原因, 一是,一路上深度相机的有效部分比较少,因为这一圈是一个走廊,两边很多玻璃,好几处地方的高度有几cm的差别. 二是, rgbd相机与odom的外参标定不够准确.

谢谢,麻烦您了

@zjlooojoe
Copy link

你好,想问一下你知道为什么这个误差项里面为什么会这么计算吗?
`
class EncoderFrame2FrameError
{
public:
EncoderFrame2FrameError ( const double& delta_x, const double& delta_y, const double& delta_theta, const Eigen::Matrix3d sqrt_info ) :
delta_x_ ( delta_x ), delta_y_ ( delta_y ), delta_theta_ ( delta_theta ), sqrt_info_ ( sqrt_info ) {}

template <typename T>
bool operator() ( const T* const ref_x, const T* const ref_y, const T* const ref_th,
                  const T* const cur_x, const T* const cur_y, const T* const cur_th,
                  T* residuals ) const {

    // ref pose
    T xr = ref_x[0];
    T yr = ref_y[0];
    T thr = ref_th[0];

    // cur pose
    T xc = cur_x[0];
    T yc = cur_y[0];
    T thc = cur_th[0];

    T ob_dx = T ( delta_x_ );
    T ob_dy = T ( delta_y_ );
    T ob_dth = T ( delta_theta_ );

    T tmp_dx = xc - xr;
    T tmp_dy = yc - yr;

    T dx = cos ( thr ) *tmp_dx + sin ( thr ) *tmp_dy;
    T dy = -sin ( thr ) *tmp_dx + cos ( thr ) *tmp_dy;

    T ex = dx - ob_dx;
    T ey = dy - ob_dy;
    T eth = NormalizeAngle ( thc - thr - ob_dth );// [(cur_th - ref_th) - delta_enc_th]

    residuals[0] = T ( sqrt_info_ ( 0,0 ) ) * ex + T ( sqrt_info_ ( 0,1 ) ) * ey + T ( sqrt_info_ ( 0,2 ) ) * eth ;
    residuals[1] = T ( sqrt_info_ ( 1,0 ) ) * ex + T ( sqrt_info_ ( 1,1 ) ) * ey + T ( sqrt_info_ ( 1,2 ) ) * eth ;
    residuals[2] = T ( sqrt_info_ ( 2,0 ) ) * ex + T ( sqrt_info_ ( 2,1 ) ) * ey + T ( sqrt_info_ ( 2,2 ) ) * eth ;

    return true;
}`

比较不明白的是这个 T dx = cos ( thr ) *tmp_dx + sin ( thr ) *tmp_dy;
T dy = -sin ( thr ) *tmp_dx + cos ( thr ) *tmp_dy;
不是直接xc-xr就可以作为视觉方面的delta项了吗?为什么还要再乘以他们的cos?这是因为什么啊?

@BloodLemonS
Copy link

您好: 首先非常感谢您的开源.论文和代码都写的非常棒, 简洁明了. 用您的数据集测试的结果也比较好.

我用我们自己的robot采集的数据集进行测试,走一个大圈,大概60-70米之后,回到初始位置,关闭闭环之后,漂移比较大x:-0.178m, y:0.945m, theta:9.42度. 打开回环之后: x: -0.0118m, y:0.00549m, theta: 2.8度. 而单里程计计算的结果为: x: -0.014675, y: 0.1735, theta: 4.68. 也就是说,如果没有回环, 系统计算的结果没有单里程计计算的结果准确.

想咨询下, 您有没有做过类似的测试,是否也有如此的情况. 我现在怀疑有几个原因, 一是,一路上深度相机的有效部分比较少,因为这一圈是一个走廊,两边很多玻璃,好几处地方的高度有几cm的差别. 二是, rgbd相机与odom的外参标定不够准确.

谢谢,麻烦您了

您好,我想咨询一下您当时运行时有没有出现下面的问题:
OpenCV Error: Assertion failed (dims <= 2) in reshape, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/matrix.cpp, line 1032
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/matrix.cpp:1032: error: (-215) dims <= 2 in function reshape

[dre_slam_node-1] process has died [pid 5690, exit code -6, cmd /home/lemon/dre_ws/devel/lib/dre_slam/dre_slam_node __name:=dre_slam_node __log:=/home/lemon/.ros/log/53f748fa-b410-11ec-a8c3-38fc98c5a1e8/dre_slam_node-1.log].
log file: /home/lemon/.ros/log/53f748fa-b410-11ec-a8c3-38fc98c5a1e8/dre_slam_node-1*.log
请问这个问题该如何解决呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants