mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
simple_offboard: fix transform timeout in /navigate_global
This commit is contained in:
@@ -351,6 +351,10 @@ PoseStamped globalToLocal(double lat, double lon)
|
||||
x_offset = distance * sin(azimuth_radians);
|
||||
y_offset = distance * cos(azimuth_radians);
|
||||
|
||||
if (!waitTransform(local_frame, fcu_frame, global_position.header.stamp, ros::Duration(1))) {
|
||||
throw std::runtime_error("No local position");
|
||||
}
|
||||
|
||||
auto local = tf_buffer.lookupTransform(local_frame, fcu_frame, global_position.header.stamp);
|
||||
|
||||
PoseStamped pose;
|
||||
|
||||
Reference in New Issue
Block a user