ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here's a simple solution to convert

Eigen::matrix4f eigen_matrix_4f_transform

to

geometry_msgs::TransformStamped tf_stamped

Eigen::Affine3d eigen_affine_transform;
eigen_affine_transform.matrix() = eigen_matrix_4f_transform.cast<double>();
tf_stamped = tf2::eigenToTransform(final_transform_affine);

tf_stamped can be later published with

tf::TransformBraodcaster


Remember that you need to set frame_id, child_frame_id nad stamp before publishing

  tf_stamped.header.frame_id = "odom_comb";
  tf_stamped.child_frame_id = "platform";
  tf_stamped.header.stamp = ros::Time::now();
  tf_brodcast_.sendTransform(tf_stamped);

Here's a simple solution to convert

Eigen::matrix4f eigen_matrix_4f_transform

to

geometry_msgs::TransformStamped tf_stamped

Eigen::Affine3d eigen_affine_transform;
eigen_affine_transform.matrix() = eigen_matrix_4f_transform.cast<double>();
tf_stamped = tf2::eigenToTransform(final_transform_affine);
tf2::eigenToTransform(eigen_affine_transform);

tf_stamped can be later published with

tf::TransformBraodcaster


Remember that you need to set frame_id, child_frame_id nad stamp before publishing

  tf_stamped.header.frame_id = "odom_comb";
  tf_stamped.child_frame_id = "platform";
  tf_stamped.header.stamp = ros::Time::now();
  tf_brodcast_.sendTransform(tf_stamped);