Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Runs a single command using the runners shell
- name: Install dependencies
Expand All @@ -34,7 +34,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libeigen3-dev
- name: Install lcov
Expand All @@ -48,7 +48,9 @@ jobs:
- name: List coverage summary
run: /usr/bin/lcov --list ./build/coverage.info
- name: Upload report to codecov
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} -f ./build/coverage.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -f ./build/coverage.info
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: recursive

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libeigen3-dev python3-pip
run: sudo apt-get update && sudo apt-get install -y libeigen3-dev

- name: Install conan
run: python3 -m pip install conan
run: pipx install "conan~=2.0"

- name: Create conan package
run: |
conan profile detect
conan create .
conan create . --build=missing
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "third_party"]
path = third_party
url = https://github.com/google/googletest.git
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
4 changes: 4 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.sources=src, include
sonar.exclusions=third_party/**
sonar.cfamily.reportingCppStandardVersion=c++17
sonar.test.exclusions=**/test/**
32 changes: 16 additions & 16 deletions include/algorithm/robotics/astar_variant/map_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ class MapStorage {
};

public:
/*
y
^
|
|
|
|_________>x
*/
MapStorage(const size_t x_size, const size_t y_size)
: map_x_size_(x_size), map_y_size_(y_size) {
std::vector<std::vector<Cell>> map(map_x_size_,
std::vector<Cell>(map_y_size_));
map_ = map;
}
/**
* Coordinate frame:
* @verbatim
* y
* ^
* |
* |
* |_________> x
* @endverbatim
*/
MapStorage(size_t x_size, size_t y_size)
: map_x_size_(x_size),
map_y_size_(y_size),
map_(x_size, std::vector<Cell>(y_size)) {}

bool Contains(const Coordinate &coordinate) const {
return (coordinate.x >= 0 && coordinate.x < static_cast<int>(map_x_size_) &&
Expand All @@ -79,10 +79,10 @@ class MapStorage {
}
}

std::vector<std::vector<Cell>> map_;

size_t map_x_size_;
size_t map_y_size_;

std::vector<std::vector<Cell>> map_;
};
} // namespace pllee4::graph
#endif /* MAP_STORAGE_HPP */
16 changes: 6 additions & 10 deletions src/generic/digital_filter/test/butterworth_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@ TEST(Butterworth, StepFilter) {
Butterworth<double>::FilterType::kLowPass);
std::vector<double> expected_values = {0.00773315, 0.0229602, 0.0377163,
0.052016, 0.0658733};
auto check_filtered_signal = [&butter](const double value) {
EXPECT_NEAR(butter.StepFilter(0.5), value, 0.001);
};
std::for_each(expected_values.begin(), expected_values.end(),
check_filtered_signal);
for (const auto expected : expected_values) {
EXPECT_NEAR(butter.StepFilter(0.5), expected, 0.001);
}
}

TEST(Butterworth, SetCutoffFrequency) {
Expand All @@ -91,9 +89,7 @@ TEST(Butterworth, SetCutoffFrequency) {
butter.SetCutoffFrequency(5);
std::vector<double> expected_values = {0.00773315, 0.0229602, 0.0377163,
0.052016, 0.0658733};
auto check_filtered_signal = [&butter](const double value) {
EXPECT_NEAR(butter.StepFilter(0.5), value, 0.001);
};
std::for_each(expected_values.begin(), expected_values.end(),
check_filtered_signal);
for (const auto expected : expected_values) {
EXPECT_NEAR(butter.StepFilter(0.5), expected, 0.001);
}
}
5 changes: 2 additions & 3 deletions src/robotics/astar_variant/src/astar_variant_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ namespace pllee4::graph {
void AstarVariantBase::SetMapStorageSize(const size_t x_size,
const size_t y_size) {
map_storage_ = std::make_unique<MapStorage>(x_size, y_size);
std::vector<std::vector<bool>> visited_map(x_size,
std::vector<bool>(y_size, false));
visited_map_ = visited_map;
visited_map_ =
std::vector<std::vector<bool>>(x_size, std::vector<bool>(y_size, false));
}

bool AstarVariantBase::SetOccupiedGrid(
Expand Down
2 changes: 1 addition & 1 deletion src/robotics/bresenham/src/bresenham.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ LineGenerator::LineGenerator(const Coordinate& start, const Coordinate& end) {

std::vector<Coordinate> LineGenerator::GetPoints() const { return points_; }

} // namespace pllee4::graph
} // namespace pllee4::graph
2 changes: 1 addition & 1 deletion third_party/googletest
Submodule googletest updated 220 files
Loading