Thank you Prof. Dellaert.
I changed the function definition of Rot3::AxisAngle from Rot3::AxisAngle(const Unit3& axis, double angle) to Rot3::AxisAngle(const Unit3& axis, const double& angle).
I recompiled my local copy of gtsam but the problem remains, and I get the same error on compilation of the minimal example.
The error message mentions OptionalJacobian; shoud the original AxisAngle function in Rot3 have optional Jacobian matrices as input to be used in Expressions?
I copied the full error message below:
In file included from /usr/include/boost/function/detail/maybe_include.hpp:33:0,
from /usr/include/boost/function/detail/function_iterate.hpp:14,
from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:67,
from /usr/include/boost/function.hpp:64,
from /usr/local/include/gtsam/base/Matrix.h:32,
from /usr/local/include/gtsam/base/Manifold.h:22,
from /usr/local/include/gtsam/base/Lie.h:25,
from /usr/local/include/gtsam/base/VectorSpace.h:11,
from /usr/local/include/gtsam/geometry/Point2.h:20,
from /usr/local/include/gtsam/geometry/Unit3.h:23,
from /usr/local/include/gtsam/geometry/Rot3.h:26,
from minimal_example.cpp:1:
/usr/include/boost/function/function_template.hpp: In instantiation of ‘static R boost::detail::function::function_invoker4<FunctionPtr, R, T0, T1, T2, T3>::invoke(boost::detail::function::function_buffer&, T0, T1, T2, T3) [with FunctionPtr = gtsam::Rot3 (*)(const gtsam::Unit3&, const double&); R = gtsam::Rot3; T0 = const gtsam::Unit3&; T1 = const double&; T2 = gtsam::OptionalJacobian<3, 2>; T3 = gtsam::OptionalJacobian<3, 1>]’:
/usr/include/boost/function/function_template.hpp:925:38: required from ‘void boost::function4<R, T1, T2, T3, T4>::assign_to(Functor) [with Functor = gtsam::Rot3 (*)(const gtsam::Unit3&, const double&); R = gtsam::Rot3; T0 = const gtsam::Unit3&; T1 = const double&; T2 = gtsam::OptionalJacobian<3, 2>; T3 = gtsam::OptionalJacobian<3, 1>]’
/usr/include/boost/function/function_template.hpp:716:7: required from ‘boost::function4<R, T1, T2, T3, T4>::function4(Functor, typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type) [with Functor = gtsam::Rot3 (*)(const gtsam::Unit3&, const double&); R = gtsam::Rot3; T0 = const gtsam::Unit3&; T1 = const double&; T2 = gtsam::OptionalJacobian<3, 2>; T3 = gtsam::OptionalJacobian<3, 1>; typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type = int]’
/usr/include/boost/function/function_template.hpp:1061:16: required from ‘boost::function<R(T0, T1, T2, T3)>::function(Functor, typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type) [with Functor = gtsam::Rot3 (*)(const gtsam::Unit3&, const double&); R = gtsam::Rot3; T0 = const gtsam::Unit3&; T1 = const double&; T2 = gtsam::OptionalJacobian<3, 2>; T3 = gtsam::OptionalJacobian<3, 1>; typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type = int]’
minimal_example.cpp:17:30: required from here
/usr/include/boost/function/function_template.hpp:101:19: error: too many arguments to function
return f(BOOST_FUNCTION_ARGS);