diff --git a/clover/src/optical_flow.cpp b/clover/src/optical_flow.cpp index b7182cd8..b1ecf418 100644 --- a/clover/src/optical_flow.cpp +++ b/clover/src/optical_flow.cpp @@ -152,7 +152,7 @@ private: cv::Point2d shift = cv::phaseCorrelate(prev_, curr_, hann_, &response); // Publish raw shift in pixels - static geometry_msgs::Vector3Stamped shift_vec; + geometry_msgs::Vector3Stamped shift_vec; shift_vec.header.stamp = msg->header.stamp; shift_vec.header.frame_id = msg->header.frame_id; shift_vec.vector.x = shift.x; @@ -179,7 +179,7 @@ private: double flow_y = atan2(points_undist[0].y, focal_length_y); // // Convert to FCU frame - static geometry_msgs::Vector3Stamped flow_camera, flow_fcu; + geometry_msgs::Vector3Stamped flow_camera, flow_fcu; flow_camera.header.frame_id = msg->header.frame_id; flow_camera.header.stamp = msg->header.stamp; flow_camera.vector.x = flow_y; // +y means counter-clockwise rotation around Y axis @@ -198,7 +198,7 @@ private: if (calc_flow_gyro_) { try { auto flow_gyro_camera = calcFlowGyro(msg->header.frame_id, prev_stamp_, msg->header.stamp); - static geometry_msgs::Vector3Stamped flow_gyro_fcu; + geometry_msgs::Vector3Stamped flow_gyro_fcu; tf_buffer_->transform(flow_gyro_camera, flow_gyro_fcu, fcu_frame_id_); flow_.integrated_xgyro = flow_gyro_fcu.vector.x; flow_.integrated_ygyro = flow_gyro_fcu.vector.y; @@ -235,7 +235,7 @@ publish_debug: } // Publish estimated angular velocity - static geometry_msgs::TwistStamped velo; + geometry_msgs::TwistStamped velo; velo.header.stamp = msg->header.stamp; velo.header.frame_id = fcu_frame_id_; velo.twist.angular.x = flow_fcu.vector.x / integration_time.toSec(); diff --git a/clover/src/simple_offboard.cpp b/clover/src/simple_offboard.cpp index bc66d511..2db0a1aa 100644 --- a/clover/src/simple_offboard.cpp +++ b/clover/src/simple_offboard.cpp @@ -712,7 +712,7 @@ bool serve(enum setpoint_type_t sp_type, float x, float y, float z, float vx, fl } if (sp_type == VELOCITY) { - static Vector3Stamped vel; + Vector3Stamped vel; vel.header.frame_id = frame_id; vel.header.stamp = stamp; vel.vector.x = vx; diff --git a/clover/src/vpe_publisher.cpp b/clover/src/vpe_publisher.cpp index 580a5f4e..0c032dcd 100644 --- a/clover/src/vpe_publisher.cpp +++ b/clover/src/vpe_publisher.cpp @@ -53,7 +53,7 @@ void publishZero(const ros::TimerEvent& e) } ROS_INFO_THROTTLE(10, "publish zero"); - static geometry_msgs::PoseStamped zero; + geometry_msgs::PoseStamped zero; zero.header.frame_id = local_frame_id; zero.header.stamp = e.current_real; zero.pose.orientation.w = 1;