Team 1756 Argos 2018 Code Release

I think I’ve procrastinated enough on this, so I’m now pleased to present team 1756 Argos’s 2018 software.

Our software is split between the following projects:

  • 2018-Robot
  • 2018-Dashboard
  • 2018-Vision - Not used this year, but we intend to use the JeVois camera if the game warrants it
  • ArgosLib-LV - This is a subtree within 2018-Robot, but we maintain it as a separate project to logically isolate game-specific code from generic utilities

All our robot code is LabVIEW, but we’re trying something new to make it more useful to teams trying to take a look at what we did. All our VIs are auto-documented on GitHub pages so you can view all our code without downloading anything or having LabVIEW on your PC. If any other teams are interested in doing something similar, the application we use to do this is AutoDoc.vi in ArgosLib-LV.

Our robot software has many features we’re proud of, but here is a summary of notable features:

  • Multiple robot configurations to enable common software on all robot platforms
    • Support for different motor controller addresses and types
    • Support for different tuning values for closed loop control systems
    • Support for different motor controller configurations (e.g. brake mode)
    • Support for disabling motors on configurations with limited hardware installed
  • Auto homing of encoder positions on startup
    • Arm rotation, arm extension, and selfie stick all retract to known locations when robot is first enabled to ensure known locations for robot implements
    • Motor stall and timeout detection to handle sensor failure
    • Homing status provided to operator on dashboard
  • Rotating and extending arm with custom path planning and motion profiling
    • Setpoints for hold position, switch, low scale, high scale, and climbing
    • Path planning performed in Cartesian coordinate space (x,y) to optimize path lengths and converts to actuator coordinate space (angle, extension) when commanding motors
    • Paths constrained by avoidance polygon to keep claw inside maximum frame perimeter extension and prevent collisions with other robot components
    • Paths constrained by arm physical limits to prevent over extension or under extension
    • All paths generated on-demand to move from current position to commanded position
    • Path velocities smoothed using s-curve motion profile to provide smooth speed ramping between positions. This is based on the motion profile generator Excel spreadsheet provided by Cross The Road Electronics
    • Uses Talon SRX motion profiles to synchronize motion of rotation and extension motors
    • Visualization in VI front panel to see path plans and executed path
  • Extending camera “selfie stick” with automatic camera switching
    • One web camera fixed to robot in aimed at a low height for power cube acquisition and switch, and one web camera actuates between a medium and high height for scale placement
    • Selfie stick raises and lowers automatically according to arm setpoints
    • Motion controlled by Talon SRX motion magic
    • RoboRIO provides each camera feed separately or offers an auto-sequenced mode where the dashboard footage switches camera source while monitoring the same video stream
      • Sequencer enables fast switching between camera feeds, lower bandwidth requirements, and lower processing costs on the RoboRIO
      • Auto sequenced feed controlled by robot arm position
  • Spline-based drive path planning
    • Utilizes Pathfinder to generate path profiles
    • All processing performed on the RoboRIO
  • CSV-based autonomous script creation
    • Further documentation available in AutoRoutines
    • Creating a new autonomous routine or modifying an existing routine only requires uploading a file to the RoboRIO via FTP
    • Autonomous sequencer uses routine steps to generate all necessary drive paths and synchronizes arm and intake actions along the drive path
    • RoboRIO generates images of autonomous routine paths that we used to create a “playbook” to share during pre-match strategy planning
    • All routines are pre-processed during application startup to enable minimal delay on match start
  • Fully-featured operator station dashboard
    • Auto-sequenced camera footage
    • Sensor homing status indicators
    • Visualization for robot arm position
    • Indicators for arm control state (manual, operator assist), autonomous status, limit switch states, and armed autonomous routines
    • Drive encoder readouts for diagnostics and testing
    • Auto-populating autonomous routine selector
      • Dashboard displays all available starting positions and routines for those positions based on the files loaded on the RoboRIO
      • Operator selects which routine to run for each of the four possible field configurations
      • Controls available to re-load routine lists if new files are uploaded during runtime without requiring the application to restart
      • Controls available to run autonomous routines during teleop mode for extra validation during practice matches
  • On-demand, asynchronous onboard path planning
    • Drive and arm path planners are implemented as asynchronous services accessed through message queues
    • This helps ensure computationally-heavy path planning does not stall high-frequency control loops that handle manual operator controls (such as driving and intake)
    • All operator assist functions can be interrupted and canceled by manual controls
  • Individually addressable RGB LED strips
    • LED strips controlled by Arduino Mega
    • RoboRIO sends robot state information to Arduino over I2C
    • Multiple lighting modes to indicate alliance, robot control mode (disabled, teleop, autonomous, climbing), and arm position
    • FFT audio analysis on Arduino for flame visualization lighting
  • Automatic code documentation

Special thanks to jaci for providing pathfinder and gerthworm for helping us develop a path following strategy in autonomous.

Good luck in the 2019 season!

1 Like

Still some of the craziest stuff I’ve seen done in labview yet! Birkelbot would be proud.