Skip to main content

j5 Robotics Framework

Project description

j5

Tests Test Coverage Maintainability Documentation Status PyPI version MIT license Bees

j5 Framework - Creating consistent APIs for robotics

What is j5?

j5 is a Python 3 framework that aims to make building consistent APIs for robotics easier. It was created to reduce the replication of effort into developing the separate, yet very similar APIs for several robotics competitions. Combining the common elements into a single library with support for various hardware gives a consistent feel for students and volunteers. This means more time to work on building robots!

How do I use j5?

j5 is designed to never be visible to students. It sits behind the scenes and works magic.

from robot import Robot

r = Robot()
r.motor_boards[0].motors[1] = 0.5

The above code is likely to be familiar to any student who has competed in one of the below competitions. However, it is not a trivial problem to make this code portable across the platforms. For example, the motor board for Student Robotics is a separate board to the brain board, but is built into the same board for HR RoboCon.

j5 lets competition vendors define how the basic parts of the apis are accessed. A robot can thus be constructed from any combination of parts from various organisations.

from j5 import BaseRobot
from j5.backends.hardware.sr.v4 import (
    SRV4MotorBoardHardwareBackend,
    SRV4PowerBoardHardwareBackend,
    SRV4ServoBoardHardwareBackend,
)
from j5.boards import BoardGroup
from j5.boards.sr.v4 import MotorBoard, PowerBoard, ServoBoard


class Robot(BaseRobot):
    """My Competition Robot."""

    def __init__(self) -> None:
        self._power_boards = BoardGroup.get_board_group(
            PowerBoard, SRV4PowerBoardHardwareBackend,
        )
        self.power_board = self._power_boards.singular()

        self.motor_boards = BoardGroup.get_board_group(
            MotorBoard, SRV4MotorBoardHardwareBackend,
        )
        self.motor_board = self.motor_boards.singular()

        self.servo_boards = BoardGroup.get_board_group(
            ServoBoard, SRV4ServoBoardHardwareBackend,
        )
        self.servo_board = self.servo_boards.singular()

Competitions

We intend to support the kits of the following robotics competitions:

Whilst j5 isn't officially endorsed by Student Robotics or RoboCon, we are working closely with Student Robotics to ensure perfect compatibility. Many j5 contributors are members of Student Robotics and SourceBots.

sbot, a j5 based API, was successfully deployed to over 100 users in August 2019. This is the first known case of a real-world deployment of a j5 based API.

If you are interested in adding support for your hardware or building your own API, please get in touch.

Contributions

This project is released under the MIT Licence. For more information, please see LICENSE.

j5 contributors refers to the people listed in the CONTRIBUTORS file.

The CONTRIBUTORS file can be generated by executing CONTRIBUTORS.gen. This generated file contains a list of people who have contributed to the j5 project.

More information about contributing, and how to contact contributors can be found in our docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

j5-1.1.1.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

j5-1.1.1-py3-none-any.whl (72.2 kB view details)

Uploaded Python 3

File details

Details for the file j5-1.1.1.tar.gz.

File metadata

  • Download URL: j5-1.1.1.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.6 Darwin/21.6.0

File hashes

Hashes for j5-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6b1b667a39093ccb2fae400d12580305f392d31351aae1c4692467bb9171cc5b
MD5 1bb507237befadc68ac80b2f40c5ab30
BLAKE2b-256 f13737c808ce1b0d01388abc74548bb190babd4539e59be7be0d0e4026823695

See more details on using hashes here.

File details

Details for the file j5-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: j5-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 72.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.6 Darwin/21.6.0

File hashes

Hashes for j5-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65753d618f4357b55a3a022d8f2bc81d2a1eac9c2188685667ccf23aa2a0c100
MD5 43470a841be7640aa539996d90c791e0
BLAKE2b-256 d2cec62e25ddf1c11df34cbb6e4990da3d1546d5ab9a6126626eb1787c94e5f1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page