tf 정보λ₯Ό λΈŒλ‘œλ“œμΊμŠ€νŒ… ν•΄λ³΄μž!

μ†ŒμŠ€μ½”λ“œ

#include <tf/transform_broadcaster.h>

int main()
{
  static tf::TransformBroadcaster br_;
  tf::Transform transform;
  tf::Quaternion q;
  transform.setOrigin(tf::Vector3(mid_x, mid_y, mid_z));
  q.setW(mid_qw);
  q.setX(mid_qx);
  q.setY(mid_qy);
  q.setZ(mid_qz);
  transform.setRotation(q);
  br_.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "map", "base_link"));
}

Reference

Leave a comment