main
Dependents: 00_yotsuba 200_yotsuba_21 200_yotuba_21_uiChange
robot.cpp
- Committer:
- piroro4560
- Date:
- 2020-01-30
- Revision:
- 0:3f87ec23c3cf
- Child:
- 1:6a5065829cfc
File content as of revision 0:3f87ec23c3cf:
#include "robot.h" robot::robot() : spin(P, I, D, interval) { omni.wheel[0].setRadian(PI/4 * 1); omni.wheel[1].setRadian(PI/4 * 3); omni.wheel[2].setRadian(PI/4 * 5); omni.wheel[3].setRadian(PI/4 * 7); motor[0] = new kohiMD(PA_6); motor[1] = new kohiMD(PA_7); motor[2] = new kohiMD(PA_9); motor[3] = new kohiMD(PB_10); pid1.setInputLimits(-180,180); pid1.setOutputLimits(-0.3,0.3); pid1.setBias(0); pid1.setMode(1); pid1.setSetPoint(0); } void robot::chaseBall(float ball_theta, float r) { omni.compute(); } void robot::searchBall() { } void robot::moveGoal(float r, float goal_size, float goal_) { } void robot::detour() { } void robot::outLine(float r, line) { } void robot::shotBall() { }