How do i start coding the bot?

Hello everyone!
I joined the programming team in my robotics team, and I already know how to code in Python and have used it a lot. But I don’t know how to go about coding the bot. Do just go off of the documentation, or is there any set of videos I can watch?

Well first thing to consider is what programming language does your team use? I assume Python. Going off the docs is a great way and you can learn a lot. Watch videos to learn advance topics such as kinematics, odometery, PID, etc, though videos so you get a deep understanding. Also browse Chief Delphi so you get exposure to new libraries.

Let’s take a step back and focus on kitbot levels of stuff first…

3 Likes

I don’t know the python library very well but here is what I would recommend for a general .project. I would split it up into a couple of steps

  1. Learn how to create a new project and get yourself familiar with the files that come with it and their uses.

  2. Learn how to use hardware. A couple of things you will likely need are giving power to motors, reading data from sensors, and activating solenoids.

  3. Create your subsytems. A subsystem is something on your robot that performs a single function. For example if your robot has a shooter that could be a subsytems. Your drivetrain will likely be another subsytems. In your code you should have a class for each subsytem and it will have the instances of your motors and sensors. It should also have wrapper functions which allow you to use them in the ways you want.

  4. Time when things will happen. In this step you add your joysticks and activate the functions of your subsytems based on the buttons that were pressed. For this you may want to learn the built in command system.

  5. Create your autonomous period. This is similar to the 4th step but things will happen based on time instead of joysticks.

  6. Learn more advanced topics based on the needs of your robot. This could be kinematics, PID, vision, or anything else you feel could benefit your robot.

I highly recommend starting with the documentation. It is very thorough and explains all of these steps more in depth.

What libraries do your team use? Firstly, I’d advise looking at this year’s kitbot code for reference and doing stuff at that level. I’d get to know how to manage files and make projects, use the hardware, make subsystems, and learn more advanced topics like PID and vision (based on whatever your robot needs). Sorry if this isn’t much help, my team programs in Java.

1 Like

Does your team already have programmers? If so, ask them! Look at your team’s old code if you aren’t rookies, and work with the veteran programmers. Also look at the documentation and videos and etc as already mentioned, but don’t forget to work with the team you may already have!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.