-
assigned issue to
Dereferencing boost::none in SmartFactorBase when using body_P_sensor_
Issue #285
closed
Hi,
I noticed that because of a typo, there can be a segfault error in SmartFactorBase.cpp when using body_P_sensor_.
Vector ue = cameras.reprojectionError(point, measured_, Fs, E);
if(body_P_sensor_){
for(size_t i=0; i < Fs->size(); i++){
Pose3 w_Pose_body = (cameras[i].pose()).compose(body_P_sensor_->inverse());
Matrix J(6, 6);
Pose3 world_P_body = w_Pose_body.compose(*body_P_sensor_, J);
Fs->at(i) = Fs->at(i) * J;
}
}
should be:
Vector ue = cameras.reprojectionError(point, measured_, Fs, E);
if(Fs && body_P_sensor_){
for(size_t i=0; i < Fs->size(); i++){
Pose3 w_Pose_body = (cameras[i].pose()).compose(body_P_sensor_->inverse());
Matrix J(6, 6);
Pose3 world_P_body = w_Pose_body.compose(*body_P_sensor_, J);
Fs->at(i) = Fs->at(i) * J;
}
}
Comments (2)
-
-
- changed status to closed
Thank you for reporting this typo. It has been fixed.
- Log in to comment