Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
241a2bf
New robot definitions setup
HeroOfWind243 May 6, 2025
95a52fb
fixed swerve motor constant that prevented movement
zDagger May 28, 2025
50d9f64
adjusted motor constants
zDagger May 28, 2025
8f5950e
fixed motor offsets and tuned pid some
zDagger May 28, 2025
006b915
fixed inverted chassis controls
zDagger May 28, 2025
a888423
added defense mode
zDagger Jun 4, 2025
fdaf930
began work on swerve optimize func
zDagger Jun 5, 2025
156fe5f
began fleshing out optimizer
zDagger Jun 5, 2025
9e5701b
fixed many hero constants
zDagger Jun 8, 2025
80218fd
finished swerve optimizer
zDagger Jun 11, 2025
4e2f7a9
Merge branch 'comp/feature/swerveoptimization' into comp/rmna-25
zDagger Jun 11, 2025
0373a3b
optimized defense mode
zDagger Jun 11, 2025
373cc6c
updated hero constants and began swap to limit fire
zDagger Jun 14, 2025
bb8f704
Co-authored-by: Tyler Hedge <[email protected]>
zDagger Jun 14, 2025
e43abaa
adjusting feeder limit and added pid for heros second feeder
zDagger Jun 14, 2025
5660fe9
fully fixed hero single shot
zDagger Jun 15, 2025
4bd7db2
fixed timers foe single shot
zDagger Jun 15, 2025
9ff9a32
lobotomized hero partially
zDagger Jun 15, 2025
b9bd723
updated sentry constants
zDagger Jun 18, 2025
901f218
fixed hero feeder definitions
zDagger Jun 18, 2025
825261b
began fleshing out i2c power limiting code
zDagger Jun 18, 2025
7c211cc
tap
zDagger Jun 25, 2025
d9590f2
final touches on hero
zDagger Jun 25, 2025
ba52268
fixed standard gimball pid
zDagger Jun 25, 2025
207bfb7
unlobotomized hero
zDagger Jun 25, 2025
93759e0
fixed sentry const
zDagger Jun 25, 2025
88d4172
merges power reading with pre rebuild branch
zDagger Jun 25, 2025
3ebb0a4
slowed flywheels on standard/sentry
TechSheepy Jun 26, 2025
6b54934
fixed blastoise offset
zDagger Jun 26, 2025
84e6c9e
removed old power limit
zDagger Jun 26, 2025
7f67cd5
added barrel over heat limit for single shot fire
zDagger Jun 26, 2025
ab096a7
starting yaw tuning
TechSheepy Jun 26, 2025
0899661
Merge branch 'feature/heroPowerMerge' into feature/sentrySwerve
zDagger Jun 26, 2025
afdece7
updated cv gimbal scheduler
zDagger Jun 26, 2025
3feb192
removed descheduler from sentry gimbal
zDagger Jun 26, 2025
d3ca22a
removed barrel heat limit
zDagger Jun 26, 2025
e32f57a
removed barrel heat limiter
zDagger Jun 26, 2025
b3dc855
removed barrel heat limit
zDagger Jun 26, 2025
0d8aade
lowred standard shooting speed
zDagger Jun 26, 2025
c609135
chassis pid tuning
TechSheepy Jun 27, 2025
38d0518
tuned sentry
zDagger Jun 27, 2025
4869a3d
attempt at fixing wheel jerk
zDagger Jul 1, 2025
cbd3020
added dune theme for sentry
zDagger Jul 1, 2025
cd2f9dd
re added sentry match points
zDagger Jul 10, 2025
0ca922b
fixed 2025 yaw offset
zDagger Aug 14, 2025
80f629a
also updated stadard offsets here
zDagger Aug 14, 2025
61e3cc5
Merge branch 'feature/sentrySwerve' into merge/fall25
zDagger Sep 4, 2025
cba0e7f
removed temporary imu uart communicator from comp
zDagger Sep 9, 2025
d8f7ab2
transfer progress from last week, compiles
ZHENG-HAO-99 Sep 10, 2025
b0ee833
compiles yippie :D (pls test soon)
ZHENG-HAO-99 Sep 10, 2025
2486a6c
numbers seeem reasonable
ZHENG-HAO-99 Sep 17, 2025
6949efc
chassis display WONT FKN GRAPH WTF
ZHENG-HAO-99 Sep 17, 2025
5d5465c
Sentry drives again!
TechSheepy Sep 19, 2025
e7388fb
fixed pitch stabilization
TechSheepy Sep 23, 2025
98b47d8
updated sentry constants and added watch variables for setting swerve…
zDagger Sep 23, 2025
cd53433
tuned some pids for bullying kids
TechSheepy Sep 23, 2025
33f64d3
chassis imu defined
svukryggi Sep 24, 2025
4cd9738
IT WORKED
svukryggi Sep 24, 2025
de0ffad
no more chassis angular jiggle
TechSheepy Sep 25, 2025
04588a3
Allow on-the-fly PID tuning for swerve motors and gimbal rotate.
BlakeleyNicholson Sep 26, 2025
cf7d774
swerve optimization
TechSheepy Sep 27, 2025
9149cf1
Yaw PIDs are tuned but slow
TechSheepy Sep 30, 2025
40d8e54
9/30/25 PID Test
ryukeion Oct 1, 2025
c783947
corrected sentry feeder consts
zDagger Oct 3, 2025
ca671e2
tuned tokyo and added chassis ignore gimbal command
TechSheepy Oct 5, 2025
1016474
Merge branch 'feature/swerve-improvments' of https://github.com/TAMU-…
TechSheepy Oct 5, 2025
8297492
Tuned Standard Shooter Velocity PID
HRNAE Oct 17, 2025
fddbc7f
Sentry Shooter Speed Tuning
Jkvelagapudi Oct 17, 2025
9e2301c
tuned shooter speed array
HRNAE Oct 17, 2025
197a9fb
Merge branch 'feature/tuning' of https://github.com/TAMU-Robomasters/…
HRNAE Oct 17, 2025
07c620f
Small fix on standard
HRNAE Oct 17, 2025
debf433
Co-authored-by: Jayadeep Velagapudi <[email protected]
HRNAE Oct 24, 2025
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
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,19 @@
"strstream": "cpp",
"cfenv": "cpp",
"typeindex": "cpp",
"*.ipp": "cpp"
"*.ipp": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"charconv": "cpp",
"xfacet": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xmemory": "cpp",
"xtr1common": "cpp"
},
"search.exclude": {
"**/node_modules": true,
Expand Down
5 changes: 5 additions & 0 deletions aimbots-src/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"optional": "cpp"
}
}
5 changes: 3 additions & 2 deletions aimbots-src/build_tools/extract_robot_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
ROBOT_TYPE_FILE = "robot-type/robot_type.hpp"
VALID_ROBOT_TYPES = [ "STANDARD_2023",
"STANDARD_BLASTOISE",
"STANDARD_WARTORTLE",
"STANDARD_SQUIRTLE",
"STANDARD_2025",
"AERIAL",
"ENGINEER",
"SENTRY",
"SENTRY_BRAVO",
"SENTRY_SWERVE",
"HERO",
"DART",
"CVTEST_HAN",
Expand Down
18 changes: 18 additions & 0 deletions aimbots-src/src/communicators/I2C/power_com.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//for reading the power limiting board for robots
//TODO fix targets, currently just not defined for engineer
#ifndef TARGET_ENGINEER
#include "modm/architecture/interface/i2c_device.hpp"
#include "modm/architecture/interface/register.hpp"
#include "modm/processing/protothread.hpp"
#include "modm/processing/resumable.hpp"

namespace src::Communication {
class PowerComm : public tap::communication::serial::DJISerial{
public:

}
}



#endif
16 changes: 16 additions & 0 deletions aimbots-src/src/communicators/I2C/power_com_data.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef TARGET_ENGINEER

#include "tap/algorithms/math_user_utils.hpp"

#include "modm/architecture/interface/register.hpp"
#include "modm/math/utils.hpp"

namespace src::communicators::I2C::power_comm {
enum Register : uint8_t{
DEVICE_ADRESS = 0x6A,
WHO_AM_I = 0x0F,

}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifdef REF_COMM_COMPATIBLE

namespace src::Communication {
#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
struct robot_state_message_team {
/* data */
uint16_t standardX, standardY, heroX, heroY, sentryX, sentryY;
Expand All @@ -26,7 +26,7 @@ struct robot_state_message_enemy {
#endif

enum class MessageType : uint8_t {
#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
TEAM_MESSAGE_STANDARD,
TEAM_MESSAGE_HERO,
TEAM_MESSAGE_SENTRY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

#include "tap/control/command.hpp"

//this doesn't exist
// #include "communication_outbound_subsystem.hpp"
// this doesn't exist
// #include "communication_outbound_subsystem.hpp"

#ifdef REF_COMM_COMPATIBLE

namespace src::Communication {

#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
class TeamMessageStandard : public tap::control::Command {
public:
TeamMessageStandard(CommunicationOutBoundSubsystem &communicationOutBoundSubsystem) : sub(communicationOutBoundSubsystem) {
TeamMessageStandard(CommunicationOutBoundSubsystem &communicationOutBoundSubsystem)
: sub(communicationOutBoundSubsystem) {
this->addSubsyemRequirement(&communicationOutBoundSubsystem);
}

Expand Down Expand Up @@ -47,7 +48,8 @@ class TeamMessageHero : public tap::control::Command {
#else
class CommunicationMessage : public tap::control::Command {
public:
communicationMessage(CommunicationOutBoundSubsystem &communicationOutBoundSubsystem) : sub(communicationOutBoundSubsystem) {
communicationMessage(CommunicationOutBoundSubsystem &communicationOutBoundSubsystem)
: sub(communicationOutBoundSubsystem) {
this->addSubsyemRequirement(&communicationOutBoundSubsystem);
}

Expand Down Expand Up @@ -82,4 +84,4 @@ class EnemyStateMessage : public tap::control::Command {
#endif
} // namespace src::Communication

#endif //#ifdef REF_COMM_COMPATIBLE
#endif //#ifdef REF_COMM_COMPATIBLE
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ namespace src::Communication {
CommunicationRequestHandler::CommunicationRequestHandler(src::Drivers* drivers) : drivers(drivers) {}

void CommunicationRequestHandler::operator()(const tap::communication::serial::DJISerial::ReceivedSerialMessage& message) {
MessageType type = static_cast<MessageType>(message.data[sizeof(tap::communication::serial::RefSerialData::Tx::InteractiveHeader)]);
MessageType type =
static_cast<MessageType>(message.data[sizeof(tap::communication::serial::RefSerialData::Tx::InteractiveHeader)]);

switch (type) {
#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
// case MessageType::TEAM_MESSAGE_STANDARD:
// if (teamMesssageHandlerStandard != nullptr) {
// updateRobotStateStandard();
Expand Down Expand Up @@ -51,4 +52,4 @@ void CommunicationRequestHandler::operator()(const tap::communication::serial::D

} // namespace src::Communication

#endif // #ifdef REF_COMM_COMPATIBLE
#endif // #ifdef REF_COMM_COMPATIBLE
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include "tap/communication/serial/ref_serial.hpp"
// #include "tap/communication/serial/ref_serial_transmitter.hpp"

#include "modm/architecture/interface/register.hpp"
#include "modm/processing/protothread.hpp"
#include "informants/robot-states/robot_state.hpp"
#include "informants/robot-states/robot_state_interface.hpp"
#include "modm/architecture/interface/register.hpp"
#include "modm/processing/protothread.hpp"

#include "drivers.hpp"

Expand All @@ -23,7 +23,7 @@ class CommunicationRequestHandler : public tap::communication::serial::RefSerial
bool recive();

void updateStates();
#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
void attachTeamMessageHandlerStandard(MessageReceivedCallback message) { teamMesssageHandlerStandard = message; }
void attachTeamMessageHandlerHero(MessageReceivedCallback message) { teamMesssageHandlerHero = message; }

Expand All @@ -34,7 +34,7 @@ class CommunicationRequestHandler : public tap::communication::serial::RefSerial
private:
src::Drivers* drivers;

#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
MessageReceivedCallback teamMesssageHandlerStandard = nullptr;
MessageReceivedCallback teamMesssageHandlerHero = nullptr;
MessageReceivedCallback teamMessageHandlerSentry = nullptr;
Expand All @@ -43,6 +43,6 @@ class CommunicationRequestHandler : public tap::communication::serial::RefSerial
MessageReceivedCallback enemyRobotStateHandler = nullptr;
#endif
};
} // namespace src::robotStates
} // namespace src::Communication

#endif // #ifdef REF_COMM_COMPATIBLE
#endif // #ifdef REF_COMM_COMPATIBLE
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
#ifdef REF_COMM_COMPATIBLE

namespace src::Communication {
CommunicationRequestTransmiter::CommunicationRequestTransmiter(src::Drivers* drivers) : drivers(drivers), refSerial(drivers) {}
CommunicationRequestTransmiter::CommunicationRequestTransmiter(src::Drivers* drivers)
: drivers(drivers),
refSerial(drivers) {}

bool CommunicationRequestTransmiter::send() {
PT_BEGIN();
Expand All @@ -27,7 +29,8 @@ bool CommunicationRequestTransmiter::send() {
PT_CALL(refSerial.sendRobotToRobotMsg(
&robotToRobotMessage,
SENTRY_REQUEST_ROBOT_ID,
drivers->refSerial.getRobotIdBasedOnCurrentRobotTeam(tap::communication::serial::RefSerialData::RobotId::BLUE_SENTINEL),
drivers->refSerial.getRobotIdBasedOnCurrentRobotTeam(
tap::communication::serial::RefSerialData::RobotId::BLUE_SENTINEL),
1));
} else {
PT_YIELD();
Expand All @@ -43,7 +46,7 @@ bool CommunicationRequestTransmiter::send() {
void CommunicationRequestTransmiter::updateQue(MessageType type) {
queuedMessageType |= (1 << static_cast<uint8_t>(type));

// #ifdef TARGET_SENTRY
// #ifdef ALL_SENTRIES
// // Team color = drivers->refSerial->getRobotData().robotID == 7 ? Team::RED : Team::BLUE;
// Team color = Team::RED;
// // Team color = drivers->getRobotData->robotData.robotId == RED_SENTINEL ? Team::RED : Team::BLUE;
Expand All @@ -54,4 +57,4 @@ void CommunicationRequestTransmiter::updateQue(MessageType type) {

} // namespace src::Communication

#endif // #ifdef REF_COMM_COMPATIBLE
#endif // #ifdef REF_COMM_COMPATIBLE
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class CommunicationRequestTransmiter : public modm::pt::Protothread {

// RobotStates* robotStateInterface;

// #ifdef TARGET_SENTRY
// #ifdef ALL_SENTRIES
static constexpr uint16_t SENTRY_REQUEST_ROBOT_ID = 0x200;

#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
MessageType lastSentMessage = MessageType::TEAM_MESSAGE_STANDARD;
#else
MessageType lastSentMessage = MessageType::ROBOT_STATE;
Expand All @@ -51,7 +51,8 @@ class CommunicationRequestTransmiter : public modm::pt::Protothread {

// otherwise, iterate through message types until you find one that is queued
auto nextMessageType = [](MessageType type) {
return static_cast<MessageType>((static_cast<uint8_t>(type) + 1) % static_cast<uint8_t>(MessageType::NUM_MESSAGE_TYPES));
return static_cast<MessageType>(
(static_cast<uint8_t>(type) + 1) % static_cast<uint8_t>(MessageType::NUM_MESSAGE_TYPES));
};

lastSentMessage = nextMessageType(lastSentMessage);
Expand All @@ -72,4 +73,4 @@ class CommunicationRequestTransmiter : public modm::pt::Protothread {

} // namespace src::Communication

#endif // #ifdef REF_COMM_COMPATIBLE
#endif // #ifdef REF_COMM_COMPATIBLE
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ uint8_t value2;
uint8_t value3;
uint8_t value4;
bool CommunicationResponseSubsytem::run() {
#ifdef TARGET_SENTRY
#ifdef ALL_SENTRIES
// ms = states.createMessage();
// uint16_t sx = ms.standardX;
test = static_cast<unsigned char>(rand() % 0xff);
Expand Down Expand Up @@ -68,7 +68,8 @@ bool CommunicationResponseSubsytem::run() {
this->robotToRobotMessage.dataAndCRC16[1] = value2; // static_cast<uint8_t>(sx);
this->robotToRobotMessage.dataAndCRC16[2] = value3; // static_cast<uint8_t>(sx);
this->robotToRobotMessage.dataAndCRC16[3] = value4; // static_cast<uint8_t>(sy);
// this->robotToRobotMessage.dataAndCRC16[4] = static_cast<unsigned char>(rand() % 0xff); // static_cast<uint8_t>(sy);
// this->robotToRobotMessage.dataAndCRC16[4] = static_cast<unsigned char>(rand() % 0xff); //
// static_cast<uint8_t>(sy);

// if (this->sentryMoving != this->getDriveStatus()) {
// this->sentryMoving = this->getDriveStatus();
Expand All @@ -85,7 +86,8 @@ bool CommunicationResponseSubsytem::run() {
PT_CALL(this->refSerialTransmitter.sendRobotToRobotMsg(
&this->robotToRobotMessage,
SENTRY_RESPONSE_MESSAGE_ID,
drivers.refSerial.getRobotIdBasedOnCurrentRobotTeam(tap::communication::serial::RefSerialData::RobotId::BLUE_HERO),
drivers.refSerial.getRobotIdBasedOnCurrentRobotTeam(
tap::communication::serial::RefSerialData::RobotId::BLUE_HERO),
4));
// }

Expand All @@ -107,4 +109,4 @@ bool CommunicationResponseSubsytem::run() {

} // namespace src::Communication

#endif // #ifdef REF_COMM_COMPATIBLE
#endif // #ifdef REF_COMM_COMPATIBLE
3 changes: 3 additions & 0 deletions aimbots-src/src/drivers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
// #include "informants/ultrasonic_distance_sensor.hpp"
#include "communicators/devboard/turret_can_communicator.hpp"
#include "communicators/jetson/jetson_communicator.hpp"
//#include "communicators/INA260/INA260_communicator.hpp"
#include "utils/music/jukebox_player.hpp"
#include "utils/nxp_imu/magnetometer/ist8310.hpp"
#include "utils/tools/robot_specific_defines.hpp"
Expand All @@ -44,6 +45,7 @@ class Drivers : public tap::Drivers {
controlOperatorInterface(this),
magnetometer(),
cvCommunicator(this),
// powerCommunicator(this),
kinematicInformant(this),
hitTracker(this),
turretCommunicator(this, CANBus::CAN_BUS1),
Expand All @@ -53,6 +55,7 @@ class Drivers : public tap::Drivers {
Control::OperatorInterface controlOperatorInterface;
utils::Ist8310 magnetometer;
Informants::Vision::JetsonCommunicator cvCommunicator;
// Informants::INA260::INA260Communicator powerCommunicator;
Informants::KinematicInformant kinematicInformant;
Informants::HitTracker hitTracker;
Informants::TurretComms::TurretCommunicator turretCommunicator;
Expand Down
6 changes: 3 additions & 3 deletions aimbots-src/src/informants/imu/calibrate_imu_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ void IMUCalibrateCommand::execute() {

if (gimbalController.allOnlineYawControllersSettled(modm::toRadian(1.0f), 1000) &&
gimbalController.allOnlinePitchControllersSettled(modm::toRadian(1.0f), 1000)) {
#ifdef TURRET_IMU
drivers->turretCommunicator.requestTurretIMUCalibrate();
#endif
// #ifdef TURRET_IMU
// drivers->turretCommunicator.requestTurretIMUCalibrate();
// #endif
#ifndef TARGET_TURRET
drivers->kinematicInformant.recalibrateIMU(
{CIMU_CALIBRATION_EULER_X, CIMU_CALIBRATION_EULER_Y, CIMU_CALIBRATION_EULER_Z});
Expand Down
Loading