mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
simple_offboard: avoid TF_REPEATED_DATA when publishing body frame
This commit is contained in:
@@ -150,6 +150,9 @@ void handleState(const mavros_msgs::State& s)
|
||||
inline void publishBodyFrame()
|
||||
{
|
||||
if (body.child_frame_id.empty()) return;
|
||||
if (!body.header.stamp.isZero() && body.header.stamp == local_position.header.stamp) {
|
||||
return; // avoid TF_REPEATED_DATA warnings
|
||||
}
|
||||
|
||||
tf::Quaternion q;
|
||||
q.setRPY(0, 0, tf::getYaw(local_position.pose.orientation));
|
||||
|
||||
Reference in New Issue
Block a user