-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor includes, add clang-format * create github action * Committing clang-format changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4f4110e
commit cd85077
Showing
35 changed files
with
1,144 additions
and
1,069 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
BasedOnStyle: LLVM | ||
AlignAfterOpenBracket: Align | ||
AllowShortFunctionsOnASingleLine: None | ||
AllowShortIfStatementsOnASingleLine: Never | ||
BraceWrapping: | ||
BeforeElse: true | ||
BreakBeforeBraces: Attach | ||
ColumnLimit: 80 | ||
DerivePointerAlignment: false | ||
IndentCaseLabels: false | ||
IndentWidth: 4 | ||
Language: Cpp | ||
PointerAlignment: Left | ||
SortIncludes: CaseInsensitive | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpacesBeforeTrailingComments: 1 | ||
Standard: Cpp11 | ||
TabWidth: 4 | ||
UseTab: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Clang Format | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Format | ||
uses: DoozyX/[email protected] | ||
with: | ||
source: './src ./include/VOSS' | ||
clangFormatVersion: 14 | ||
inplace: True | ||
- name: Commit | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
message: 'Committing clang-format changes' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#pragma once | ||
|
||
#include "voss/chassis/ChassisCommand.hpp" | ||
#include "voss/localizer/AbstractLocalizer.hpp" | ||
#include "VOSS/chassis/ChassisCommand.hpp" | ||
#include "VOSS/localizer/AbstractLocalizer.hpp" | ||
|
||
namespace voss::controller { | ||
|
||
class AbstractController { | ||
|
||
protected: | ||
std::shared_ptr<localizer::AbstractLocalizer> l; | ||
Pose target; | ||
double angular_target; | ||
protected: | ||
std::shared_ptr<localizer::AbstractLocalizer> l; | ||
Pose target; | ||
double angular_target; | ||
|
||
public: | ||
AbstractController(std::shared_ptr<localizer::AbstractLocalizer> l); | ||
public: | ||
AbstractController(std::shared_ptr<localizer::AbstractLocalizer> l); | ||
|
||
virtual chassis::ChassisCommand get_command(bool reverse, bool thru) = 0; | ||
virtual chassis::ChassisCommand get_angular_command(bool reverse, | ||
bool thru) = 0; | ||
virtual chassis::ChassisCommand get_command(bool reverse, bool thru) = 0; | ||
virtual chassis::ChassisCommand get_angular_command(bool reverse, | ||
bool thru) = 0; | ||
|
||
virtual void reset() = 0; | ||
virtual void reset() = 0; | ||
|
||
void set_target(Pose target, bool relative); | ||
void set_angular_target(double angle, bool relative); | ||
void set_target(Pose target, bool relative); | ||
void set_angular_target(double angle, bool relative); | ||
}; | ||
|
||
} // namespace voss::controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
#pragma once | ||
|
||
#include "voss/controller/BoomerangController.hpp" | ||
#include "VOSS/controller/BoomerangController.hpp" | ||
|
||
namespace voss::controller { | ||
|
||
class BoomerangControllerBuilder { | ||
private: | ||
controller::BoomerangController ctrl; | ||
|
||
public: | ||
BoomerangControllerBuilder(std::shared_ptr<localizer::AbstractLocalizer> l); | ||
|
||
static BoomerangControllerBuilder | ||
new_builder(std::shared_ptr<localizer::AbstractLocalizer> l); | ||
|
||
BoomerangControllerBuilder& with_linear_constants(double kP, double kI, | ||
double kD); | ||
BoomerangControllerBuilder& with_angular_constants(double kP, double kI, | ||
double kD); | ||
BoomerangControllerBuilder& with_tracking_kp(double kP); | ||
BoomerangControllerBuilder& with_exit_error(double error); | ||
BoomerangControllerBuilder& with_angular_exit_error(double error); | ||
BoomerangControllerBuilder& with_min_error(double error); | ||
BoomerangControllerBuilder& with_lead_pct(double lead_pct); | ||
BoomerangControllerBuilder& with_settle_time(double time); | ||
|
||
BoomerangController build(); | ||
private: | ||
controller::BoomerangController ctrl; | ||
|
||
public: | ||
BoomerangControllerBuilder(std::shared_ptr<localizer::AbstractLocalizer> l); | ||
|
||
static BoomerangControllerBuilder | ||
new_builder(std::shared_ptr<localizer::AbstractLocalizer> l); | ||
|
||
BoomerangControllerBuilder& with_linear_constants(double kP, double kI, | ||
double kD); | ||
BoomerangControllerBuilder& with_angular_constants(double kP, double kI, | ||
double kD); | ||
BoomerangControllerBuilder& with_tracking_kp(double kP); | ||
BoomerangControllerBuilder& with_exit_error(double error); | ||
BoomerangControllerBuilder& with_angular_exit_error(double error); | ||
BoomerangControllerBuilder& with_min_error(double error); | ||
BoomerangControllerBuilder& with_lead_pct(double lead_pct); | ||
BoomerangControllerBuilder& with_settle_time(double time); | ||
|
||
BoomerangController build(); | ||
}; | ||
|
||
} // namespace voss::controller |
Oops, something went wrong.