Skip to content

Document robot program startup #79

Description

@virtuald
This is the contents of robotCommand (roborio, but systemcore will be similar):
    https://github.com/robotpy/robotpy-installer/blob/main/robotpy_installer/cli_deploy.py#L617

That calls `python -m robotpy` with a `run` argument:

    https://github.com/robotpy/robotpy-cli/blob/main/robotpy/main.py#L197

That function is the thing that finds `robot.py` and loads a robot class from it. It then loads the `run` entrypoint and passes the robot class to it.

That entrypoint is in the wpilib package:

    https://github.com/robotpy/mostrobotpy/blob/main/subprojects/robotpy-wpilib/pyproject.toml#L36

Which causes this class's `run` function to be called:

    https://github.com/robotpy/mostrobotpy/blob/main/subprojects/robotpy-wpilib/wpilib/_impl/start.py#L89

Which then calls the `main` function of the robot class, which then does whatever it needs to do to continue getting the robot to work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions