Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
72dc875
John Edits
Johnnykoch02 Feb 18, 2023
142d22c
Robot Parsing Correctly
Johnnykoch02 Feb 19, 2023
068c219
debug
Johnnykoch02 Feb 19, 2023
ecf0356
Debug
Johnnykoch02 Feb 20, 2023
a9898c9
Debugging on Branch John
Johnnykoch02 Feb 20, 2023
e15cff7
Debug
Johnnykoch02 Feb 25, 2023
26b2ffd
Debug Changes on X_Drive
Johnnykoch02 Mar 1, 2023
52aa153
Release Version 0.1.1
Johnnykoch02 Mar 1, 2023
78f9e29
Merge branch 'main' of https://github.com/Johnnykoch02/V5 into John
Johnnykoch02 Mar 1, 2023
dacca29
Construction of Mechanical Components for Usage
Johnnykoch02 Mar 2, 2023
14fad4c
Development on Branch John
Johnnykoch02 Mar 4, 2023
f3a1a85
Development on Branch John
Johnnykoch02 Mar 4, 2023
4ca831c
Development on Branch John
Johnnykoch02 Mar 4, 2023
de73a55
Development on Branch John
Johnnykoch02 Mar 4, 2023
94501ee
Adding Bull2 SmallBot Configuration
Johnnykoch02 Mar 4, 2023
d6d19f3
Debug and Testing Tank Drive
Johnnykoch02 Mar 5, 2023
ca3af4f
Debug
Johnnykoch02 Mar 6, 2023
6bf27cc
Debug
Johnnykoch02 Mar 6, 2023
bfe11bb
Debug
Johnnykoch02 Mar 6, 2023
42f5e78
Debug
Johnnykoch02 Mar 6, 2023
c1d48b9
Debug
Johnnykoch02 Mar 6, 2023
b001b55
Debug
Johnnykoch02 Mar 6, 2023
c33ee0d
Debug
Johnnykoch02 Mar 6, 2023
7c64f37
Debug
Johnnykoch02 Mar 6, 2023
6eeef19
Debug
Johnnykoch02 Mar 6, 2023
fd63c32
Debug
Johnnykoch02 Mar 6, 2023
9987390
Debug
Johnnykoch02 Mar 6, 2023
da7795e
Debug
Johnnykoch02 Mar 6, 2023
7ce8cd9
Debug
Johnnykoch02 Mar 6, 2023
32c578b
Debug
Johnnykoch02 Mar 6, 2023
6468cd1
Debug
Johnnykoch02 Mar 6, 2023
c6074b0
Debug
Johnnykoch02 Mar 6, 2023
7f9e260
Debug
Johnnykoch02 Mar 6, 2023
59ccf87
Debug
Johnnykoch02 Mar 7, 2023
c981eab
Building TerriBull BULL2: Left Nut
Johnnykoch02 Mar 7, 2023
f41684f
Build for Mechanical Systems: Tank Drive, Catapult Shooter, Intakes, …
Johnnykoch02 Mar 10, 2023
0c0a211
Merge branch 'main' of https://github.com/Johnnykoch02/V5 into John
Johnnykoch02 Mar 10, 2023
40bc1ed
Development of X_Drive, Controller Classes for Drivers, Modificaiton …
Johnnykoch02 Mar 10, 2023
4ae1bc0
DriveTask Modification
Johnnykoch02 Mar 11, 2023
4dafdf3
DriveTask Modification
Johnnykoch02 Mar 11, 2023
685fa42
Modifications to Internal Representations of Data
Johnnykoch02 Mar 14, 2023
51715da
Create comms-main.cpp
TheGuy920 Mar 14, 2023
ac98273
Fix Build Errors for GameObjects
Johnnykoch02 Mar 14, 2023
b22d32b
Debug Drivebase
Johnnykoch02 Mar 18, 2023
09f86da
fix
Johnnykoch02 Mar 18, 2023
894452d
fix
Johnnykoch02 Mar 18, 2023
fa31dfe
remapping based in inches
Johnnykoch02 Mar 18, 2023
c543f6b
Testing Drive
Johnnykoch02 Mar 18, 2023
877ef65
good changes
Johnnykoch02 Mar 18, 2023
431daf2
modify approach angle test
Johnnykoch02 Mar 18, 2023
f641971
fixing rollers
Johnnykoch02 Mar 18, 2023
ad8f122
fixing rollers
Johnnykoch02 Mar 18, 2023
057da96
mod drive code
Johnnykoch02 Mar 18, 2023
4b8ba08
fixing drive code
Johnnykoch02 Mar 18, 2023
d0573a2
debug drive
Johnnykoch02 Mar 18, 2023
f7f108c
debug drive
Johnnykoch02 Mar 18, 2023
7ad348b
debug drive
Johnnykoch02 Mar 18, 2023
6c3e5cb
debug roller
Johnnykoch02 Mar 18, 2023
2d8a8f1
debug drive
Johnnykoch02 Mar 18, 2023
8117617
debug drive
Johnnykoch02 Mar 18, 2023
21d568a
debug drive
Johnnykoch02 Mar 18, 2023
6d537bf
debug drive
Johnnykoch02 Mar 18, 2023
8190174
debug drive
Johnnykoch02 Mar 18, 2023
7112936
Serial Update
TheGuy920 Mar 24, 2023
e379848
Serial
TheGuy920 Mar 24, 2023
317a060
Merge pull request #13 from Johnnykoch02/tgo
TheGuy920 Mar 24, 2023
171419a
Debug/Adding Voltage Curves <untested>
Johnnykoch02 Apr 4, 2023
239151a
Quick Build for Ryan's Shooter
Johnnykoch02 Apr 14, 2023
e9c3941
Ryan's Shooter Testing on Button (a)
Johnnykoch02 Apr 14, 2023
3045682
Merge Branch to Main
Johnnykoch02 Apr 14, 2023
be7cad2
Merge main for testing on [Branch Moon]
Johnnykoch02 Apr 14, 2023
c12b83c
Updating Shooter Development for branch [TheMoon]
Johnnykoch02 Apr 14, 2023
596dbf1
Applied Kinematics
Johnnykoch02 Apr 15, 2023
8e33bdb
Configuration File Update
Johnnykoch02 Apr 15, 2023
bbe2a41
Debug [Applied Kinematics]
Johnnykoch02 Apr 15, 2023
a9b465a
Merge branch 'John' of https://github.com/Johnnykoch02/V5 into John
Johnnykoch02 Apr 15, 2023
a68377b
Debug [Kinematics]
Johnnykoch02 Apr 15, 2023
18061b1
Debug [Kinematics]
Johnnykoch02 Apr 15, 2023
428c050
Debug [Kinematics]
Johnnykoch02 Apr 15, 2023
3422e35
Debug [Kinematics]
Johnnykoch02 Apr 15, 2023
142b720
Debug [Kinematics]
Johnnykoch02 Apr 15, 2023
fd7ea24
Changes/Updates for Bill Gate
Johnnykoch02 Apr 16, 2023
74ae686
Adding Serial Features [John]
Johnnykoch02 Apr 18, 2023
eda54dd
debug
Johnnykoch02 Apr 18, 2023
436da40
Modifications to Serial Comm [John]
Johnnykoch02 Apr 19, 2023
c7c86a0
Creating Scheduling for Data Callbacks [John]
Johnnykoch02 Apr 19, 2023
b4e016f
Adding V5 Testing Serial Logic [John]
Johnnykoch02 Apr 19, 2023
2229a1b
changes
TheGuy920 Apr 19, 2023
d75a049
update args breh
Johnnykoch02 Apr 20, 2023
cf94ac5
e
TheGuy920 Apr 20, 2023
d6238c4
e
TheGuy920 Apr 21, 2023
548533f
fix decimal
TheGuy920 Apr 23, 2023
e9e66a3
e
TheGuy920 Apr 23, 2023
1d820f3
e
TheGuy920 Apr 23, 2023
32ea0c0
e
TheGuy920 Apr 24, 2023
c02026c
fucking string compre does not work what the fuck
TheGuy920 Apr 24, 2023
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
77 changes: 65 additions & 12 deletions configuration.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version": "0.1.1",
"version": "0.2.1",
"configurations": [
{
"name": "Shooter_Big_Bot",
"controller_config": "AidanJoeShmo",
"name": "Big_Boy",
"controller_config": "DanTheMan",
"controller_deadzone": 5,
"mechanical_system": {
"starting_angle": 90,
Expand All @@ -17,7 +17,10 @@
"motor_ports": [1, 2, 3, 4],
"gear_ratio": "RED",
"cf": 1.0,
"radius": 1.0
"radius": 1.0,
"wheel_base": 12.0,
"k_pos": [8.5, 1.95, 0.8],
"k_theta": [0.95, 0.08, 0.15]
},
"intake": {
"config": "IntakeUni",
Expand Down Expand Up @@ -59,7 +62,10 @@
"reverse_motors": [1, 1, 0, 0, 0, 1],
"gear_ratio": "BLUE",
"cf": 0.667,
"radius": 2.0
"radius": 2.0,
"wheel_base": 12.0,
"k_pos": [8.5, 1.95, 0.8],
"k_theta": [0.95, 0.08, 0.15]
},
"roller": {
"config": "RollerDuo",
Expand Down Expand Up @@ -91,11 +97,14 @@
"imu": 11,
"drive": {
"config": "tank_drive_std",
"motor_ports": [4, 5, 6, 1, 2, 3],
"reverse_motors": [1, 1, 0, 0, 0, 1],
"motor_ports": [1, 2, 3, 8, 9, 10],
"reverse_motors": [1, 0, 1, 0, 1, 0],
"gear_ratio": "BLUE",
"cf": 0.667,
"radius": 1.5
"cf": 0.5573,
"radius": 1.5,
"wheel_base": 12.0,
"k_pos": [9.2, 0.0001, 1.8],
"k_theta": [3.5, 0.002, 0.4]
},
"intake": {
"config": "IntakeUni",
Expand All @@ -106,17 +115,61 @@
},
"roller": {
"config": "RollerUni",
"motor_ports": [19],
"motor_ports": [6],
"reverse_motors": [0],
"gear_ratio": "GREEN",
"max_speed": 120
},
"shooter": {
"config": "ShooterFlyWheelSB",
"motor_ports": [8, 9],
"reverse_motors": [0, 0],
"motor_ports": [19, 20],
"reverse_motors": [1, 1],
"gear_ratio": "SpecialFlyWheel",
"max_speed": 127
},
"magazine": {
"incPorts": "DE",
"inc_thresholg": [0.64, 0.64],
"decPorts": "B",
"dec_threshold": [0.64]
}
}
},
{
"name": "Rocky",
"controller_config": "NateIsTank",
"controller_deadzone": 5,
"mechanical_system": {
"starting_angle": 90,
"starting_position": {
"x": 0,
"y": 0
},
"imu": 11,
"drive": {
"config": "tank_drive_quad",
"motor_ports": [4, 5, 6, 1, 2, 3],
"reverse_motors": [1, 1, 0, 0, 0, 1],
"gear_ratio": "BLUE",
"cf": 1,
"radius": 4.0,
"wheel_base": 12.0,
"k_pos": [8.5, 1.95, 0.8],
"k_theta": [0.95, 0.05, 0.15]
},
"intake": {
"config": "IntakeUni",
"motor_ports": [5],
"reverse_motors": [0],
"gear_ratio": "GREEN",
"max_speed": 120
},
"roller": {
"config": "RollerUni",
"motor_ports": [19],
"reverse_motors": [0],
"gear_ratio": "GREEN",
"max_speed": 120
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions include/Controllers/InputController/Configurations/DanTheMan.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @file DanTheMan.hpp
* @author John Koch jkoch21@usf.edu
* @brief Bull Two Config for Driver: Dan is in fact, the man.
*
* @version 0.1
* @date 2023-03-10
*
* @copyright Copyright (c) 2022
*
*/
#ifndef DANTHEMAN_H
#define DANTHEMAN_H

#include "../InputController.hpp"

class DanTheMan : public TerriBull::InputController {
public:
DanTheMan(TerriBull::RoboController* RoboController, int deadzone) : TerriBull::InputController(RoboController, deadzone) {}
void Init();
void Update(float delta);
};

#endif
25 changes: 25 additions & 0 deletions include/Controllers/InputController/Configurations/NateIsTank.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//10.7
/**
* @file NateIsTank.hpp
* @author John Koch jkoch21@usf.edu
* @brief Bull One Config for Driver: O' Captian my Captian, Nathaniel
*
* @version 0.1
* @date 2023-03-10
*
* @copyright Copyright (c) 2022
*
*/
#ifndef NATEISTANK_H
#define NATEISTANK_H

#include "../InputController.hpp"

class NateIsTank : public TerriBull::InputController {
public:
NateIsTank(TerriBull::RoboController* RoboController, int deadzone) : TerriBull::InputController(RoboController, deadzone) {}
void Init();
void Update(float delta);
};

#endif
24 changes: 24 additions & 0 deletions include/Controllers/InputController/Configurations/RyanIsTank.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @file RyanIsTank.hpp
* @author John Koch jkoch21@usf.edu
* @brief Bull One Config for Driver: The Man, the Myth, the Ryan
*
* @version 0.1
* @date 2023-02-28
*
* @copyright Copyright (c) 2022
*
*/
#ifndef RYANISTANK_H
#define RYANISTANK_H

#include "../InputController.hpp"

class RyanIsTank : public TerriBull::InputController {
public:
RyanIsTank(TerriBull::RoboController* RoboController, int deadzone) : TerriBull::InputController(RoboController, deadzone) {}
void Init();
void Update(float delta);
};

#endif
36 changes: 23 additions & 13 deletions include/Controllers/MechanicalSystem/MechanicalSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#ifndef MECHANICAL_SYSTEM_H
#define MECHANICAL_SYSTEM_H

#include "TerriBull/TerriBull.hpp"
#include "../../TerriBull/TerriBull.hpp"
#include "../../TerriBull/lib/KalmanFilter.hpp"
#include "pros/imu.hpp"
#include "../../TerriBull/ProsAPI.h"
#include <map>
Expand All @@ -30,6 +31,7 @@ class TerriBull::MechanicalSystem {
TerriBull::Roller* pRoller;
TerriBull::Expansion* pExpansion;
TerriBull::Vector2 * pPosition;
KalmanFilter1D* pThetaFilter;
double * pAngle;
float pStartingAngle;

Expand All @@ -48,24 +50,34 @@ class TerriBull::MechanicalSystem {
/* Tasking Specific */
float getDriveError() const;
float getDriveDError() const;
bool DriveNeedsAngleCorrection() const;
float getRollerError() const;
float getRollerDError() const;
bool isShotCompleted() const;
bool isShooterLoaded() const;
bool isRollerCompleted() const;

void Init();
void update(float delta);
/* API TO Mechanical System */
int GoToPosition(Vector2 pos);
void resetDrive();

/* API To Mechanical System */
int GoToPosition(Vector2 v_f, Vector2 v_i, bool reverse);
void ResetDrive();
int TurnToAngle(float theta);
int turnOnIntake(float direction);
int turnOffIntake();
int spinRollerTo(float pos);
int spinRollerFor(int direction, float time);
int resetRoller();
int TurnOnIntake(float direction); //+
int TurnOffIntake();
int SpinRollerTo(float pos);
int SpinRollerFor(int direction, float time);
int ResetRoller();
int ShootDisk();
int resetShooter();
int LoadShooter();
int TurnOnShooter();
int ResetShooter();
int ConstrictMotorGroupCurrent(TerriBull::MechanicalComponent::MotorRefs* refGroup);
int UnConstrictMotorGroupCurrent(TerriBull::MechanicalComponent::MotorRefs* refGroup);


float getIntakeRPM() const;

/*Setters*/
void setMotherSystem(RoboController* _motherSystem);
void setIntake(TerriBull::Intake * _intake);
Expand All @@ -78,8 +90,6 @@ class TerriBull::MechanicalSystem {
TerriBull::Roller * getRoller();
TerriBull::Expansion * getExpansion();
TerriBull::Drive * getDrive();



};

Expand Down
41 changes: 22 additions & 19 deletions include/Controllers/ObjectHandler/ObjectHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#define OBJECTHANDLER_H

#include "../../TerriBull/TerriBull.hpp"
#include "../../TerriBull/lib/GameObjects/SpinUp/Disk.hpp"
#include "../../TerriBull/lib/GameObjects/SpinUp/FieldRoller.hpp"
#include "../../TerriBull/lib/GameObjects/SpinUp/Goal.hpp"
#include <list>
#include <map>
#include <vector>
Expand All @@ -22,26 +25,26 @@

class TerriBull::ObjectHandler {
private:
// Vector2
std::map<GameObject::Types, std::vector<GameObject*>> Objects;
size_t pNumObjects;
public:
::std::list<TerriBull::GameObject> Objects;
const ::std::map<int, int> MaxOfTypes = {
{2, 1}, //REDGOAL
{6, 1}, //BLUEGOAL
};
const ::std::map<int, ::std::vector<float>> WidthHeights = {
{2, {13.5,13.5}}, //REDGOAL
{6, {13.5,13.5}} //BLUEGOAL
/* ADD MORE */
};

ObjectHandler() {}
~ObjectHandler() {}
TerriBull::GameObject* query(::std::string identifier) {return nullptr;} /*TODO*/
TerriBull::GameObject* getClosestObj(GameObject::Types type, Vector2 pos) {return nullptr;} /*TODO*/
void updateObjPos(::std::string identifier,GameObject::Types type, Vector2 pos) {} /*TODO*/
void addObject(::std::string identifier, GameObject::Types type, Vector2 pos) {} /*TODO*/
void update() {} /*TODO*/

ObjectHandler() : pNumObjects(0) {
/** Initialize the Data Management System */
Objects[GameObject::Types::DISK] = std::vector<GameObject*>();
Objects[GameObject::Types::ROLLER] = std::vector<GameObject*>();
Objects[GameObject::Types::GOAL] = std::vector<GameObject*>();
/*TODO: Create and develop the Other Object Types */
}
~ObjectHandler() {

}
TerriBull::GameObject* query(GameObject::Types type, char identifier) {return nullptr;} /*TODO*/
TerriBull::GameObject* getClosestObjByType(GameObject::Types type, Vector2* currentPos);
TerriBull::GameObject* getClosestObj(Vector2* currentPos);
void updateObjPos(char identifier,GameObject::Types type, Vector2 pos); /*TODO*/
void addObject(GameObject* _obj); /*TODO*/
void update(GameObject::Types type, char id, void* args);
};

// TerriBull::GameObject* TerriBull::ObjectHandler::getClosestObj (GameObject::Types type, TerriBull::Vector2 pos) {
Expand Down
Loading