This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 2 ]; then | |
echo "Usage: cbp img_gen scenario basin" | |
exit 1 | |
fi | |
# load paths | |
. hspf_config | |
scenario=$1 | |
basin=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Joystick.h> | |
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,JOYSTICK_TYPE_GAMEPAD, //Set up for joystick | |
1, 0, // button counter values | |
true, true, false, // axes (x,y,z) | |
false, false, false, // no Rx, Ry, or Rz (rotation around respective axis) | |
false, false, // no rudder or throttle | |
false, false, false); // no accelerator, brake, or steering | |
void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
from networktables import NetworkTables | |
import numpy as np | |
# To see messages from networktables, you must setup logging | |
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
ip = "10.55.87.2" | |
NetworkTables.initialize(server=ip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.frc5587.robot2018.commands; | |
import org.frc5587.robot2018.OI; | |
import org.frc5587.robot2018.Robot; | |
import org.frc5587.robot2018.subsystems.Elevator; | |
import org.frc5587.robot2018.subsystems.Elevator.HeightLevels; | |
import edu.wpi.first.wpilibj.DoubleSolenoid.Value; | |
import edu.wpi.first.wpilibj.command.Command; | |
import edu.wpi.first.wpilibj.Joystick; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import math | |
from decimal import Decimal | |
from picamera.array import PiRGBArray | |
from picamera import PiCamera | |
import time | |
from smbus import SMBus | |
camera = PiCamera() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import math | |
from decimal import Decimal | |
cap = cv2.VideoCapture(0) | |
#Lower color limit for yellow: | |
lower_color = np.array([27, 100, 100]) | |
#Upper color limit for yellow |