• Welcome to Redshift Project Depot.
 

C++ implementation

Started by Louis L, January 01, 2016, 07:06:54 PM

Previous topic - Next topic

Louis L

This is what we did in the C++ code

Louis L

The C++ team is
- Matt S (lead)
- Vanshika
- Matt B.
- Lydia

Matt S

Today we completed the drivetrain code, and also setup a github repository for our project.  In addition we also fixed a bug in robot builder where all of our handwritten code is being erased when we are exporting to C++.  This was only fixed on the Dev 4 laptop so we need to do that for the rest of the laptops.  What we need to do now is download the code for the gyroscope that we are using off of github, and test the drivetrain code on the testbed.

Matt B

Today I fixed the drive train code, motor safety helper was the problem like last year, and successfully deployed it to the rio. It drives the motors with no issues.

Matt S

Today me and Matt B got working on the intake and climber subsystems.  A robot builder bug has also been found and is deleting our handwritten code.  This needs to be fixed on every laptop but dev 4. Most of the logic has also been completed for both of the subsystems.  The drivetrain has also been debugged and completed.

Matt S

Today the climber and intake subsystems were basically completed.  There are some dummy values that need to be replaced and the intake arm mechanism needs to be changed, but other than that these subsystems are completed.  We also did a little bit with autonomous, however this was erased because of Github errors.  These Github errors are becoming too much of a problem so we have decided to use USBs for keeping track of our code.  You can still use Github if you want, however Github sometimes caused our code to disappear or forced us to branch away from the master branch.

Matt S

Sorry about not constantly updating the forum.  For the past couple days I worked on gyro code, and vision code.  We are now able to theoretically receive the distance we have traveled from the gyro.  I say theoretically because we are actually getting the acceleration from the gyro and not the distance.  The distance would probably be not as accurate as we would like.  Also, the code I added for the shooter has allowed the robot to receive the contour area from GRIP and aim the shooter based off of the contours centerX value.  For the next couple days we need to start getting the shooter done and completing the autonomous code.

Matt S

Today we added to the vision code and worked more on the autonomous code.  For vision we added code that helped us figure out which line we are using out of all of the lines given to us from GRIP.  We then from this line figure out the distance from its center point and the camera's center point.  This distance allows us to see if we need to move forward of backward.  For the autonomous, we added code for passing under the low bar and other defenses.  For the next week we should hopefully be able to complete autonomous and then test our code and see if it works with the robot.

Matt S

I was just thinking about the code we wrote, and something we need to add is test to make sure the boulder is actually in the intake system before we shoot.  Another thing is that  needs to be added is a way to run GRIP when the robot is initialized.  GRIP will be running on a separate thread from our robot code, so that is why we need to do that.  This week is a good week to also start testing certain code on the testbed, just to make sure everything works as planned.

Vanshika C

#9
January 11th:

Lydia and I tested the old code. Note: the original code is on the desktop of dev4 (if it is missing from git). There were quite a few problems with git in the beginning but we eventually figured out. It still said no robot code when we tested the old code (from 2/3/16). This was the error it gave:

[HAL] Starting task FRC_DriverStation...

Apparently Matt B had the same error yesterday. But this just tells us that it isn't the new code that we added that was wrong, so its probably something we added after the last time we successfully tested the code.

EDIT: my research found that the problem might be the version of eclipse. I think we might need to update eclipse? Here's a link to the Chief Delphi forum [this is corroborated by another forum link too] : http://www.chiefdelphi.com/forums/showthread.php?p=1524498

Matt S

So I figured out what our problem is with the code crashing, and it is the gyro.  So I currently I don't know how to fix the problem, so if anyone has any ideas that would be great.

Matt S

Today we made sure that all buttons were working, and also implemented button priorities.  We also tested to make sure the drivetrain worked, and fixed issues with timer.  The smart dashboard also now displays the correct information.  Tomorrow we should work on vision, and autonomous.

Matt B

Today I implemented some autonomous selection code but it has yet to be tested.

Matt S

Today we fixed the autonomous selector so that it works correctly, and also made the smart dashboard radio buttons override the autonomous selector if needed.  Some autonomous modes we also tweaked, as well as fixing bugs related to flush.  A few days ago the climber and shooter were also completed.

Matt S

Today the camera switching system was fixed, and the intake movement motor and encoder were also implemented.  Code has also been added to move the motor to a downward and upward position, and the corresponding buttons have been added to the button priority system.  Low shot has also been added back.