Skip to main content

Controller library for robotmoose robots.

Project description



A python robotics library for interfacing with RobotMoose


MoosePy offers functionality for driving and retreiving sensors values from robots deployed using RobotMoose. It supports arbitrary robot configurations using the JSON structure found on the Superstar server.


  1. Download the latest supported version of Python3

  2. Install the library with following pip command:

     pip3 install moosepy

    MoosePy uses the requests library, which can be installed using the following command if you are experiencing dependency issues:

    pip3 install requests


Instantiating a robot object is dependent on two parameters:

Required Parameter Description
superstar_path The path after For example, if the path to your robot is then superstar_path = robots/20xx-yy/uaf/robotName
password The robot's password


import moosepy

# The path after
superstar_path = "robots/20xx-yy/uaf/robotName"
password = "password"

robot = moosepy.Robot(superstar_path, password) 


Drive Forward

import moosepy
import time

robot = moosepy.Robot("superstar_path", "password")

# Drive forward with left and right motors at 10% speed for 1 second,10)

# Stop the robot,0)

Drive Forward, Backward, Left, and Right

import moosepy
import time

robot = moosepy.Robot("superstar_path", "password")

# Forward,10)

# Backward,-10)

# Left, 10)

# Right, -10)

# Stop,0)

Get Sensor Data JSON

import moosepy

robot = moosepy.Robot("superstar_path", "password")
sensor_data = robot.getSensors()

print(json.dumps(sensor_data, indent=4))

Example Output:

    "backend": {
        "battery": {
            "is_charging": false,
            "percent": "2.00%",
            "time_till_discharged": "7.63 minutes"
        "name": "RobotMoose",
        "version": "2017.3.6.0"
    "battery": {
        "charge": 43,
        "state": 16
    "heartbeats": 188,
    "power": {
        "L": 0,
        "R": 0

Control a Servo

import moosepy

robot = moosepy.Robot("superstar_path", "password")
robot.setOpt("servo", {"degree": 70})


Copyright 2019 University of Alaska Fairbanks

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details

Release history Release notifications

This version


Download files

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

Files for moosepy, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size moosepy-1.0-py3-none-any.whl (4.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size moosepy-1.0.tar.gz (62.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page