15#include "../algorithms/DifferentialDrive.hpp"
18#include <RoveComm/RoveComm.h>
19#include <RoveComm/RoveCommManifest.h>
21#include <shared_mutex>
42 float m_fMinDriveEffort;
43 float m_fMaxDriveEffort;
44 std::shared_mutex m_muDriveEffortMutex;
57 const std::function<void(
const rovecomm::RoveCommPacket<float>&,
const sockaddr_in&)>
SetMaxSpeedCallback =
58 [
this](
const rovecomm::RoveCommPacket<float>& stPacket,
const sockaddr_in& stdAddr)
67 LOG_INFO(logging::g_qSharedLogger,
"Incoming SETMAXSPEED: {}", stPacket.vData[0]);
82 const double dGoalHeading,
83 const double dActualHeading,
84 const diffdrive::DifferentialControlMethod eKinematicsMethod);
This class handles communication with the drive board on the rover by sending RoveComm packets over t...
Definition DriveBoard.h:34
~DriveBoard()
Destroy the Drive Board::DriveBoard object.
Definition DriveBoard.cpp:67
DriveBoard()
Construct a new Drive Board::DriveBoard object.
Definition DriveBoard.cpp:31
diffdrive::DrivePowers CalculateMove(const double dGoalSpeed, const double dGoalHeading, const double dActualHeading, const diffdrive::DifferentialControlMethod eKinematicsMethod)
This method determines drive powers to make the Rover drive towards a given heading at a given speed.
Definition DriveBoard.cpp:92
diffdrive::DrivePowers GetDrivePowers() const
Accessor for the current drive powers of the robot.
Definition DriveBoard.cpp:213
void SetMaxDriveEffort(const float fMaxDriveEffortMultiplier)
Set the max power limits of the drive.
Definition DriveBoard.cpp:195
const std::function< void(const rovecomm::RoveCommPacket< float > &, const sockaddr_in &)> SetMaxSpeedCallback
Callback function that is called whenever RoveComm receives a new SETMAXSPEED packet.
Definition DriveBoard.h:57
void SendStop()
Stop the drivetrain of the Rover.
Definition DriveBoard.cpp:162
void SendDrive(diffdrive::DrivePowers &stDrivePowers)
Sets the left and right drive powers of the drive board.
Definition DriveBoard.cpp:120
This class encapsulates the fundamental principles of Proportional-Integral-Derivative (PID) control ...
Definition PIDController.h:50
This struct is used to store the left and right drive powers for the robot. Storing these values in a...
Definition DifferentialDrive.hpp:73