How to use eigen::matrix3f as additional argument in callback functions?
Dear all,
I would like to use eigen::matrix3f as additional argument in callback functions.
I define the matrix
Eigen::Matrix3f R_bc;
R_bc << 0, -1, 0,
1, 0, 0,
0, 0, 1;
and the subsriber
ros::Subscriber sub = nh.subscribe<nav_msgs::Odometry>( "c_pose", 10, boost::bind(poseCallback, _1, &R_bc) );
and the callback function
void poseCallback(const nav_msgs::Odometry::ConstPtr& msg, const Eigen::Matrix3f* R_bc)
Is it correct? And how can I refer to the elements of R_bc in the callback function? Like print them with ROS_INFO?
What is if define a matrix array like R_bc[10], then how can I pass it to the callback function?
I gave up feeding R_bc to boost in the end. I define it as a global variable. It is not as good but it works.