RobotPy
2022.0

Robot Programming

  • Getting Started
  • Installation
  • Programmer's Guide
    • Introduction to Python
    • Anatomy of a robot
    • Running robot code
    • Deploying to the robot
    • Robot Simulator
    • Unit testing robot code
    • Best Practices
    • Using NetworkTables
    • Example Code
  • Frameworks
  • Hardware & Sensors
  • Camera & Vision

API Reference

  • WPILib API
  • NetworkTables API
  • CSCore API
  • Commands (new) API
  • Commands (old) API
  • Utilities API
  • PyFRC API
  • HAL API
  • WPIMath API
  • WPIUtil API

Third Party HW

  • CTRE API
  • NavX API
  • REVLib API
  • PhotonVision API
  • PWFusion API
  • Romi API

Additional Info

  • Troubleshooting
  • Support
  • FAQ

RobotPy Developers

  • Developer Documentation
RobotPy
  • Docs »
  • Programmer’s Guide
  • Edit on GitHub

Programmer’s Guide¶

  • If you don’t know python very well (or at all), start with Introduction to Python

  • Otherwise, start with Anatomy of a robot

  • Introduction to Python
    • Language elements
    • Variables
    • Control Flow
    • Operations
    • Functions
    • Classes
    • Loops
    • Exceptions
    • Future topics
    • Next Steps
  • Anatomy of a robot
    • Create your Robot code
    • Importing necessary modules
    • Robot object
    • Adding motors and sensors
    • Robot Operating Modes (TimedRobot)
    • Main block
    • Putting it all together
    • Next Steps
  • Running robot code
    • How to execute the script
    • Commands
    • Next steps
  • Deploying to the robot
    • Immediate feedback via Netconsole
    • Skipping Tests
    • Starting deployed code at boot
    • Manually deploying code
    • Next Steps
  • Robot Simulator
    • Running the simulator
    • User interface
    • 2D Field Widget and Physics
    • Communicating via NetworkTables
    • Next Steps
  • Unit testing robot code
    • Builtin unit tests
    • Writing your own test functions
    • code coverage for tests
    • Next Steps
  • Best Practices
    • Make sure you’re running the latest version of RobotPy!
    • Don’t use the print statement/logger excessively
    • Don’t die during the competition!
    • Consider using a robot framework
  • Using NetworkTables
    • Robot Configuration
    • Server initialization (Robot)
    • Client initialization (Driver Station/Coprocessor)
    • Theory of operation
    • External tools
  • Example Code
Next Previous

© Copyright 2014-2020, RobotPy development team Revision 0c99b478.

Built with Sphinx using a theme provided by Read the Docs.