Robotics StackExchange | Archived questions

bug in pcl_ros/src/transforms.cpp?

straight dump of the error message:

/home/riki/catkin_ws/src/john/perception_pcl-melodic-devel/pcl_ros/src/transforms.cpp: In function ‘void pcl_ros::transformAsMatrix(const Transform&, Eigen::Matrix4f&)’:
/home/riki/catkin_ws/src/john/perception_pcl-melodic-devel/pcl_ros/src/transforms.cpp:287:37: error: invalid initialization of reference of type ‘const TransformStamped& {aka const geometry_msgs::TransformStamped_<std::allocator<void> >&}’ from expression of type ‘const Transform {aka const geometry_msgs::Transform_<std::allocator<void> >}’
   out_mat = tf2::transformToEigen(bt).matrix().cast<void>();
                                     ^
In file included from /home/riki/catkin_ws/src/john/perception_pcl-melodic-devel/pcl_ros/src/transforms.cpp:38:0:
/opt/ros/kinetic/include/tf2_eigen/tf2_eigen.h:46:17: note: in passing argument 1 of ‘Eigen::Affine3d tf2::transformToEigen(const TransformStamped&)’
 Eigen::Affine3d transformToEigen(const geometry_msgs::TransformStamped& t) {
                 ^
/home/riki/catkin_ws/src/john/perception_pcl-melodic-devel/pcl_ros/src/transforms.cpp:287:53: error: expected primary-expression before ‘void’
   out_mat = tf2::transformToEigen(bt).matrix().cast<void>();
                                                     ^
CMakeFiles/pcl_ros_tf.dir/build.make:62: recipe for target 'CMakeFiles/pcl_ros_tf.dir/src/transforms.cpp.o' failed
make[2]: *** [CMakeFiles/pcl_ros_tf.dir/src/transforms.cpp.o] Error 1
CMakeFiles/Makefile2:781: recipe for target 'CMakeFiles/pcl_ros_tf.dir/all' failed
make[1]: *** [CMakeFiles/pcl_ros_tf.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Asked by johnblack on 2019-05-24 23:50:57 UTC

Comments

Please edit your question to provide information to reproduce your workspace especially the versions of the code that you are using. http://wiki.ros.org/Support

Asked by tfoote on 2019-05-25 02:58:57 UTC

Without seeing a minimal example which causes this error there's not much we can do to help.

However the error message appears to be saying that a Transform is being passed instead of a TransformStamped.

Asked by PeteBlackerThe3rd on 2019-05-25 09:35:30 UTC

Answers