问题:
tf2_ros::threading_error = “Do not call canTransform or lookupTransform with a timeout unless you are using another thread for populating data. Without a dedicated thread it will always timeout. If you have a seperate thread servicing tf messages, call setUsingDedicatedThread(true) on your Buffer instance.”
方法:
在tf2_ros::Buffer buffer(ros::Duration(10));后面
加一条:tf2_ros::TransformListener tf(buffer);