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

Progskills ii #36

Open
wants to merge 25 commits into
base: programming-skillz
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
04bb137
added ProgrammingSkillzAuton
Dylan-Powers Apr 30, 2022
ee54e13
Adding basic actions for prog skills pt2
alienboy13 May 1, 2022
185b69c
Adding node sequencing
NathanDuPont May 1, 2022
dadca22
Adding conveyor node pieces
NathanDuPont May 1, 2022
95b7090
Update autons with drive config
NathanDuPont May 1, 2022
9ea4ea9
Updating programming skills
NathanDuPont May 2, 2022
1a4c1a9
Rewriting node to handle new AutonNodeManager
NathanDuPont May 2, 2022
44a1cd6
Updating nodes to handle new auton selection
NathanDuPont May 2, 2022
b91f985
Fixing pneumatics in driver control
NathanDuPont May 4, 2022
c57eb00
Updating lib:
NathanDuPont May 4, 2022
e267792
Update the claw states in auton
NathanDuPont May 4, 2022
1efca1c
Merge pull request #37 from msoe-vex/pneumatics-fix
aFella12 May 4, 2022
33d5bd1
added ProgrammingSkillzAuton
Dylan-Powers Apr 30, 2022
f3d25b5
Adding basic actions for prog skills pt2
alienboy13 May 1, 2022
34eebd8
Adding node sequencing
NathanDuPont May 1, 2022
85dc006
Adding conveyor node pieces
NathanDuPont May 1, 2022
ee75a27
Update autons with drive config
NathanDuPont May 1, 2022
ae92e4e
Updating programming skills
NathanDuPont May 2, 2022
39b9cc3
Rewriting node to handle new AutonNodeManager
NathanDuPont May 2, 2022
3064be4
Updating nodes to handle new auton selection
NathanDuPont May 2, 2022
4b5f8d8
Initial finish, debugging to come
May 4, 2022
f6ab659
Initial finish, debugging to come
May 4, 2022
313e33f
Initial finish, debugging to come
May 4, 2022
4dd9fb8
Adding goal rotate node
NathanDuPont May 4, 2022
cea2fab
Merge branch 'progskillsII' of github.com:msoe-vex/rr-ros1-tipping-po…
NathanDuPont May 4, 2022
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
Empty file modified scripts/actions-entrypoint.sh
100644 → 100755
Empty file.
Empty file modified scripts/compute-startup.sh
100644 → 100755
Empty file.
Empty file modified scripts/devInstallScript.sh
100644 → 100755
Empty file.
Empty file modified scripts/run_docker.ps1
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions src/v5_hal/firmware/include/Constants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef _LOCAL_CONSTANTS_H_
#define _LOCAL_CONSTANTS_H_

#define DRIVE_CONFIG {900., 1., M_PI * 4.}

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include "api.h"
#include "lib-rr/auton/Auton.h"
#include "lib-rr/util/Timer.h"
#include "lib-rr/util/Constants.h"
#include "nodes/GoalSpinnerNode.h"

class SetGoalRotatorPosition : public AutonAction {
private:
GoalSpinnerNode* m_goalSpinner;
int m_position;

public:
SetGoalRotatorPosition(GoalSpinnerNode* goalSpinner, int position);

void ActionInit();

actionStatus Action();

void ActionEnd();
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "Constants.h"
#include "lib-rr/auton/Auton.h"
#include "lib-rr/nodes/subsystems/IDriveNode.h"
#include "lib-rr/nodes/odometry_nodes/OdometryNode.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "Constants.h"
#include "lib-rr/auton/Auton.h"
#include "lib-rr/nodes/subsystems/IDriveNode.h"
#include "lib-rr/nodes/odometry_nodes/OdometryNode.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#pragma once

#include "lib-rr/auton/Auton.h"
#include "lib-rr/nodes/subsystems/IDriveNode.h"
#include "lib-rr/nodes/odometry_nodes/OdometryNode.h"
#include "lib-rr/nodes/sensor_nodes/InertialSensorNode.h"
#include "lib-rr/auton/auton_actions/DriveStraightAction.h"
#include "auton/auton_actions/PlatformBalance.h"
#include "lib-rr/auton/auton_actions/UseClawAction.h"
#include "lib-rr/auton/auton_actions/MoveLiftToPositionAction.h"
#include "lib-rr/auton/auton_actions/RollerIntakeAction.h"
#include "lib-rr/auton/auton_actions/FollowPathAction.h"
#include "auton/auton_actions/SetBackClawStateAction.h"
#include "lib-rr/pursuit/path_pursuit/TankPathPursuit.h"
#include "lib-rr/nodes/subsystems/ILiftNode.h"
#include "lib-rr/nodes/subsystems/IClawNode.h"
#include "lib-rr/nodes/subsystems/IRollerIntakeNode.h"
#include "auton/auton_actions/DeployAction.h"
#include "auton/auton_actions/SetLiftStateAction.h"
#include "lib-rr/pathing/PathManager.h"
#include "lib-rr/math/Pose.h"
#include "lib-rr/util/Constants.h"
#include "lib-rr/eigen/Eigen/Dense"
#include "nodes/BackClawNode.h"
#include "nodes/LiftNode.h"
#include "nodes/HighRungLiftNode.h"


class ProgrammingSkillzAuton : public Auton {
public:
ProgrammingSkillzAuton(IDriveNode* driveNode, OdometryNode* odomNode, IRollerIntakeNode* intakeNode,
IRollerIntakeNode* conveyorNode, IRollerIntakeNode* flapConveyorNode, IClawNode* frontClawNode,
BackClawNode* backClaw, IClawNode* wingArms, IClawNode* buddyClimb, LiftNode* liftNode,
HighRungLiftNode* highRungLiftNode);

void AddNodes();

private:
IDriveNode* m_driveNode;
OdometryNode* m_odomNode;
IRollerIntakeNode* m_intakeNode;
IRollerIntakeNode* m_conveyorNode;
IRollerIntakeNode* m_flapConveyorNode;
IClawNode* m_frontClawNode;
BackClawNode* m_backClaw;
IClawNode* m_wingArms;
IClawNode* m_buddyClimb;
LiftNode* m_liftNode;
HighRungLiftNode* m_highRungLiftNode;

};
4 changes: 4 additions & 0 deletions src/v5_hal/firmware/include/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@
#include "auton/auton_routines/MatchAuton.h"
#include "auton/auton_routines/LeftAuton.h"
#include "auton/auton_routines/BasicAuton.h"
<<<<<<< HEAD
=======
#include "auton/auton_routines/BackClawTestAuton.h"
>>>>>>> 3064be4f7582e28e6ab2080e22cbcfc963b61d93
#include "auton/auton_routines/ProgrammingSkillzAuton.h"

/**
* You should add more #includes here
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "auton/auton_actions/SetGoalRotatorPosition.h"

SetGoalRotatorPosition::SetGoalRotatorPosition(GoalSpinnerNode* goalSpinner, int position) :
m_goalSpinner(goalSpinner),
m_position(position) {

}

void SetGoalRotatorPosition::ActionInit() {

}

AutonAction::actionStatus SetGoalRotatorPosition::Action() {
m_goalSpinner->setSpinnerPosition(m_position);
return END;
}

void SetGoalRotatorPosition::ActionEnd() {

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BasicAuton::BasicAuton(IDriveNode* drive_node, OdometryNode* odom_node, HighRung
}

void BasicAuton::AddNodes() {
AutonNode* forward_node = new AutonNode(10, new SetHighRungLiftStateAction(m_high_rung_lift_node, HighRungLiftNode::HighRungLiftState::SCORING));
AutonNode* forward_node = new AutonNode(10, new DriveStraightAction(m_drive_node, m_odom_node, DRIVE_CONFIG, 60, 50, 10));
Auton::AddFirstNode(forward_node);

//AutonNode* platformBalance_Node = new AutonNode(10, new PlatformBalance(m_drive_node, m_y_odom_encoder, m_inertial_node));
Expand Down
18 changes: 9 additions & 9 deletions src/v5_hal/firmware/src/auton/auton_routines/LeftAuton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
LeftAuton::LeftAuton(IDriveNode* drive_node, OdometryNode* odom_node,
IClawNode* front_claw_node, LiftNode* liftNode, HighRungLiftNode* highRingLiftNode, BackClawNode* backClawNode,
IRollerIntakeNode* intakeNode, IRollerIntakeNode* conveyorNode, IRollerIntakeNode* flapConveyorNode) :
Auton("Default Left Auton"),
Auton("Left Match Auton", "/usd/paths/24inLeft.json"),
m_drive_node(drive_node),
m_odom_node(odom_node),
m_front_claw_node(front_claw_node),
Expand Down Expand Up @@ -34,7 +34,7 @@ void LeftAuton::AddNodes() {
deploy->AddNext(lowerLift);
deploy->AddNext(clawCloseDelay);

AutonNode* clawClose = new AutonNode(0.5, new UseClawAction(m_front_claw_node, true));
AutonNode* clawClose = new AutonNode(0.5, new UseClawAction(m_front_claw_node, false));

clawCloseDelay->AddNext(clawClose);

Expand All @@ -52,7 +52,7 @@ void LeftAuton::AddNodes() {

clawClose->AddNext(firstBackingNode);

AutonNode* clawOpen = new AutonNode(0.5, new UseClawAction(m_front_claw_node, false));
AutonNode* clawOpen = new AutonNode(0.5, new UseClawAction(m_front_claw_node, true));
firstBackingNode->AddNext(clawOpen);

AutonNode* backClawOpen = new AutonNode(0.5, new SetBackClawStateAction(m_backClawNode, BackClawNode::BackClawState::PIVOT_DOWN_CLAW_OPEN));
Expand All @@ -62,7 +62,7 @@ void LeftAuton::AddNodes() {
AutonNode* secondGrabYellowNode = new AutonNode(4, new FollowPathAction(m_drive_node, m_odom_node, new TankPathPursuit(secondGrabYellow), secondGrabYellow, false));
firstBackingNode->AddNext(secondGrabYellowNode);

AutonNode* clawClose2 = new AutonNode(0.5, new UseClawAction(m_front_claw_node, true));
AutonNode* clawClose2 = new AutonNode(0.5, new UseClawAction(m_front_claw_node, false));
secondGrabYellowNode->AddNext(clawClose2);

AutonNode* wait = new AutonNode(0.5, new WaitAction(0.5));
Expand All @@ -81,7 +81,7 @@ void LeftAuton::AddNodes() {
AutonNode* backClawClosed = new AutonNode(0.5, new SetBackClawStateAction(m_backClawNode, BackClawNode::BackClawState::PIVOT_BACK));
backingGrabBlueNode->AddNext(backClawClosed);

AutonNode* clawOpen2 = new AutonNode(0.5, new UseClawAction(m_front_claw_node, false));
AutonNode* clawOpen2 = new AutonNode(0.5, new UseClawAction(m_front_claw_node, true));

backClawClosed->AddNext(clawOpen2);

Expand Down Expand Up @@ -131,15 +131,15 @@ void LeftAuton::AddNodes() {

AutonNode* lowerLiftForTallGoal = new AutonNode(2, new SetLiftStateAction(m_liftNode, LiftNode::LiftState::DOWN));

AutonNode* clawOpenForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, false));
AutonNode* clawOpenForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, true));

AutonNode* waitForLift = new AutonNode(1., new WaitAction(1.));

fifthReverseForTallGoal->AddNext(lowerLiftForTallGoal);
fifthReverseForTallGoal->AddNext(clawOpenForTallGoal);
fifthReverseForTallGoal->AddNext(waitForLift);

AutonNode* clawCloseForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, true));
AutonNode* clawCloseForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, false));

waitForLift->AddNext(clawCloseForTallGoal);

Expand All @@ -161,7 +161,7 @@ void LeftAuton::AddNodes() {

waitForPullTallGoalClose->AddNext(backwardsTallGoalGrab);

AutonNode* clawOpenFinalForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, false));
AutonNode* clawOpenFinalForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, true));

backwardsTallGoalGrab->AddNext(clawOpenFinalForTallGoal);

Expand All @@ -179,7 +179,7 @@ void LeftAuton::AddNodes() {

clawOpenFinalForTallGoal->AddNext(sixthMovetoTallGoal);

AutonNode* clawCloseFinalForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, true));
AutonNode* clawCloseFinalForTallGoal = new AutonNode(0.1, new UseClawAction(m_front_claw_node, false));

sixthMovetoTallGoal->AddNext(clawCloseFinalForTallGoal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void MatchAuton::AddNodes() {
AutonNode* deploy = new AutonNode(0.1, new DeployAction());
Auton::AddFirstNode(deploy);

AutonNode* forward = new AutonNode(2, new DriveStraightAction(m_driveNode, m_odomNode, DRIVE_PARAMS, 38., 70., 80.));
AutonNode* forward = new AutonNode(2, new DriveStraightAction(m_driveNode, m_odomNode, DRIVE_CONFIG, 38, 70, 80));

AutonNode* clawCloseDelay = new AutonNode(1.2, new WaitAction(1.2));

Expand Down
Loading