Jet autodiff
Merge request reports
Activity
- src/constraint_autodiff.h 0 → 100644
362 for (i = 0; i < block8Size; i++) 363 (*jets_8_)[i] = WolfJet(0, last_jet_idx++); 364 state_ptrs_.resize(n_blocks); 365 } 366 367 ConstraintAutodiff(ConstraintType _tp, bool _apply_loss_function, ConstraintStatus _status, 368 StateBlockPtr _state0Ptr, 369 StateBlockPtr _state1Ptr, 370 StateBlockPtr _state2Ptr, 371 StateBlockPtr _state3Ptr, 372 StateBlockPtr _state4Ptr, 373 StateBlockPtr _state5Ptr, 374 StateBlockPtr _state6Ptr, 375 StateBlockPtr _state7Ptr, 376 StateBlockPtr _state8Ptr) : 377 ConstraintAutodiff(_tp, nullptr, nullptr, nullptr, _apply_loss_function, _status, _state0Ptr, _state1Ptr, _state2Ptr, _state3Ptr, _state4Ptr, _state5Ptr, _state6Ptr, _state7Ptr, _state8Ptr) @joanvallve , what's this? Can you call the same own constructor from a constructor? And in the constructor list? Are you sure this is OK?
Is not the same, is the other one.. actually, I why have we two different constructors for absolute and frame/landmark/feature constraints? For frame/landmark/feature constraints, a nullptr is provided for the other two frame/landmark/feature pointers. Couldn't we use it with three nullptrs for absolute?
Hey, dont put two questions in the same line! :-)
What do you mean 'it's the other one'?
ConstraintAutoDiff
is template, OK, but it does not inherit fromConstraintAutoDiff
, nor does it have a member calledConstraintAutoDiff
, so, how is it that this constructor appears in the constructor list?I mean there are two constructors, one constructor calls the other one. We could just remove the absolute constructor and everything would be simpler.
Edited by Joan Vallvé Navarro
Sorry. It´s not compiling:
In file included from /Users/jsola/dev/wolf/src/ceres_wrapper/qr_manager.cpp:8: In file included from /Users/jsola/dev/wolf/src/ceres_wrapper/qr_manager.h:11: In file included from /Users/jsola/dev/wolf/src/ceres_wrapper/solver_manager.h:5: In file included from /Users/jsola/dev/wolf/src/./wolf.h:17: In file included from /usr/local/include/eigen3/Eigen/Sparse:19: In file included from /usr/local/include/eigen3/Eigen/SparseCore:54: /usr/local/include/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h:203:50: error: no member named 'coeff' in 'Eigen::Transpose<const Eigen::SparseMatrix<double, 1, int> >' typename Res::Scalar rhs_j = alpha * rhs.coeff(j,c); ~~~ ^ /usr/local/include/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h:252:76: note: in instantiation of member function 'Eigen::internal::sparse_time_dense_product_impl<Eigen::Transpose<const Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >, Eigen::Transpose<const Eigen::SparseMatrix<double, 1, int> >, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> >, 0, true>::run' requested here sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType>::run(lhs, rhs, res, alpha); ^ /usr/local/include/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h:302:17: note: in instantiation of function template specialization 'Eigen::internal::sparse_time_dense_product<Eigen::Transpose<const Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >, Eigen::Transpose<const Eigen::SparseMatrix<double, 1, int> >, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> >, double>' requested here internal::sparse_time_dense_product(rhs_t, lhs_t, dest_t, alpha); ^ /usr/local/include/eigen3/Eigen/src/Core/ProductBase.h:111:81: note: in instantiation of function template specialization 'Eigen::DenseTimeSparseProduct<Eigen::ReturnByValue<Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int> >, Eigen::SparseMatrix<double, 0, int>, 1, false> >, Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >::scaleAndAddTo<Eigen::Matrix<double, -1, -1, 0, -1, -1> >' requested here inline void scaleAndAddTo(Dest& dst, const Scalar& alpha) const { derived().scaleAndAddTo(dst,alpha); } ^ /usr/local/include/eigen3/Eigen/src/Core/ProductBase.h:102:58: note: in instantiation of function template specialization 'Eigen::ProductBase<Eigen::DenseTimeSparseProduct<Eigen::ReturnByValue<Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int> >, Eigen::SparseMatrix<double, 0, int>, 1, false> >, Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >, Eigen::ReturnByValue<Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int> >, Eigen::SparseMatrix<double, 0, int>, 1, false> >, Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >::scaleAndAddTo<Eigen::Matrix<double, -1, -1, 0, -1, -1> >' requested here inline void evalTo(Dest& dst) const { dst.setZero(); scaleAndAddTo(dst,Scalar(1)); } ^ /usr/local/include/eigen3/Eigen/src/Core/ProductBase.h:272:19: note: in instantiation of function template specialization 'Eigen::ProductBase<Eigen::DenseTimeSparseProduct<Eigen::ReturnByValue<Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int> >, Eigen::SparseMatrix<double, 0, int>, 1, false> >, Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >, Eigen::ReturnByValue<Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int> >, Eigen::SparseMatrix<double, 0, int>, 1, false> >, Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >::evalTo<Eigen::Matrix<double, -1, -1, 0, -1, -1> >' requested here other.derived().evalTo(derived()); ^ /usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:414:20: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) return Base::lazyAssign(other.derived()); ^ /usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:621:69: note: in instantiation of member function 'Eigen::internal::assign_selector<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::DenseTimeSparseProduct<Eigen::ReturnByValue<Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int> >, Eigen::SparseMatrix<double, 0, int>, 1, false> >, Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > >, false, false>::run' requested here return internal::assign_selector<Derived,OtherDerived,false>::run(this->derived(), other.derived());
Edited by Joan Solà Ortegaadded 4 commits
-
ca21e9e4...d1a28acf - 3 commits from branch
master
- d2af4278 - Merge branch 'master' into jet_autodiff
-
ca21e9e4...d1a28acf - 3 commits from branch
added 1 commit
- 5bf57232 - test waiting for implementation of constraint_autodiff::evaluate
Not compiling either on my Ubuntu 14.04. @joanvallve I post the error log in Slack.
I commented all files related with the new QR solver in CMakeLists (it shouldn't be in this branch, I know)
Edited by Joan Vallvé Navarroadded 681 commits
-
4488b439...b249c2b9 - 680 commits from branch
master
- 32e4739f - merge master to jet_autodiff
-
4488b439...b249c2b9 - 680 commits from branch
148 148 return state_ptr_vector_; 149 149 } 150 150 151 std::vector<unsigned int> ConstraintAnalytic::getStateSizes() const 151 const std::vector<unsigned int> ConstraintAnalytic::getStateSizes() const changed this line in version 8 of the diff
117 117 * Returns a vector of sizes of the state blocks 118 118 * 119 119 **/ 120 virtual std::vector<unsigned int> getStateSizes() const; 120 virtual const std::vector<unsigned int> getStateSizes() const; changed this line in version 8 of the diff
added 1 commit
- 60881f75 - Fixed useless const and added some const and override
added 15 commits
-
60881f75...e0406590 - 14 commits from branch
master
- 50c46bba - Merge branch 'master' into jet_autodiff
-
60881f75...e0406590 - 14 commits from branch
mentioned in commit c80b39c1