[C++] tf broadcaster
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"));
}
Leave a comment