Skip to content
Snippets Groups Projects

Jet autodiff

Merged Joan Vallvé Navarro requested to merge jet_autodiff into master
2 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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 from ConstraintAutoDiff, nor does it have a member called ConstraintAutoDiff, so, how is it that this constructor appears in the constructor list?

  • We could very well use three nullptr for the absolute constraint!

  • 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
  • Ah I see.

    OK . About removing the absolute, do as you wish. It is not harmful.

  • Please register or sign in to reply
  • 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à Ortega
  • added 4 commits

    Compare with previous version

  • added 1 commit

    • 5bf57232 - test waiting for implementation of constraint_autodiff::evaluate

    Compare with previous version

  • jvallve, what's the status of this? Can I merge?

  • Yes, I think it should compile now.

  • Could not compile on my Mac... :-(

  • Not merging until compilation and ctest are both OK

  • Not compiling either on my Ubuntu 14.04. @joanvallve I post the error log in Slack.

  • added 1 commit

    • e53cd255 - QR solver has no relation with jet_autodiff

    Compare with previous version

  • 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é Navarro
  • added 1 commit

    Compare with previous version

  • added 681 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Master merged and conflicts resolved. Asking for a merge from master

  • 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
  • 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;
  • added 1 commit

    • 60881f75 - Fixed useless const and added some const and override

    Compare with previous version

  • Joan Solà Ortega added 15 commits

    added 15 commits

    Compare with previous version

  • mentioned in commit c80b39c1

  • Please register or sign in to reply
    Loading