TF not compiling under Groovy?
I am trying to implement some TF under groovy, but ran into compilation errors quickly. I just installed a fresh Ubuntu 12.04 with ROS Groovy. To be sure, I tried to implement the tutorial ( http://wiki.ros.org/tf/Tutorials/Intr... ) to see if the error also replicates there when compiled, and it does:
Built target
/home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp: In function ‘void poseCallback(const PoseConstPtr&)’:
/home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp:14:44: warning: ‘tf::Quaternion::Quaternion(const tfScalar&, const tfScalar&, const tfScalar&)’ is deprecated (declared at /opt/ros/groovy/include/tf/LinearMath/Quaternion.h:51) [-Wdeprecated-declarations]
/home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp:14:46: error: no matching function for call to ‘tf::Quaternion::setRPY(tf::Quaternion)’
/home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp:14:46: note: candidate is:
/opt/ros/groovy/include/tf/LinearMath/Quaternion.h:94:8: note: void tf::Quaternion::setRPY(const tfScalar&, const tfScalar&, const tfScalar&)
/opt/ros/groovy/include/tf/LinearMath/Quaternion.h:94:8: note: candidate expects 3 arguments, 1 provided
make[2]: *** [learning_tf/CMakeFiles/turtle_tf_broadcaster.dir/src/turtle_tf_broadcaster.cpp.o] Error 1
make[1]: *** [learning_tf/CMakeFiles/turtle_tf_broadcaster.dir/all] Error 2
make: *** [all] Error 2
Anyone had this issue before?
Thanks! Ruud
EDIT SOLVED:
In the tutorial it says (see below) that you have to change line 14 of the code. I did that but then I get the error. If I switch back to the original code, then it compiles fine!
"Looks like Quaternion API has changed (sorry but not sure when it occurred...Here it's assumed at some point between electric and fuerte) so that the order of the arguments needs changed (Relevant QA thread). That said, if you're on a version prior to the API change, you need to change line 14 to: q.setRPY( tf::Quaternion(msg->theta, 0, 0) );"
Please also take a look here if you have this error: http://answers.ros.org/question/45884...