40 static std::weak_ptr<tf2_ros::StaticTransformBroadcaster> singleton_;
42 std::lock_guard<std::mutex> lock(m);
43 if (singleton_.expired()) {
44 auto result = std::make_shared<tf2_ros::StaticTransformBroadcaster>();
48 return singleton_.lock();
52 const QString& child_frame,
80 const geometry_msgs::Point& p = pose.position;
83 const geometry_msgs::Quaternion& q = pose.orientation;
105 msg_.header.frame_id = frame.toStdString();
111 msg_.child_frame_id = frame.toStdString();
125 msg_.transform.translation.x = x;
126 msg_.transform.translation.y = y;
127 msg_.transform.translation.z = z;
132 msg_.transform.rotation.x = x;
133 msg_.transform.rotation.y = y;
134 msg_.transform.rotation.z = z;
135 msg_.transform.rotation.w = w;
149 valid_ = !
msg_.header.frame_id.empty() && !
msg_.child_frame_id.empty() &&
150 msg_.header.frame_id !=
msg_.child_frame_id;