Skip to content

Commit

Permalink
Format and lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotScher committed Oct 22, 2024
1 parent 5092322 commit 83d2c08
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
7 changes: 1 addition & 6 deletions wpical/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ wpilib_target_warnings(wpical)
target_include_directories(wpical PRIVATE src/main/native/include)

find_package(OpenCV REQUIRED)
target_link_libraries(
wpical
wpimath
apriltaglib
${OpenCV_LIBS}
)
target_link_libraries(wpical wpimath apriltaglib ${OpenCV_LIBS})

if(WIN32)
set_target_properties(wpical PROPERTIES WIN32_EXECUTABLE YES)
Expand Down
3 changes: 3 additions & 0 deletions wpical/src/main/native/cpp/WPIcal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
#include <fmap.h>

#include <iostream>
#include <memory>
#include <numbers>
#include <string>
#include <vector>

#include <GLFW/glfw3.h>
#include <imgui.h>
Expand Down
7 changes: 6 additions & 1 deletion wpical/src/main/native/cpp/cameracalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

#include "cameracalibration.h"

#include <iostream>
#include <memory>
#include <string>
#include <vector>

bool filter(std::vector<cv::Point2f> charuco_corners,
std::vector<int> charuco_ids,
std::vector<std::vector<cv::Point2f>> marker_corners,
Expand Down Expand Up @@ -205,7 +210,7 @@ int cameracalibration::calibrate(const std::string& input_video,
std::vector<cv::Point3f> obj_points;
std::vector<cv::Point2f> img_points;

mrcal_point3_t points[(board_width - 1) * (board_height - 1)];
const mrcal_point3_t points[(board_width - 1) * (board_height - 1)];

charuco_detector.detectBoard(frame_gray, charuco_corners, charuco_ids,
marker_corners, marker_ids);
Expand Down
11 changes: 10 additions & 1 deletion wpical/src/main/native/cpp/fieldcalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@

#include "fieldcalibration.h"

#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

class PoseGraphError {
public:
PoseGraphError(Pose t_ab_observed)
explicit PoseGraphError(Pose t_ab_observed)
: m_t_ab_observed(std::move(t_ab_observed)) {}

template <typename T>
Expand Down
1 change: 1 addition & 0 deletions wpical/src/main/native/cpp/fmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <iostream>
#include <numbers>
#include <string>

std::string fmap::singleTag(int tag, tag::pose tagpose, bool endTag) {
std::string transform = "";
Expand Down
1 change: 1 addition & 0 deletions wpical/src/main/native/include/cameracalibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define CAMERACALIBRATION_H

#include <fstream>
#include <string>

#include <mrcal_wrapper.h>
#include <opencv2/aruco.hpp>
Expand Down
1 change: 1 addition & 0 deletions wpical/src/main/native/include/fieldcalibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <filesystem>
#include <fstream>
#include <functional>
#include <map>
#include <string>
#include <tuple>
Expand Down
1 change: 1 addition & 0 deletions wpical/src/test/native/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <fieldcalibration.h>

#include <iostream>
#include <string>

#include <gtest/gtest.h>
#include <wpi/json.h>
Expand Down

0 comments on commit 83d2c08

Please sign in to comment.