Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev onto master #10

Draft
wants to merge 305 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
bdf4d5f
Merge branch 'master' into dev
jrmo14 Jan 29, 2019
ea7c916
Merge branch 'dev' of github.com:athenian-robotics/Deep-Space-Robot i…
jrmo14 Jan 29, 2019
d1e299b
Clean and get building
jrmo14 Jan 29, 2019
c7ba94f
implement detectCargo
jacobtkeio Jan 29, 2019
dcea63a
Reimplement hatch subsystem
Jacobvs Jan 30, 2019
23af9ae
Wrist subsystem and commands
sarahmialiu Jan 30, 2019
d3f8fb6
Merge remote-tracking branch 'origin/dev' into dev
sarahmialiu Jan 30, 2019
7da10a4
Update robot and robotmap
jrmo14 Jan 30, 2019
41fb86a
Update Prometheus examples and build.gradle
ashah03 Jan 30, 2019
f0f5ca8
Get DrivePathBasic working (at least partially)
Jan 30, 2019
9094391
Squash all ToPosition / Hold commands for a subsystem into one command
Jacobvs Jan 30, 2019
cb3091d
Merge remote-tracking branch 'origin/dev' into dev
Jacobvs Jan 30, 2019
725a9b6
Make improvements to DrivePathBasic and FieldPaths
Jan 30, 2019
c0f4685
updated thread, and have skeleton visionClient code
20dzhong Jan 30, 2019
6233ebc
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Jan 30, 2019
3839fe3
Add VictorSPX wrapper to enable PIDController usage
Jacobvs Jan 30, 2019
f864e3c
Merge remote-tracking branch 'origin/dev' into dev
Jacobvs Jan 30, 2019
23dfc50
change detectCargo and detectHatchPanel to return GameObject(centroid…
jacobtkeio Jan 31, 2019
82b0cf3
updated CVObjects in protoFiles
20dzhong Feb 2, 2019
0f77d69
updated CVObject.py
20dzhong Feb 2, 2019
8638e5e
Working camera Flask stream w/ threads
ashah03 Feb 2, 2019
98043d1
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 2, 2019
115aa6f
updated streamer with server
20dzhong Feb 2, 2019
be33fda
Wrist subsystem and commands
sarahmialiu Feb 2, 2019
952237a
Merge remote-tracking branch 'origin/dev' into dev
sarahmialiu Feb 2, 2019
28fcf11
add command to prevent arm from colliding with robot when it is lifte…
TarunChichili Feb 2, 2019
50ae1b3
Merge remote-tracking branch 'origin/dev' into dev
TarunChichili Feb 2, 2019
2bb8225
Implement PositionTracking, add methods to Pose2D and relatives
Feb 2, 2019
1378241
Reduce overhead and increaseloop speed
jrmo14 Feb 2, 2019
a1df5c5
Merge branch 'driver-assist' of github.com:athenian-robotics/Deep-Spa…
jrmo14 Feb 2, 2019
5ad163a
Wrist subsystem and commands
sarahmialiu Feb 2, 2019
cb559bb
Make fixes to PositionTracking, add TrackPosition command to use it
Feb 2, 2019
e59373b
Merge branch 'driver-assist' of github.com:athenian-robotics/Deep-Spa…
jrmo14 Feb 2, 2019
6064640
Wrist subsystem and commands
sarahmialiu Feb 2, 2019
0d6d4e5
reformated detection and other things
20dzhong Feb 2, 2019
c18e430
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 2, 2019
ab6564c
Make changes to position tracking stuff
Feb 2, 2019
4d857e4
Merge branch 'driver-assist' of github.com:athenian-robotics/Deep-Spa…
jrmo14 Feb 2, 2019
7b4c3b3
add wasDetected to all cv objects
jacobtkeio Feb 2, 2019
4bba66c
add wasDetected to all cv functions
jacobtkeio Feb 2, 2019
84cc91d
Fix incorrect input for some rpcs in proto file
ashah03 Feb 3, 2019
0795a58
Clean OpenCV processes
jacobtkeio Feb 3, 2019
ec4cf6d
add viewprocesses and implement viewReflTape
jacobtkeio Feb 3, 2019
499eee0
implement viewGaffeTape
jacobtkeio Feb 3, 2019
1134759
change function names in viewprocesses
jacobtkeio Feb 3, 2019
15ec935
fix view and detectReflTape
jacobtkeio Feb 3, 2019
b54fa43
fix viewReflTape for sharedframe
jacobtkeio Feb 3, 2019
3b66290
implemented thread processes
20dzhong Feb 3, 2019
f5a7c85
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 3, 2019
7fadb6f
making sure
20dzhong Feb 3, 2019
e159d56
changed some name
20dzhong Feb 3, 2019
c49d70b
Default Changelist
jacobtkeio Feb 3, 2019
2316100
Merge remote-tracking branch 'origin/dev' into dev
jacobtkeio Feb 3, 2019
47a5ff0
Update proto file and impl, add some __init__.py files
ashah03 Feb 3, 2019
344345c
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 3, 2019
bc9e752
Fix imports
ashah03 Feb 4, 2019
8f271e3
implement vision-client-startup
20dzhong Feb 4, 2019
32acdca
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 4, 2019
dc63b0e
Add gRPC callbacks
jrmo14 Feb 4, 2019
d7a4609
changed hsv garbage
20dzhong Feb 4, 2019
e5e0496
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 4, 2019
ba6e8ca
implement detectcargo range
20dzhong Feb 4, 2019
edd6617
Implement callbacks and start work on tapefollower
jrmo14 Feb 4, 2019
749b991
reimplement sharedFrame in processes and viewprocesses
jacobtkeio Feb 5, 2019
bc933c8
implement new low exposure color ranges for all but detect/viewHatchP…
jacobtkeio Feb 5, 2019
75a61c0
Add drivetrain stuff (a lot)
Jacobvs Feb 5, 2019
af1d13b
Add drive to angle command
Jacobvs Feb 5, 2019
d0ce13a
Overhaul PositionTracking, fix spelling of DriveChangeable
Feb 5, 2019
a949466
Update callbacks to function based off of composition
jrmo14 Feb 5, 2019
29e394d
Merge remote-tracking branch 'origin/driver-assist' into driver-assist
Feb 5, 2019
57e9084
Create DriveVelocity command for velocity PID drivetrain control
Feb 6, 2019
61c072c
Fix some stuff in DriveVelocity
Feb 6, 2019
8030617
made changes to test.py
20dzhong Feb 6, 2019
944a79c
Update all subsystems to use PIDcontrol, update some command
jrmo14 Feb 8, 2019
a1aa80d
streamline viewGaffeTape
jacobtkeio Feb 8, 2019
4e0bc3c
Merge remote-tracking branch 'origin/dev' into dev
jacobtkeio Feb 8, 2019
65d89c2
streamline viewGaffeTape
jacobtkeio Feb 8, 2019
828e12a
streamline detectGaffeTape
jacobtkeio Feb 8, 2019
74a1d19
streamline detectGaffeTape
jacobtkeio Feb 8, 2019
5fa5b0e
add TODO
ExtraE113 Feb 8, 2019
b2a4be0
fix typo
ExtraE113 Feb 8, 2019
5dffe25
general minor fixes
ExtraE113 Feb 8, 2019
5f979b1
update reeeee for testing GaffeTape
jacobtkeio Feb 8, 2019
6724db4
Merge remote-tracking branch 'origin/dev' into dev
jacobtkeio Feb 8, 2019
366679e
Update sparkmax and sparkmax group
jrmo14 Feb 8, 2019
1c4a0e1
Merge remote-tracking branch 'origin/dev' into dev
jrmo14 Feb 8, 2019
2154736
Update subsys and cmd
jrmo14 Feb 8, 2019
74d09d2
Add more type safety to CVDataImpl
jrmo14 Feb 8, 2019
3d06437
Begin implementing DriveDistanceVelocity, add useful methods to Drive…
Feb 8, 2019
572d67d
Implement DriveDistanceVelocity and assign it in OI, put trackDistanc…
Feb 8, 2019
87aac6f
Add out and *.csv to gitignore
Feb 9, 2019
845ad5c
Update commands
jrmo14 Feb 9, 2019
01391b9
Merge branch 'driver-assist' of github.com:athenian-robotics/Deep-Spa…
jrmo14 Feb 9, 2019
7535dda
Merge branch 'dev' into driver-assist
jrmo14 Feb 9, 2019
c65677a
Fix merge
jrmo14 Feb 9, 2019
94bc868
Merge branch 'driver-assist' into dev
jrmo14 Feb 9, 2019
761b0d7
init commit:
ExtraE113 Feb 9, 2019
6f02536
completed processing script for reflective tape
20dzhong Feb 9, 2019
56bfab4
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 9, 2019
2b419cb
Add new implementation of SerialLidar for TFMini Plus
Jacobvs Feb 9, 2019
3b9010d
Implement AlignTape
Feb 9, 2019
e00798e
Implement PIDSource & Rate to SerialLidar
Jacobvs Feb 9, 2019
6d8c792
Add arc852 make rule
ashah03 Feb 9, 2019
d377f73
Merge remote-tracking branch 'origin/dev' into dev
Feb 9, 2019
90314ee
fix viewhatchpanel
jacobtkeio Feb 9, 2019
611b461
sdsd
20dzhong Feb 10, 2019
4906c2f
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 10, 2019
0f191b5
Get codebase ready to deploy & implement rumble (haptic feedback) for…
Jacobvs Feb 10, 2019
0be4654
Minor changes
jrmo14 Feb 10, 2019
c2229e2
Merge branch 'dev' of github.com:athenian-robotics/Deep-Space-Robot i…
jrmo14 Feb 10, 2019
130af38
Fix gradle build
jrmo14 Feb 10, 2019
f64dde8
cleared unnecessary parts of the code, added documentations, categori…
20dzhong Feb 10, 2019
9bc76a0
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 10, 2019
d2dce26
hello
20dzhong Feb 10, 2019
162f84f
Fix memory issue caused by a busyloop overwhelming the garbage collec…
Feb 12, 2019
dbe50ec
added file
20dzhong Feb 13, 2019
998e93d
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 13, 2019
7b3b76b
Change makefile python-client
ashah03 Feb 13, 2019
2e67dd3
Change camera indices
ashah03 Feb 13, 2019
3e33fbc
Import changes semi-manually from test-bot motion profiling
Feb 14, 2019
8ad2742
Merge remote-tracking branch 'origin/dev' into dev
Feb 14, 2019
b9d2b39
added calibration sample files, working on solve pnp next
20dzhong Feb 15, 2019
35b29b2
added working solvepnp sample
20dzhong Feb 16, 2019
b8e19b3
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 16, 2019
0745e5f
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 17, 2019
02cdc45
Update Proto File
ashah03 Feb 17, 2019
bf7a678
Add CameraPose to impl (and update listener and datastore)
ashah03 Feb 17, 2019
997af48
Import changes semi-manually from test-bot branch
Feb 17, 2019
b5283e4
Merge remote-tracking branch 'origin/dev' into dev
Feb 17, 2019
06a0e4b
Fix typo
Feb 17, 2019
e85288e
updated calibration and made the file detect reflective tape with sol…
20dzhong Feb 17, 2019
04d4f79
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 17, 2019
de8e152
fix serial lidar & nav-x comms issue revert drivechangable to known s…
Jacobvs Feb 17, 2019
37291f4
Add backup drive modes
Feb 17, 2019
4ab166d
Add buttons for ChangeDriveMode
Feb 17, 2019
d588762
fix drivetrain directionality
Jacobvs Feb 17, 2019
ba82810
Move drive info logging to DriveLogging
Feb 17, 2019
a6cc378
Change solenoids
Jacobvs Feb 17, 2019
b8f3317
Add rotation smoothing multiplier
Feb 17, 2019
8a6a620
Merge remote-tracking branch 'origin/dev' into dev
Feb 17, 2019
5a9abf2
Add separate smoothing for fast/slow gears
Feb 17, 2019
7b07094
updated refl tape
20dzhong Feb 17, 2019
5efcb42
Scale controller rumble relative to max acceleration and deceleration
Feb 17, 2019
af7a3ad
Merge remote-tracking branch 'origin/dev' into dev
Feb 17, 2019
a21a1ec
Comment out unused gRPC stuff
Feb 17, 2019
9057e76
2 days reee
jrmo14 Feb 18, 2019
708df5e
Merge remote-tracking branch 'origin/dev' into dev
jrmo14 Feb 18, 2019
afd9ae2
Modify image server to add option to change camera with HTTP request
ashah03 Feb 18, 2019
288dffe
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 18, 2019
a2d82ab
Update Robot Map to better reflect robot
jrmo14 Feb 18, 2019
5a5361c
Merge branch 'dev' of github.com:athenian-robotics/Deep-Space-Robot i…
jrmo14 Feb 18, 2019
5b9f964
Add optional argument to togglegearbox
Jacobvs Feb 18, 2019
91dd3fc
Changing to 2 cameras instead of 3
ashah03 Feb 18, 2019
c2523de
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 18, 2019
d30fc86
Reduce camera resolution
ashah03 Feb 18, 2019
53cbb89
Many changes - too lazy to make legit message
Jacobvs Feb 18, 2019
7bbb7ea
Merge remote-tracking branch 'origin/dev' into dev
Jacobvs Feb 18, 2019
e9ddbd6
Add gear state to Shuffleboard
Feb 18, 2019
8be4919
Fix reversed hatch output solenoid
Feb 18, 2019
295913e
Scale down rotation, follow fast/slow naming convention
Feb 18, 2019
b31301e
Create socket and move image server locally
ashah03 Feb 18, 2019
9f0a3b1
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 18, 2019
86c6fa7
Change resolution
ashah03 Feb 18, 2019
073543c
Merge remote-tracking branch 'origin/dev' into dev
Feb 18, 2019
5212fc3
I don't know why this works but it does
ExtraE113 Feb 18, 2019
08fbdce
Try to get the elevator to work
Feb 18, 2019
04ae3df
Add cam line drawing test
Feb 18, 2019
15c2e59
Fix typo
Feb 18, 2019
db2297d
update drivechangable -- used hack - fix later
Jacobvs Feb 19, 2019
8221672
Merge remote-tracking branch 'origin/dev' into dev
Feb 19, 2019
1200239
Working socket streamer (now object oriented) incorporated to vision …
ashah03 Feb 19, 2019
0b0b825
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 19, 2019
b4b2aab
Fix typo
ashah03 Feb 19, 2019
62e06f5
Merge remote-tracking branch 'origin/dev' into dev
Feb 19, 2019
6582eef
Clean socket_server
ashah03 Feb 19, 2019
60443d0
Work on socket_server
ashah03 Feb 19, 2019
c246534
Test with visionClient
ashah03 Feb 19, 2019
97c04fc
Use thread.start instead of executor
ashah03 Feb 19, 2019
2d1a40d
Increase resolution
ashah03 Feb 19, 2019
f896941
updated view Refl Tape
20dzhong Feb 19, 2019
e476748
Merge remote-tracking branch 'origin/dev' into dev
Feb 19, 2019
2d28dcc
turn in place
Feb 19, 2019
2c93006
Add overhead view and center line
20dzhong Feb 19, 2019
16b71e8
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 19, 2019
15afd3c
Increase resolution
ashah03 Feb 19, 2019
9952550
Merge remote-tracking branch 'origin/dev' into dev
ashah03 Feb 19, 2019
218d264
Add led utils
Jacobvs Feb 19, 2019
358383d
Clean wrist subsystem
jrmo14 Feb 19, 2019
dc5f87c
Re clean wrist subsystem
jrmo14 Feb 19, 2019
7dbd4a4
Add OI mechanism controller code & wrist/elevator override code
Jacobvs Feb 19, 2019
07f6f36
wrist bangbang functional
Jacobvs Feb 19, 2019
1acda77
committed socket client and socket server, works
20dzhong Feb 19, 2019
fb3ffa4
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 19, 2019
b2e54f7
updated some commmentaion
20dzhong Feb 19, 2019
be5ca3b
double checking :)
20dzhong Feb 20, 2019
e1d6da9
Merge remote-tracking branch 'origin/dev' into dev
ExtraE113 Feb 20, 2019
8dee9ae
add statusLedIndication command
Jacobvs Feb 20, 2019
f17afc9
Merge remote-tracking branch 'origin/dev' into dev
ExtraE113 Feb 20, 2019
2f0b2a8
add servo
Jacobvs Feb 20, 2019
bbf3a36
Merge branch 'dev' of https://github.com/athenian-robotics/Deep-Space…
ExtraE113 Feb 20, 2019
a94b5ed
Merge branch 'dev' of /home/jrmo/git/Deep-Space-Robot with conflicts.
jrmo14 Feb 20, 2019
9a3aaa4
Merge remote-tracking branch 'origin/dev' into dev
jrmo14 Feb 20, 2019
35f2f13
remove old file
ExtraE113 Feb 20, 2019
2e5234e
Merge remote-tracking branch 'origin/dev' into dev
jrmo14 Feb 20, 2019
146b3d4
Remove data store
jrmo14 Feb 20, 2019
59e5524
fix servo and light control
Jacobvs Feb 20, 2019
06d1614
Merge remote-tracking branch 'origin/dev' into dev
Jacobvs Feb 20, 2019
bcb6a51
Fix Jacob's code
Feb 20, 2019
29f3a1d
update Elevator Move
jrmo14 Feb 20, 2019
95ab9ff
Make elevator setpoint non-static
Feb 20, 2019
49dbb20
add team color default
Jacobvs Feb 20, 2019
3080584
updated overhead drawing assists
20dzhong Feb 20, 2019
f68497f
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 20, 2019
1d84801
hopefully working ball grab/release code
ExtraE113 Feb 20, 2019
3cdbb31
Merge branch 'dev' of https://github.com/athenian-robotics/Deep-Space…
ExtraE113 Feb 20, 2019
339225e
Make elevator fixes
Feb 20, 2019
b7b9e8f
ball shit
ExtraE113 Feb 20, 2019
5fa8aa4
Merge remote-tracking branch 'origin/dev' into dev
Feb 20, 2019
9a39ec8
Prevent elevator from moving up when wrist is up
Feb 20, 2019
c461653
updated shell script parameters
20dzhong Feb 20, 2019
26a329f
Merge remote-tracking branch 'origin/dev' into dev
20dzhong Feb 20, 2019
162751f
Add LED indicator to elevator error
Feb 20, 2019
f911017
Merge remote-tracking branch 'origin/dev' into dev
Feb 20, 2019
0609784
Fix default wrist state
Feb 20, 2019
ff99853
Add elevator safety in bang-bang control
Feb 20, 2019
c036fa8
Try to cancel status light
Feb 20, 2019
2137cca
ball shit v2
ExtraE113 Feb 20, 2019
474504a
Merge remote-tracking branch 'origin/dev' into dev
ExtraE113 Feb 20, 2019
8c3d067
Merge remote-tracking branch 'origin/dev' into dev
Feb 20, 2019
37b3ecf
ball shit v3-timing
ExtraE113 Feb 20, 2019
9941618
Merge remote-tracking branch 'origin/dev' into dev
Feb 20, 2019
4bc6ac3
Fix status light for elevator safety
Feb 20, 2019
6ac2076
Change drive tuning
Feb 20, 2019
66eb9f0
ball actually works w toggle
ExtraE113 Feb 20, 2019
b5827f1
Merge remote-tracking branch 'origin/dev' into dev
ExtraE113 Feb 20, 2019
5bcb90f
Add suction status light, adjust elevator hatch-mid height
Feb 20, 2019
f4ef545
Adjust elevator mid-hatch height
Feb 20, 2019
feae2ec
Add manual control of pogo
Jacobvs Feb 22, 2019
17f3f46
Add manual control of pogo
Jacobvs Feb 22, 2019
21c8012
Refactor position tracking as singleton
jrmo14 Feb 26, 2019
95a1e5e
Make position tracking a singleton 4 realz this time
jrmo14 Feb 26, 2019
718ff08
Implement camera lag compensation...maybe
jrmo14 Feb 26, 2019
18eb2f1
Comp pracitice day bs
jrmo14 Mar 22, 2019
7c07b4e
competition changes (aka a useless commit message)
Jacobvs Mar 23, 2019
15dbe3e
Event commit
jrmo14 Mar 23, 2019
825f12b
competition changes
Jacobvs Mar 24, 2019
d37279f
fix pogo auto retract
Jacobvs Mar 24, 2019
c7a5e57
fix pogo auto retract
Jacobvs Mar 24, 2019
0acf512
push post comp changes
jrmo14 Apr 2, 2019
62b75b2
Update README.md
jrmo14 Apr 11, 2019
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Output
build
out
*.iml
.idea
.gradle
*.jar
*.csv
__pycache__

# Project files
*.iml
Expand All @@ -15,3 +18,9 @@ build
# Personal deploy scripts
deploy.sh
debug.sh

# personal testing scripts
./src/main/python/re*.py

# Vim sessions
sessions
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
default: all

all: arc852 stubs bin

stubs: clean java-stubs python-stubs

bin: java-bin

# cleans and wipe the build dir
clean:
./gradlew clean

# dunno
java-bin:
./gradlew installDist

# generate java stubs for grpc
java-stubs:
./gradlew assemble build

# generate python stubs for grpc
python-stubs:
mkdir -p ./build/generated/source/python
touch ./build/generated/source/python/__init__.py
python3 -m grpc_tools.protoc -I. --python_out=./build/generated/source/python --grpc_python_out=./build/generated/source/python --proto_path=./src/main/proto CVData.proto

# initiate java server
java-server:
build/install/Deep-Space-Robot/bin/grpc-Server

# initiated python server, nonexistent as of now
python-server:
python3 src/main/python/greeter_server.py

# initiate python client, nonapplicable, the usage of client is different and can be found under src/main/python/grpc
python-client:
python3 src/main/python/visionClient.py

# initiate java client, not applicable
java-client:
build/install/Deep-Space-Robot/bin/grpc-Server

# install and update arc852 python library
arc852:
sudo -H pip3 install --upgrade arc852-robotics --extra-index-url https://pypi.fury.io/pambrose/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Deep-Space-Robot: Team 852

---
Here lies the code for 852's 2019 season

Robot code can be built with the local gradle wrapper with `./gradlew build` and deployed to roboRIO with `./gradlew deploy`

Run `make` to build the whole project including gRPC stubs
79 changes: 77 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
plugins {
id "java"

id "edu.wpi.first.GradleRIO" version "2019.2.1"
id "idea"

// Provide convenience executables for trying out the examples.
id 'application'

// ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier gradle versions
id 'com.google.protobuf' version '0.8.8'

// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}

repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/"
}
mavenLocal()
//mavenCentral()
}

def ROBOT_MAIN_CLASS = "frc.team852.Main"
def grpcVersion = '1.18.0' // CURRENT_GRPC_VERSION
def protobufVersion = '3.5.1'
def protocVersion = '3.5.1-1'


// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
Expand Down Expand Up @@ -42,9 +63,45 @@ dependencies {
compile wpi.deps.vendor.java()
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
compile group: 'io.prometheus', name: 'client', version: '0.0.10'
compile group: 'io.prometheus', name: 'simpleclient', version: '0.6.0'
compile group: 'io.prometheus', name: 'simpleclient_hotspot', version: '0.6.0'
compile group: 'io.prometheus', name: 'simpleclient_httpserver', version: '0.6.0'
compile group: 'io.prometheus', name: 'simpleclient_servlet', version: '0.6.0'
compile "io.grpc:grpc-protobuf:${grpcVersion}"
compile "io.grpc:grpc-stub:${grpcVersion}"
compileOnly "javax.annotation:javax.annotation-api:1.2"
compile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.14.v20181114'
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.14.v20181114'
compile group: "edu.wpi.first.shuffleboard", name: "api", version: "1.3.1"
compile group: 'org.openjfx', name: 'javafx-base', version: '11.0.1'

// examples/advanced need this for JsonFormat
compile "com.google.protobuf:protobuf-java-util:${protobufVersion}"

compile "io.grpc:grpc-netty-shaded:${grpcVersion}"

testImplementation "io.grpc:grpc-testing:${grpcVersion}"
testImplementation "junit:junit:4.12"
testImplementation "org.mockito:mockito-core:1.9.5"

testCompile group: 'junit', name: 'junit', version: '4.12'

}

protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}

startScripts.enabled = false


// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
Expand All @@ -54,5 +111,23 @@ jar {
}

wrapper {
gradleVersion = '5.0'
gradleVersion = '5.1.1'
}

startScripts.enabled = false


task grpcServer(type: CreateStartScripts) {
mainClassName = 'frc.team852.lib.grpc.CVDataServer'
applicationName = 'grpc-Server'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
}


applicationDistribution.into('bin') {
from(grpcServer)
fileMode = 0755
}


5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Jan 22 16:12:18 PST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
zipStorePath=permwrapper/dists
34 changes: 34 additions & 0 deletions src/main/java/frc/team852/FieldPaths.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package frc.team852;

import frc.team852.lib.path.geometry.PathGenerator;
import frc.team852.lib.path.utilities.CSVEditor;
import frc.team852.lib.path.utilities.Pose2D;
import frc.team852.lib.path.utilities.Trajectory;

import java.io.IOException;
import java.util.List;

public class FieldPaths {
public static List<Pose2D> testPath;
public static PathGenerator testGen;

public static void genPaths() {
Trajectory<Pose2D> test = new Trajectory<>();
test.add(new Pose2D(0, 0, 0));
test.add(new Pose2D(2, 0, 0));
test.add(new Pose2D(4, 2, Math.PI / 2));
//test.add(new Pose2D(0, 2, Math.PI / 2));
testGen = new PathGenerator(test);
testPath = testGen.generatePoints();
}

public static void main(String[] args) {
genPaths();
try {
CSVEditor.setName("field_test.csv");
CSVEditor.dumpCSV(testGen);
} catch (IOException e) {
e.printStackTrace();
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/frc/team852/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ private Main() {
* <p>If you change your main robot class, change the parameter type.
*/
public static void main(String... args) {
RobotBase.startRobot(Robot::new);
RobotBase.startRobot(() -> new Robot(0.01));
}
}
58 changes: 49 additions & 9 deletions src/main/java/frc/team852/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
import edu.wpi.first.wpilibj.XboxController;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import frc.team852.command.ToggleGearbox;
import frc.team852.command.*;
import frc.team852.lib.utils.fightstick.FightStickAxisButton;
import frc.team852.lib.utils.fightstick.FightStickDigitalButton;
import frc.team852.lib.utils.fightstick.FightStickInput;
import frc.team852.lib.utils.fightstick.FightStickPOVDirection;

public class OI {
/**
Expand All @@ -26,19 +30,18 @@ public class OI {
* <p>
* Start the command when the button is pressed and let it run the command
* until it is finished as determined by it's isFinished method.
* button.whenPressed(new ElevatorToPosition());
* button.whenPressed(new ElevatorMoveBangBang());
* <p>
* Run the command while the button is being held down and interrupt it once
* the button is released.
* button.whileHeld(new ElevatorToPosition());
* button.whileHeld(new ElevatorMoveBangBang());
* <p>
* Start the command when the button is released and let it run the command
* until it is finished as determined by it's isFinished method.
* button.whenReleased(new ElevatorToPosition());
* button.whenReleased(new ElevatorMoveBangBang());
*/
public static Joystick stick1 = new Joystick(0);
public static Joystick stick2 = new Joystick(1);
public static XboxController xbox = new XboxController(2);
public static XboxController xbox = new XboxController(0);
public static Joystick fightStick = new Joystick(1);

// Joystick buttons start at 1
public static Button xboxA = new JoystickButton(xbox, 1);
Expand All @@ -52,11 +55,48 @@ public class OI {
public static Button xboxLS = new JoystickButton(xbox, 9);
public static Button xboxRS = new JoystickButton(xbox, 10);

public static FightStickDigitalButton fightStickA = new FightStickDigitalButton(fightStick, 1, FightStickInput.input.medKick);
public static FightStickDigitalButton fightStickB = new FightStickDigitalButton(fightStick, 2, FightStickInput.input.heavyKick);
public static FightStickDigitalButton fightStickX = new FightStickDigitalButton(fightStick, 3, FightStickInput.input.medPunch);
public static FightStickDigitalButton fightStickY = new FightStickDigitalButton(fightStick, 4, FightStickInput.input.heavyPunch);
public static FightStickDigitalButton fightStickLB = new FightStickDigitalButton(fightStick, 5, FightStickInput.input.lightPunch);
public static FightStickDigitalButton fightStickRB = new FightStickDigitalButton(fightStick, 6, FightStickInput.input.R1);
public static FightStickDigitalButton fightStickShare = new FightStickDigitalButton(fightStick, 7, FightStickInput.input.share);
public static FightStickDigitalButton fightStickOption = new FightStickDigitalButton(fightStick, 8, FightStickInput.input.option);
public static FightStickDigitalButton fightStickL3 = new FightStickDigitalButton(fightStick, 9, FightStickInput.input.L3);
public static FightStickDigitalButton fightStickR3 = new FightStickDigitalButton(fightStick, 10, FightStickInput.input.R3);
public static FightStickAxisButton fightStickLT = new FightStickAxisButton(fightStick, 2, FightStickInput.input.lightKick);
public static FightStickAxisButton fightStickRT = new FightStickAxisButton(fightStick, 3, FightStickInput.input.R2);

public static FightStickPOVDirection POVUp = new FightStickPOVDirection(FightStickInput.input.POVtop);
public static FightStickPOVDirection POVDown = new FightStickPOVDirection(FightStickInput.input.POVbot);
public static FightStickPOVDirection POVcenter = new FightStickPOVDirection(FightStickInput.input.POVcenter);

public OI() {
// Only created once, init and execute are called when button is pressed/released
new JoystickButton(stick1, 1).whenPressed(new ToggleGearbox());
new JoystickButton(stick2, 1).whenPressed(new ToggleGearbox());

FieldPaths.genPaths();
xboxLB.whenPressed(new ToggleGearbox(RobotMap.SLOW));
xboxRB.whenPressed(new ToggleGearbox(RobotMap.FAST));

xboxY.whenPressed(new Ball());

xboxStart.whenPressed(new TogglePogo());

fightStickLB.whileHeld(new ElevatorMoveBangBang());
//fightStickRB.whileHeld(new ElevatorMove());

fightStickX.whenPressed(new ElevatorMove(ElevatorHeight.HATCH_LOW));
fightStickY.whenPressed(new ElevatorMove(ElevatorHeight.HATCH_MID));
fightStickRB.whenPressed(new ElevatorMove(ElevatorHeight.HATCH_HIGH));

fightStickA.whenPressed(new ElevatorMove(ElevatorHeight.CARGO_LOW));
fightStickB.whenPressed(new ElevatorMove(ElevatorHeight.CARGO_MID));
fightStickRT.whenActive(new ElevatorMove(ElevatorHeight.CARGO_HIGH));

//Climb Hab 2
// fightStickOption.whenPressed(new TimedClimb());
fightStickShare.whileHeld(new ClimberMove());

}

Expand Down
Loading