Skip to content

Commit

Permalink
Merge pull request #125 from RoboTeamTwente/update/path-planning
Browse files Browse the repository at this point in the history
Update/path planning
  • Loading branch information
JornJorn authored May 17, 2024
2 parents b1cc304 + cc6daf0 commit cf9d9e1
Show file tree
Hide file tree
Showing 163 changed files with 1,682 additions and 2,896 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-interface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doxy-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: "true"
- name: Install Doxygen
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/tests-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: Restored cached build
id: cache-build-restore
uses: actions/cache/restore@v3
with:
path: .
key: ${{ runner.os }}-build
# - name: Restored cached build
# id: cache-build-restore
# uses: actions/cache/restore@v4
# with:
# path: .
# key: ${{ runner.os }}-build

- name: Install dependecies
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
./autogen.sh
./autogen.sh
./configure
make
make -j $(nproc)
make check
- name: Install Protobuf
Expand All @@ -55,8 +55,7 @@ jobs:

- name: Install tests
run: |
cmake --build build --target all
# cmake --build build --target all -j $(nproc)
cmake --build build --target all -j $(nproc)
- name: Run
run: find ./build/debug/bin/ -type f -iname "*test*" -exec {} \;
Expand Down
3 changes: 2 additions & 1 deletion cmake_modules/GetIXWebSocket.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ include(FetchContent)

FetchContent_Declare(IXWebSocket
GIT_REPOSITORY https://github.com/machinezone/IXWebSocket.git
GIT_TAG master
GIT_TAG v11.4.5
GIT_SHALLOW TRUE
)

FetchContent_MakeAvailable(IXWebSocket)
2 changes: 1 addition & 1 deletion cmake_modules/GetTracy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(FetchContent)
FetchContent_Declare (
tracy
GIT_REPOSITORY https://github.com/wolfpld/tracy.git
GIT_TAG master
GIT_TAG v0.10
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
Expand Down
3 changes: 0 additions & 3 deletions docs/World.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ if (currentWorld.has_value()) {
the internal world accordingly. Takes ownership of the original data.
Ownership will be explained in a lecture about move semantics.

`updatePositionControl` -> Updates the internal `positionControl` using the new robot positions
in the current world data representation.

`getWorld` -> Gets an optional pointer to `currentWorld`.

`getField` -> Returns `this->currentField`
Expand Down
2 changes: 1 addition & 1 deletion roboteam_ai/.github/workflows/doxy-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
deploy_doxy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: 'Build'
uses: mattnotmitt/[email protected] # action to create the documentation from the specified doxygen config file
Expand Down
17 changes: 0 additions & 17 deletions roboteam_ai/include/roboteam_ai/control/ControlUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ class ControlUtils {
*/
static Vector2 velocityLimiter(const Vector2 &vel, double maxVel = Constants::MAX_VEL(), double minVel = 0.0, bool listenToReferee = true);

/**
* @brief Limits the acceleration
* @param targetVel velocity the robot should be at
* @param prevVel velocity of the robot in the previous tick
* @param targetAngle the angle the robot should be at
* @param sidewaysAcceleration maximum sideways acceleration
* @param forwardsAcceleration maximum forward acceleration
* @param sidewaysDeceleration maximum sideways deceleration
* @param forwardsDeceleration maximum forward deceleration
* @return limited acceleration
*/
static Vector2 accelerationLimiter(const Vector2 &targetVel, const Vector2 &prevVel, const Angle &targetAngle,
double sidewaysAcceleration = Constants::MAX_ACC_LOWER() / Constants::STP_TICK_RATE(),
double forwardsAcceleration = Constants::MAX_ACC_UPPER() / Constants::STP_TICK_RATE(),
double sidewaysDeceleration = Constants::MAX_DEC_LOWER() / Constants::STP_TICK_RATE(),
double forwardsDeceleration = Constants::MAX_DEC_UPPER() / Constants::STP_TICK_RATE());

/**
* @brief calculates whether the object velocity will collide with a point
* @param objectPosition position of the object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <array>
#include <vector>

namespace rtt::BB {
namespace rtt::ai::control {
/**
* @brief Represents a segment of a one-dimensional bang-bang trajectory.
*/
Expand Down Expand Up @@ -105,7 +105,7 @@ class BBTrajectory1D {
* @brief Puts all BBT parts in a vector
* @return All BBT parts as a vector
*/
std::vector<BB::BBTrajectoryPart> getParts();
std::vector<rtt::ai::control::BBTrajectoryPart> getParts();

/**
* @brief Constructor for the BBTrajectory1D class
Expand Down Expand Up @@ -168,6 +168,6 @@ class BBTrajectory1D {
double finalPos; /**< Target position to go to */
double maxVel; /**< Maximum allowed velocity */
};
} // namespace rtt::BB
} // namespace rtt::ai::control

#endif // RTT_BBTRAJECTORY1D_H
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "BBTrajectory1D.h"

namespace rtt::BB {
namespace rtt::ai::control {

/**
* @author Rolf
Expand Down Expand Up @@ -73,7 +73,7 @@ class BBTrajectory2D {
/**
* @brief Returns all the trajectory parts in both dimensions to use in the Trajectory2D class
*/
[[nodiscard]] std::pair<std::vector<BB::BBTrajectoryPart>, std::vector<BB::BBTrajectoryPart>> getParts();
[[nodiscard]] std::pair<std::vector<rtt::ai::control::BBTrajectoryPart>, std::vector<rtt::ai::control::BBTrajectoryPart>> getParts();

private:
/**
Expand All @@ -93,5 +93,5 @@ class BBTrajectory2D {
BBTrajectory1D x; /**< 1D x component of the 2D BBT */
BBTrajectory1D y; /**< 1D y component of the 2D BBT */
};
} // namespace rtt::BB
} // namespace rtt::ai::control
#endif // RTT_BBTRAJECTORY2D_H
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Trajectory1D {
* @param newParts Trajectory which needs to be stored
* @param addFromTime Time the trajectory was created
*/
void addTrajectory(const std::vector<BB::BBTrajectoryPart> &newParts, double addFromTime);
void addTrajectory(const std::vector<rtt::ai::control::BBTrajectoryPart> &newParts, double addFromTime);

/**
* @brief Gets the position at time t
Expand Down Expand Up @@ -44,9 +44,9 @@ class Trajectory1D {
*/
[[nodiscard]] double getTotalTime() const;

std::vector<BB::BBTrajectoryPart> parts; /**< Vector containing all parts of the trajectory */
double finalPos; /**< Target position to go to */
double maxVel; /**< Maximum allowed velocity */
std::vector<rtt::ai::control::BBTrajectoryPart> parts; /**< Vector containing all parts of the trajectory */
double finalPos; /**< Target position to go to */
double maxVel; /**< Maximum allowed velocity */
};

} // namespace rtt
Expand Down

This file was deleted.

Loading

0 comments on commit cf9d9e1

Please sign in to comment.