Welcome to the code repository for Team 2530A, where we document the development of our robot's software for the 2024–2025 VEX Robotics Competition (VRC) season. This repository contains all the code our robot will run during competitions, including templates, control systems, and experimental features.
Note: This uses a Linux vexcom file, to switch over to windows please check the vexcodetext repo
-
Linear Motion Profiling with PID:
A template for motion control using PID loops in conjunction with linear motion profiling. -
Velocity-Based Color Sorting:
An advanced sorting system for a hook intake using the VEX AI Vision Sensor. -
Quadratic Velocity Controller:
A custom velocity controller designed for improved drive performance. -
Odometry Integration:
Adding support for precise robot position tracking (From Jar Template). -
Move to Point Controller Move to Point, basic Pure Pursuit controller that I fixed from JAR Template.
-
Path Generation Support:
Compatibility with tools like Path Jerry IO for autonomous route creation. Path Jerry IO template is in path.jerryio.template.txt. It uses the move to point route generation format.
-
Pure Pursuit Algorithm:
An initial implementation of the pure pursuit algorithm to control robot movements as well as Boomerang. -
RAMSETE Controller or Algorithm: An implementation of the RAMSETE controller for non-linear feedback control.
-
2D and Rotational Motion Profiling Feed Forward Loop: An implementation of 2D Motion Profiling with custom Velocity Profiles with Path Jerry IO.
-
Compilation of Mechanism Information to make custom Motion profiles An implementation given weight, gear ratio, and other constants to make an acceleration and velocity motion profile over time of any mechanism.
-
Custom Library Development:
A reusable library for motion profiling, odometry, and advanced algorithms, potentially ported to PROS.
This repository has evolved over the course of the season, starting with a custom PID controller system. Below is a brief timeline:
-
Initial PID Controller:
Created and deployed for our first tournament to control basic motion. -
Exploration of Tools:
Originally, we considered using PROS, but it was challenging to set up with our environment, especially when working with the VEX AI Vision Sensor.- Although there are ways to make the sensor work with PROS, we opted for VEXcode initially.
- On my personal account, SerrialError, I also created a PROS project for an X-Drive as part of earlier experiments.
-
Switch to JAR Template:
The current project is built on top of JAR Template, which uses the Apache License.- All relevant contributions are documented in
NOTICE.md
. - A detailed version history is available in
CHANGELOG.md
.
- All relevant contributions are documented in
I made a custom repository that allows you to interact with VEX directly through the command line and through makefiles. The name is VEX Robotics Command Line Programming Environment, it is available for both Windows and Linux and more information can be found by clicking the link. Here is a list of steps on how to run it:
-
Download the Dependencies Listed on the Github Page:
- Download and install gcc and clang.
-
Clone the Repository:
- Clone or download this repository to your computer.
-
Change Any Software Modifications to Your Specific Hardware Design:
- Change or get rid of the intake and/or fishmech.
-
Download SDK:
- Run
make
in your terminal
-
Deploy the Code:
- Run
make clean upload
in your terminal
-
Hardware Adjustments:
- You may need to modify the motor configurations to match your robot. The JAR Template Documentation provides instructions on adding, removing, and defining motors.
-
Constants:
- If using specific features (e.g., color sorting), you must update the constants to fit your robot's setup.
- Most constants are self-explanatory, but feel free to reach out with questions if needed.
-
Autonomous Routes:
- The current repository includes our autonomous routes, but these will need to be customized for your robot's field setup and objectives.
In the future, I plan to:
- Develop a standalone library to simplify integration of motion profiling, odometry, and path planning.
- Add support for autonomous path generation via tools like Path Jerry IO.
- Transition back to PROS for advanced customization, including seamless integration with the VEX AI Vision Sensor.
This repository is built on JAR Template, which is licensed under the Apache License 2.0. All changes and contributions are documented in NOTICE.md
and CHANGELOG.md
.
For questions, issues, or collaboration, feel free to open an issue or contact me directly!
This repository provides a lightweight, text-based environment for programming and building VEX robotics projects. It is designed as an alternative to the VEX VSCode Extension, allowing you to upload, build, and manage your VEX projects without the need for a full IDE.
Note: This project is not affiliated with VEX Robotics. It utilizes files extracted from the official VEX VSCode extension and VEXcode application to enable functionality.
Note: Great inspiration was taken from this article on Medium.
Note: This is the Linux Branch if you use windows please go the Main Branch.
- Cross-platform support: Available for Windows and Linux.
- Fully text-based interface for streamlined workflows.
- Supports building and uploading VEX Robotics programs using standard CLI tools.
To build and upload your VEX programs, you need the following tools installed on your system:
- clang
- arm-none-eabi-objcopy
- arm-none-eabi-size
- arm-none-eabi-ld
- arm-none-eabi-ar
- Install the ARM GCC toolchain:
- On Debian-based systems (e.g., Ubuntu):
sudo apt update sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
- On Arch Linux:
sudo pacman -S arm-none-eabi-gcc arm-none-eabi-binutils
- On Debian-based systems (e.g., Ubuntu):
- Install clang:
- On Debian-based systems:
sudo apt install clang
- On Arch Linux:
sudo pacman -S clang
- On Debian-based systems:
To enable proper communication with the VEX Robotics hardware over a serial connection, you need to configure udev rules. This ensures that the device (e.g., /dev/ttyACM0) has the correct permissions for access.
-
Create a new udev rules file in the /etc/udev/rules.d/ directory:
sudo nano /etc/udev/rules.d/01-vex-v5.rules
-
Add the following line to the file to set permissions for VEX devices:
KERNEL=="ttyACM[0-9]*", MODE="0666", ATTRS{idVendor}=="2888", ATTRS{idProduct}=="0503"
- Explanation:
KERNEL=="ttyACM[0-9]*"
: Matches any device with the name pattern/dev/ttyACM*
.MODE="0666"
: Sets read and write permissions for all users.ATTRS{idVendor}=="2888"
: Matches the VEX Robotics Vendor ID.ATTRS{idProduct}=="0503"
: Matches the VEX Robotics V5 Controller Product ID.
-
Save and close the file.
- In
nano
, pressCtrl+O
to save, thenEnter
to confirm, andCtrl+X
to exit.
- In
-
Reload the
udev
rules:sudo udevadm control --reload-rules
-
Unplug and reconnect the VEX Robotics device.
-
Verify the device is accessible:
ls /dev/ttyACM*
- If the device is not recognized or permissions are incorrect, double-check the Vendor ID and Product ID using the lsusb command:
lsusb
Look for a line like:
Bus 003 Device 015: ID 2888:0503 VEX Robotics, Inc VEX Robotics V5 Controller
- Update the idVendor and idProduct values in the udev rules file if necessary.
- Make a new folder named src
- Put any cpp files you want to run in it (typically main.cpp)
- First to download the sdk run
make
- Then for building run
make clean build
- And for uploading run
make clean upload