FIRST UP…A plea for help.
Ok…So the team is scrambling to get swerve working. They are trying this and that with little success. We are using the SDS swerve MK2 modules. They have absolute encoders and are programming the robot in JAVA. The robot is lifted up on blocks. When they try to run the robot some of the wheels point in a steady direction, others will jitter around violently. There is a lot that could be wrong, so help would be greatly appreciated. I feel like if they can get off of this sandbar they will be OK, and I feel like they understand enough that this can still be a learning opportunity for them.
Here is what one of them sent out in an email yesterday when asking for help:
Alright, so far we’ve tried 3 different programs and here are the results of each of them. I didn’t include the programs themselves because they are currently on the laptop back at the robotics room, I can try to send out copies of the program when I get the chance tomorrow.
-
We have a program that was created by Mr. Carman and it sort of works. This program doesn’t use the absolute encoders and therefore requires the wheels to be manually reset to the zero position before running the program. This program also doesn’t have any field orientation or swerve module angle optimisations. So what I mean by “it sort of works” is that it goes in the direction that you tell it and it rotates, but it starts in the opposite direction before going the way it is supposed to go.
-
We have a program that Branson modified that was based on the wpi api swerveBot example. This program on paper is promising as it supposedly has the angle optimizations, field orientation, and uses the absolute encoder. I’m not sure what is wrong with this program, but when we run it all of the motors violently jiter back and forth, even without any joystick input.
-
We made a program today using the teleop code from this video (excluding autonomous) https://youtu.be/0Xi9yb1IMyA . This program also looked promising as the team in the video seems to be using almost the same setup as our setup. We are using the mk2 swerve modules on our robot just like the people in the video. When run this program seems to work and turn the wheels in close to the right direction, but one of the four modules is jittering with joystick input. I’m not sure if it is related but we seem to receive an occasional CAN error from all of the turning motors except for the one that is jittering.
It sounds like Mr. Carman will be able to come take a look and see what there is to see tomorrow. Some things that we will try doing tomorrow are setting the drivetrain on the ground to see if maybe the PID controller is constantly over shooting the target location because of lack of resistance of the ground. Although the more I think about it, the more I think the jittering might be a misconfiguration in the PID controller. I’m not sure what the PID values in the first 2 programs are but in today’s program we had a P value of 0.5 and the other two values were 0. We will also look into using a different gyro for field orientation.
Let me know if you have any input.
CodeForSharing - Google Drive
Here is the code they made today…It still doesn’t work, but the jittering is gone. They stopped using the “fancy method” for getting the voltage the analog absolute encoders was supposed to be sending. They also decreased the P value from .5 to .25 which seems to have stopped the jittering.
https://drive.google.com/drive/folders/1JvQWKaaYa9s0fUuGlmpctWZNz4eHdYRU?usp=sharing
Link to video of it running:
What I wrote over the last few days:
I don’t know if the kids know…The part they don’t understand.
If you have been following along, you know that I sort of lost my proverbial mind over the job the kids on my team did wiring the robot. It was a mess, which has largely been cleaned up…not to my standards, but enough that you can actually maybe think about seeing what is or isn’t wrong relatively clearly.
One of the encoder wires was stretched super tight, something that I pointed out to them during my trade, before I told them that I was done and wouldn’t mention wiring again. Something I actually have managed to not do.
So…I was walking past the robot minding my own business and a kid said, “We made that wire longer for you.” 
I hope I hid my disappointment, and said something like “cool, looks good!”, and went on my way.
It is now something like a week later. Swerve still doesn’t work.
So…last night I went to bed at 11…took too long to wind down, and woke up at 3…
I’ll finish this tomorrow, but you get the point…I’m starting to stress and it isn’t good.
The thing that I don’t think that kid understood is that we aren’t doing this for me, and it breaks my heart to see some of them flailing away at something and falling farther and farther behind, while others on the team don’t know enough to know how much trouble they are in, and how much this might suck if things don’t turn around pretty quickly.
One of the kids does Skills USA. They have been working on, and have made very little progress on, the same project for 2 years. They presented a non-functional part of said along with a write-up and poster and qualified to move on to states with it…They work a couple hours a week, and feel like they are putting in overtime if they come in and work on it during lunch.
That kid’s only experience with FIRST was last year when we were remote for the entirety of build season. Every meeting, they complain about how much time we spend in robotics.
I don’t think they get it.
The other day another kid came in after the meeting was over, really upset. They had CADDed a part and had planned on making the part by themself, start to finish while other kids on the team were sitting around doing nothing…(some were bored enough to start being a little bit destructive.) So I asked the kid who had CADDed the part to take some kids through and let them actually make the part so that they would A) have something to do, and B) learn something in the process.
The kid who CADDed the part wasn’t interested in that and went off sort of in a huff. They ended up helping to cut out letters for our blanket drive boxes. So the other kids went ahead and made the part on their own.
The kid who CADDed the part was upset because they felt like they had wasted their time cutting out letters instead of “having fun”. They only come to robotics to “have fun”, and not to waste their time on “stupid sttuff like cutting out letters’’.
I have strongly debated putting this out there as part of this blog. Not because I want to hide the warts and the ugly, but because it depicts a moment where a person was struggling to see what is important.
I struggled with how to handle that one.
How do I explain to that kid that I am going to carry that interaction around in my head for a long, long time? How do I let them know that every time I see them I am going to wonder if I handled that one properly. If I said the right things to let them know that I sort of understand the real frustration and reason that they were upset…Probably more than they did.
That I understood that they were really upset because something was “taken away from them”. That they felt like they had earned the right to make that part because it was their design, and that I was trying to get them to bring other people along with them so that others could learn to do what they can do. How do I convince them that we are a better team when we put others before ourselves.
The part ended up being too small anyway. Probably should have caught that before they made it…My bad.
Another kid ended up redrawing the part the correct size and got some other kids to make it.
Didn’t sleep well again last night…I kept waking up thinking about things that we need to get done, things that I need to remember to do, or remind the kids to do, and things that I don’t know the status of.
I tried to spend some time playing Forza Horizon 5 last night, but my mind wasn’t really in it. After about a half hour I gave up.
Moving forward.
As much as I really wanted to keep last year’s robot I think today I am going to have a number of kids on the team take it apart. I think I’ll have them salvage the parts we can off of it, and use them to get some of the current robot up and running. For example, we are waiting on motors and bearings for the intake and ball elevator. We have what we need…It is just tied up in the old robot. The reason why I wanted to keep it in one piece is because it has a launcher and it does all the things. It is perfect for community demos and showing people what we are capable of, but…if that comes at the cost of us not having a robot for this year then…
So…Hopefully that can get us some progress, and help our chances of having some sort of success this year.
We set Saturday as the drop dead day for swerve. If we can’t get it done by then, then we are going to go with a KOP drive train. We will have to modify a lot of stuff in order to make it work, and we may end up struggling to do very much on the other end of the changes, but at this point I am not sure what else to do.
And I wonder why I can’t sleep at night.
So…I’m going to fight to not let a few frustrations get in the way. I honestly do love this program, and my kids…I think that is part of what keeps me coming back. The hard part is waiting for them to grow into the people that I know they can be and watching them take all of the lumps on the way down the hill of growing up.
Today:
Today we worked on awards. Some of the kids get it, some don’t. We used to have an awards team…Times have changed…So, we spend about an hour on Tuesday’s writing as a team. Everyone is supposed to do their part. Some contribute more than others.
The hard part is that the kids who are capable of contributing the most are expected to do so in all areas.
After awards time I had them work on taking apart last year’s robot. A few of them seemed to really like the experience, figuring out how things worked and how to take them apart. Some of them were frustrated that I wouldn’t just let them hack it all to pieces, but instead made them take out each subsystem and then take the subsystems apart individually, salvaging as much hardware as possible. Others were sad to see it go. We had originally planned to keep it in one piece and use it for demonstrations, but, not having the parts we need in time to get things done is making it much more important to have something now, than to hope to have something in the near future. Really I was after the bearings, motors, and shaft couples for our ball elevator and intake. I am hoping that with those parts free and clear we can get to work on at least the first level by Saturday.
The progress on swerve was hopeful, but maybe not enough. I’m glad I was able to at least get them to understand they actually have to tune the PID loop, and we had them look at the actual values they were getting from the sensors instead of just making blind changes to their code and hoping for the best. It was nice that Mr. Carman and I were actually able to make things better to some degree.
I’m hoping that we didn’t bite off too much this time. I need to be willing to give up and cut bait if it isn’t going to work out.
So…End of Saturday.
I’ll try to keep you all posted.
Enough for now.
Edoga