Error: r13 not allowed here -- `sub.w sp,r1,#48'
GitHub - fateshelled/bytetrack_ros: ByteTrack + ROS2 (foxy)
arm ByteTrack linux编译时出现:
/tmp/kalmanFilter-8c7928.s: Assembler messages:
/tmp/kalmanFilter-8c7928.s:6895: Error: r13 not allowed here -- `sub.w sp,r1,#48'
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
定位到代码:
void KalmanFilter::predict(KAL_MEAN &mean, KAL_COVA &covariance){ //revise the data; DETECTBOX std_pos; std_pos << _std_weight_position * mean(3),_std_weight_position * mean(3),1e-2,_std_weight_position * mean(3); DETECTBOX std_vel; std_vel << _std_weight_velocity * mean(3),_std_weight_velocity * mean(3),1e-5,_std_weight_velocity * mean(3); KAL_MEAN tmp; tmp.block<1, 4>(0, 0) = std_pos; tmp.block<1, 4>(0, 4) = std_vel; tmp = tmp.array().square(); KAL_COVA motion_cov = tmp.asDiagonal(); KAL_MEAN mean1 = this->_motion_mat * mean.transpose(); // KAL_COVA covariance1 = this->_motion_mat * covariance *(_motion_mat.transpose()); //covariance1 += motion_cov; // mean = mean1; //covariance = covariance1; covariance = motion_cov; }
报错代码:
KAL_MEAN mean1 = this->_motion_mat * mean.transpose();
8x8 *8x1不支持。
Eigen::Matrix_motion_mat1; Eigen::Matrix meana; Eigen::Matrix mean2=_motion_mat1*meana.transpose();
其中,
_motion_mat定义:
Eigen::Matrix
Eigen::Matrix
KAL_MEAN定义:
typedef Eigen::Matrix
数据定义:
typedef Eigen::Matrix
typedef Eigen::Matrix
typedef Eigen::Matrix
typedef Eigen::Matrix
这个就OK:
Eigen::Matrixup1; Eigen::Matrix h1; Eigen::Matrix h2= up1 * h1.transpose();
4x8 * 8x1 ,结果应该是4x1,不知道为什么这里是ok的。
如果把Eigen::Matrix
Eigen::Matrix
/mnt/d/project/changcheng/car20210326_track/mask_android/../eigen-3.3.9/Eigen/src/Core/Assignevaluator.h:833:3: error: static_assert failed
"YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES"
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(ActualDstTypeCleaned,Src)
或者这个错误:
/mnt/d/project/changcheng/car20210326_track/mask_android/../eigen-3.3.9/Eigen/src/Core/CwiseBinaryOp.h:109:7: error: static_assert failed
"YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES"
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)
一般代表运算过程维度错误。
我的解决方法:换了ndk版本,原来用的ndk 15rc,换成r21e版本,就解决了。
#export ANDROID_NDK=/mnt/d/android-ndk-r15c-linux-x86_64/android-ndk-r15c
export ANDROID_NDK=/mnt/d/android-ndk-r21e-linux-x86_64/android-ndk-r21e
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)