Giter VIP home page Giter VIP logo

pyfrc's Introduction

RobotPy: Python for FRC cRIO Robot Controller

Author: Peter Johnson, FRC Team 294
Author: Dustin Spicuzza, FRC Team 2423/1418
Copyright: Copyright © 2010, Peter Johnson, Ross Light, Dustin Spicuzza

About RobotPy

RobotPy is a distribution of Python intended to be used for the FIRST Robotics Competition. Teams can use this to write their robot code in Python, a powerful dynamic programming language.

Features

  • Python is simple to learn and easy to maintain.
  • RobotPy lets you reload code without restarting.
  • RobotPy provides access to the WPILib class library.
  • You don't need to use WindRiver (unless you're rebuilding RobotPy itself).

Installation for most people

Download the binary releases from our FIRSTForge site, unpack them, and run install.py. Download from: http://firstforge.wpi.edu/sf/projects/robotpy

Installation from Source using our build VM

Using the provided build virtual machine is the easiest way to build RobotPy from source. See build-vm/README.txt for instructions.

Installation from Source (Advanced Users Only)

Step 1: Install Python

Python 2.7.5 is known to work. Ensure that you add your python installation directory to your PATH variable.

Note: This step is required for SIP installation

Step 2: Install SIP v4.15.3:

The cmake build process currently checks for exact versions of SIP, as the generated code changes from release to release.

http://www.riverbankcomputing.com/static/Docs/sip4/installation.html

Note: Installation of SIP on Windows requires Visual Studio or MinGW installed, see the SIP build instructions for more details.

Step 3: Build the source tree

TODO: Update these instructions for Windows too?

The RobotPy build process uses cmake to build the RobotPy distribution. frcmake is a wrapper around cmake that sets the build environment up to build for the cRio.

RobotPy currently uses the GCC 4.8 compiler distributed at the following URL to build the binary distribution. Wind River may be used, but we haven't built it with Wind River, so you may run into trouble using it with frcmake.

http://firstforge.wpi.edu/sf/projects/c--11_toochain

Create a directory (the 'binary directory') outside of the RobotPy source tree, and run this:

$ frcmake /path/to/robotpy

Once you've done this, you can build the code:

$ make

To copy the build output to the 'dist' directory, run this command from your binary directory:

$ make install

To build a binary release, just run the following command and a zip file will be created in your build directory.

$ make package

Step 4: Robot Installation

From the 'dist' directory inside of your binary directory, run install.py

Alternatively, you can FTP the contents of the 'robot' directory to your cRio directly. However, install.py is easier.

Development tools

See the utilities directory for useful development tools that may make your RobotPy development experience easier.

The pyfrc python package is a recommended development package that provides unit testing and other capabilities for your robot code.

https://github.com/robotpy/pyfrc

Technical Overview

RobotPy is a packaging of a patched Python 3.2 interpreter (found in the RobotPy/Python subdirectory of the source code). All access to the WPILib is generated by a SIP interface, which is found in Packages/wpilib/sip/. When the robot is started, it initializes the Python interpreter and runs the file py/boot.py. From there, all responsibility is given to the boot.py script, which is referred to as the bootloader.

If boot.py ever exits (due to an exception, for example), the C++ code exits. The default boot.py simply exits on any user exception. If this happens, you can reboot easily via NetConsole by simply typing "reboot" followed by hitting the enter key. This is how code reloads are performed. As boot.py is written in Python, this behavior can be customized as desired.

Major Differences from standard Python

  • Several Python modules with large and/or incompatible dependencies removed, namely: curses, dbm, gdbm, tkinter, nis, ossaudiodev, resource, spwd, syslog, termios, audioop, bz2, crypt, grp, ssl, pwd, and mmap.

Licensing

A brief overview of licensing terms:

If you redistribute RobotPy and add other libraries, please include their licensing information here.

RobotPy

Copyright © 2010 Peter Johnson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pyfrc's People

Contributors

actions-user avatar archduketim avatar ariovistus avatar auscompgeek avatar benjiboy50fonz avatar bovlb avatar carterfendley avatar catcat420 avatar computer-whisperer avatar earharpm avatar james-ward avatar kenwoodfox avatar martinrioux avatar mattyork avatar ryannazaretian avatar sarosenb avatar svisser avatar thetriplev avatar vanjac avatar virtuald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyfrc's Issues

Fix the CTRE CANTalon support

Currently, the simulator crashes when you create a CANTalon device. Would be great if someone could pitch in here, I won't have time until late in the weekend. One thing that's very important is that it shouldn't crash if robotpy-ctre isn't installed.

Eventually, we need to support devices in a more general way.

Simulator's controllers inconsistent with driver station

With a standard xbox controller, the axes are as follows

  1. Left Rotate
  2. Left Move
  3. Left Trigger
  4. Right Trigger
  5. Right Rotate
  6. Right Move

However, on the simulator with pygame, the axes are as follows

  1. Left Rotate
  2. Left Move
  3. Both Triggers
  4. Both Triggers
  5. nothing
  6. crashes

Add pyflakes tests

pyflakes only detects things that are actually code errors (well... mostly), and it's pretty fast. Should add this in the future.

I think I would have it separate from the tests, as most of the things that pyflakes catches are things that are almost certainly errors.

Don't rerun tests if the code hasn't changed

Via @ArthurAllshire:

Also, it would be nice if the library could detect that you had already run the tests on a particular code base using a checksum, and then not run them again when you are deploying, or trying to run them again.

This is a bit complex if you really want to do it right, since you should probably hash imports et al. But probably doable.

I won't have time to get to this anytime soon, but it's a good idea.

Simulator exception if there's multiple PCMs

Using pyfrc 2017.0.7
If the robot code utilizes multiple Pneumatics Control Modules, the simulator throws an exception when Solenoid objects are created, thinking the same ID resource has been used more than once. For example, if we have one PCM assigned to CAN ID 0 and a second one at CAN ID 2, this line will work:

solenoid1 = wpilib.Solenoid( moduleNumber = 0, channel = 0 )

But this will then throw an error:

solenoid2 = wpilib.Solenoid( moduleNumber = 2, channel = 0 )

The exception:

File "C:\Python34\Lib\site-packages\wpilib\solenoid.py", line 75, in __init__
  self._solenoidHandle = hal.initializeSolenoidPort(portHandle)
File "C:\Python34\Lib\site-packages\hal\functions.py", line 42, in outer
  raise HALError(getErrorMessage(status.value))

hal.exceptions.HALError: HAL: A resource is already allocated.

Deploying the same code to the robot works fine. Seems to be unique to the simulator.

Simulated time goes backwards

An exception occurs at https://github.com/robotpy/robotpy-wpilib/blob/master/wpilib/wpilib/_impl/timertask.py#L32 because the delay period is negative.

Is evident in robotpy/robotpy-wpilib-utilities#10 -- but I've found that the example works on Linux without a problem, but fails (sometimes) on OSX 10.11. I presume there's a weird race condition that was introduced with #38?

@james-ward could you look at this maybe? I won't be able to do any robot stuff until Sunday/Monday.

Add simple test type that allows you to specify when buttons are pressed

This is the most common type of simplistic test one might want, I imagine. The primary usefulness I think would be exercising all your stuff, so you can be sure that they don't have syntax errors. Adding an additional function that gets called to check it is nice, but should be optional. Something like.. hm. I don't really know what this looks like. Maybe:

# port, button number?
release = (1, 1)
fire = (1,2)

# time, button to press (defaults to pressing for 0.2s)
tests = [
  (1.0, release),
  (2.0, fire),
  .. 
]

run_button_test(tests)

@sarosenb you should do this.

known hosts SSH problem

If you have multiple roborios and they have the same mDNS hostname, SSH will complain and won't allow the connection to succeed. The typical way one fixes this is sending the known hosts file to /dev/null.

Given we're using a default password, I don't think we care about MITM attacks.

Deploy issue when network uses IPv6

File: pyfrc/lib/pyfrc/robotpy/installer.py

Code (line 366 through 379):

if not no_resolve:
    try:
        print("Looking up hostname", hostname, '...')
        addrs = socket.getaddrinfo(hostname, None)
    except socket.gaierror as e:
        raise Error("Could not find robot at %s" % hostname) from e

    # pick the first address that is sock_stream
    for _, t, _, _, (ip, _) in addrs: # <- Error on this line due to (ip, _) not working for IPv6
        if t == socket.SOCK_STREAM:
            print("-> Found %s at %s" % (hostname, ip))
            print()
            hostname = ip
            break 

The returned tuple from socket.getaddrinfo() is different depending on if it is IPv4 or IPv6 addresses.

socket.getaddrinfo() will return two differently formatted tuples, depending on if the address is IPv4 or IPv6:

IPv4: [(<AddressFamily.AF_INET: 2>, 0, 0, '', ('8.8.8.8', 0))]
IPv6: [(<AddressFamily.AF_INET6: 23>, 0, 0, '', ('2001:4860:4860::8888', 0, 0, 0))]

I do not currently have a system to test with, so this might not be the best way. I believe everything in the control system supports IPv6 since our RoboRIO was resolving with a IPv6 address. I'm not sure if the ssh supports IPv6 or what other implications there are, but the RoboRIO still had an IPv4 address associated with it:

socket.getaddrinfo('roborio-4901-frc.local', None) returns
[ (<AddressFamily.AF_INET6: 23>, 0, 0, '', ('fe80::280:2fff:fe17:3af1%8', 0, 0, 8)), (<AddressFamily.AF_INET: 2> 0, 0, '', ('129.252.23.54', 0)) ]

Per the Python socket.getaddrinfo() documentation:

The function returns a list of 5-tuples with the following structure:
(family, socktype, proto, canonname, sockaddr)

How about, instead of unpacking it like this:

for _, t, _, _, (ip, _) in addrs:
    if t == socket.SOCK_STREAM:
        print("-> Found %s at %s" % (hostname, ip))
        print()
        hostname = ip
        break 

You unpack it like this:

for _, t, _, _, sockaddr in addrs:
    if t == socket.SOCK_STREAM:
        print("-> Found %s at %s" % (hostname, sockaddr[0]))
        print()
        hostname = sockaddr[0]
        break 

If IPv4 doesn't work, you can check the first tuple element to see if it is an AF_INET or AF_INET6:

for family, t, _, _, sockaddr in addrs:
    if family == socket.AddressFamily.AF_INET and t == socket.SOCK_STREAM:
        print("-> Found %s at %s" % (hostname, sockaddr[0]))
        print()
        hostname = sockaddr[0]
        break 

Limit on axis's in sim

Currently, the sim won't go above 4 axis. This makes it difficult to sim things like a tank drive using an Xbox controller, as these axis's map to 5 and up.

Timer breaks when using PIDController

The PIDController uses a TimerTask object which also calls Timer.delay which increments our fake_time timer while running. Since it is running on its own thread, how many calls it makes is indeterminate and if what you wanted to get done in that time is also indeterminate. I think this means that we shouldn't be doing tests on actual time or do something different if the object type is a timertask. I am not sure which action to do so wanted to have a short discussion.

Create cross-language low fidelity simulator via web interface

The easiest cross-platform + cross-language interface is a web browser, so what we do is build a web server into a special version of WPILib (or perhaps in a secondary executable that pretends to be a gazebo server, depending on how it works out), and that web server updates its webpage dynamically depending on the state of the robot.

The UI would be written mostly using HTML/JS, so that the same functionality would be identical to use in Python, Java, and C++ robots.

Users could click on the web interface to activate various sensors, and things like motor output would be shown in the interface as well. Additionally, a field would be shown, and the robot could move around in 2d space based on the motor output (I already have the motion equations working for pyfrc).

I theorize that the primary usefulness that programmers will get from a simplistic simulator is "whether or not the thing moved when I told it to move". To enable this, the simulator has a library of simple animations that you can enable, and 'attach motors or sensors' to it, and the animation will move when your robot code makes it move. All of the animations would be written using HTML/javascript, and it would be trivial for users to add their own animations for more complex simulation. The types of motion that would be originally supported would be:

  • Circular motion about an axis using a motor
  • Solenoid piston action
  • Linear motion using a motor

There are other types of motion that should be trivial to animate, but I still need more thought on this.

The primary advantage to this type of simulator is that it wouldn't require creating a precise CAD model of the robot to get started, and if the library of available animations is general enough, would take a user maybe a half hour to get setup and ready to test things.

The first implementation of the simulator would be in pyfrc, which is why that issue is here.

Cannot initialize NetworkTables in physics without an error

Some reordering happened because of changes since last year, you end up with an error like this:

23:46:18:645 ERROR   : robotpy             : Could not instantiate robot MyRobot!
Traceback (most recent call last):
  File "robotpy-wpilib/wpilib/wpilib/robotbase.py", line 159, in main
    robot = robot_cls()
  File "robotpy-wpilib/wpilib/wpilib/robotbase.py", line 44, in __init__
    NetworkTables.setNetworkIdentity("Robot")
  File "pynetworktables/networktables/networktables.py", line 304, in setNetworkIdentity
    cls._checkInit()
  File "pynetworktables/networktables/networktables.py", line 129, in _checkInit
    raise RuntimeError("Network tables has already been initialized")
RuntimeError: Network tables has already been initialized

Should look at fixing it for 2018, as it's a bit annoying. Here's a workaround for anyone who has a physics module and needs to use NetworkTables:

    @property    
    def nt(self):
        try:
            return self._nt
        except AttributeError:
            self._nt = NetworkTable.getTable('/')
            return self._nt

Add 'deadzone' to drivetrain simulation

I've observed that many robots will not turn until given a certain amount of power, due to friction related to the drivetrain. This also happens with forward/backwards motion as well. It would be useful for the simulation to be able to model this easily.

Uploader problems

Not sure what's going on yet, but deploy is failing on one of our RoboRIOs.

SFTP hangs when attempting to deploy on OSX 10.11

Hi, I'm on Team 5045 and we used (and really enjoyed!) RobotPy last year. I upgraded my Mac to 10.11 (possibly related?) a week or so ago, and suddenly I have started running into an error when attempting to deploy code to the robot.

$ python3 robot.py deploy --skip-tests
15:30:26:383 INFO    : wpilib              : WPILib version 2015.0.15
15:30:26:384 INFO    : wpilib              : HAL base version 2015.0.15; sim platform version 2015.0.15
Deploying to robot at 10.50.45.2
NI Linux Real-Time (run mode)

Log in with your NI-Auth credentials.

WPILib version on robot is 2015.0.15
NI Linux Real-Time (run mode)

Log in with your NI-Auth credentials.

sftp> mkdir "/home/lvuser/py"
sftp> put -r "/var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpc6w1yugj/py" "/home/lvuser"
Entering /var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpc6w1yugj/py/
hm 1
ERROR: Command ['/usr/bin/sftp', '-oBatchMode=no', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-b', '/var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpw6kumwwm', '[email protected]'] returned non-zero error status 1

I tried to figure out what was going on but really couldn't seem to find anything. I can ssh into to the robot just fine. I added something logging to the ssh_exec_pass method (printing after each data = _read(pty_fd)):

$ python3 robot.py deploy --skip-tests
15:39:52:883 INFO    : wpilib              : WPILib version 2015.0.15
15:39:52:883 INFO    : wpilib              : HAL base version 2015.0.15; sim platform version 2015.0.15
Deploying to robot at 10.50.45.2
1 None
2 None
3 b"Warning: Permanently added '10.50.45.2' (ECDSA) to the list of known hosts.\r\n"
1 None
2 None
3 b'NI Linux Real-Time (run mode)\n\nLog in with your NI-Auth credentials.\n\n'
NI Linux Real-Time (run mode)

Log in with your NI-Auth credentials.

1 None
2 b'WPILib version on robot is 2015.0.15\n'
WPILib version on robot is 2015.0.15
3 None
1 b''
2 b''
3 b''
1 None
2 None
3 b"Warning: Permanently added '10.50.45.2' (ECDSA) to the list of known hosts.\r\n"
1 None
2 None
3 b'NI Linux Real-Time (run mode)\n\nLog in with your NI-Auth credentials.\n\n'
NI Linux Real-Time (run mode)

Log in with your NI-Auth credentials.

1 None
2 b'sftp> mkdir "/home/lvuser/py"\n'
sftp> mkdir "/home/lvuser/py"
3 None
1 None
2 b'sftp> put -r "/var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpdquo6x2f/py" "/home/lvuser"\n'
sftp> put -r "/var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpdquo6x2f/py" "/home/lvuser"
3 None
1 None
2 b'Entering /var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpdquo6x2f/py/\n'
Entering /var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpdquo6x2f/py/
3 None
1 None
2 b''
3 b''
1 b''
2 None
3 None
sftp 1 bytearray(b'')
hm 1
ERROR: Command ['/usr/bin/sftp', '-oBatchMode=no', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-b', '/var/folders/02/b5qrvn193_33457rk8dh0b9r0000gn/T/tmpdgwnjzio', '[email protected]'] returned non-zero error status 1

It looks like somehow the sftp operation is hanging after entering the directory on the local machine? I don't know how to resolve this, but wondering if someone else on OSX 10.11 may able to replicate? Maybe a protocol mismatch or something between what's installed on the RoboRIO vs my machine?

Any ideas? We're in a tough spot as we're scheduled for a demo on Friday and right now the robot isn't operational. Any help would be much appreciated.

Cheers,
Theo & Team 5045

Test harness breaks when freeing CANTalon

If a CANTalon is a static member of a robot class (ie like the way subsystems are declared in command based robots), tests will fail in the teardown due to an index error.
For example:

import wpilib

class TrivialRobot(wpilib.IterativeRobot):
    motor = wpilib.CANTalon(1)

if __name__ == "__main__":
    wpilib.run(TrivialRobot)

Running python3 robot.py test --builtin results in:

handle = <hal_impl.types.TalonSRX object at 0x7fe70d533240>

    def c_TalonSRX_Destroy(handle):
>       del hal_data['CAN'][handle.id]
E       KeyError: 1

process-intensive physics.py causes timing problems

To test this, all you need to do is add a time.sleep(0.01) to the end of update_sim in one of the physics.py examples. The result is a flickering pyfrc ui and lots of "Robot Drive... output not updated often enough"

Inconsistent 15second hang when initializing ssh

In my tests with a roboRIO, there are usually two scenarios for deploy-

  1. The robot code deploys pretty much fluidly, takes about 2seconds
  2. The robot code will hang for about 15seconds between
Deploying to robot at: [hostname]

and

WPILib version on the robot is 2016.0.0

I've narrowed it down to the line (in cli_deploy.py)

controller.ssh(sshcmd)

Looking at that code, for Windows all it does is call plink.exe with the desired args (lest I am to be mistaken)

Firstly, is there any degree of reproducability to this issue? It may very well be a Windows-specific issue. I do not believe it to be a computer-specific issue because both my personal Windows 10 laptop and the team's Windows 7 laptops share the same issue.

Secondly, there is this comment before the ssh function

    # This sucks. We should be using paramiko here... 

I'm not well versed in ssh communcations... Is this something that can be changed quickly by another developer or should I find the time in changing it over? (tests are going quite well, I have a decent bit of down time)

The default tests do not call many methods that they should

Running python robot.py coverage test does not cover many important methods, such as robot.AutonomousInit(), robot.TeleopInit(), and the execute() method of commands that are the defaults of subsystems, although their __init__() methods are called.

fake_time thread dictionary size changes (py 3.6)

../../../../lib/pyfrc/tests/basic.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../lib/pyfrc/test_support/controller.py:148: in run_test
    self._robot.startCompetition()
/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/wpilib/samplerobot.py:142: in startCompetition
    self.disabled()
robot.py:48: in disabled
    wpilib.Timer.delay(0.010)
/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/wpilib/timer.py:74: in delay
    hal.sleep(seconds)
/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/hal_impl/functions.py:98: in sleep
    hooks.delaySeconds(s)
../../../../lib/pyfrc/test_support/pyfrc_fake_hooks.py:24: in delaySeconds
    self.fake_time.increment_time_by(s)
../../../../lib/pyfrc/test_support/fake_time.py:207: in increment_time_by
    self._wake_children(time)
../../../../lib/pyfrc/test_support/fake_time.py:89: in _wake_children
    for thread, thread_info in self._child_threads.items():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <WeakKeyDictionary at 0x7fbf1e337f28>
    def items(self):
        with _IterationGuard(self):
>           for wr, value in self.data.items():
E           RuntimeError: dictionary changed size during iteration

Observed in https://travis-ci.org/robotpy/pyfrc/jobs/189867877

Robot tests fail with NetworkTables errors

With the latest version on pip robot tests are failing with 9 errors for me, all related to NetworkTables. This commit should fix it, but the pip version hasn't been updated.

Mostly the errors are are:
AttributeError: type object 'NetworkTable' has no attribute '_staticProvider'

RuntimeError: Network tables has already been initialized

Refactor physics component into robotpy-wpilib-utilities?

The physics subsystem here could be improved, and I think it would be beneficial to allow access to physics.py from within user robot code. However, physics.py relies upon the physics functions bundled with pyfrc, and won't run on a robot. I would like to split those methods out of pyfrc and build an improved physics engine in robotpy-wpilib-utilities.

Thoughts?

UI flicker on OSX

It appears to be related to resizing of the simulation screen when CAN encoder values fluctuate.

Simulator issue when joystick axis is 1.0

Under hal_impl\function.py, line 237:
axes.axes = [_axes_list[int(a_128)+128] for a in hal_data['joysticks'][joystickNum]['axes']]
If a is equal to 1.0, _axes_list index will go out of range (int(1.0_128)+128) equals 256, but range of _axes_list only goes up to 255.

To fix, change both 128 scalar and offset to 127.5.
axes.axes = [_axes_list[int(a*127.5+127.5)] for a in hal_data['joysticks'][joystickNum]['axes']]

Add graph output support to simulator

My thought is that it would be nice to graph the various outputs/inputs of the simulator in a real time fashion.

Originally I was thinking matplotlib -- but now because of #6, it might be different. It still could be matplotlib, as the output could be streamed to a web interface.

Tests take longer during deploy than test

In my experience, running python3 robot.py test had the tests run in about 1-3 seconds, yet when running python3 robot.py deploy the tests took >10 seconds reliably

Add sync call after deploy is finished

This will ensure (according to man page: Persistence guarantees vary per system) that the deployed files get written to disk before a poweroff event.

physics.py position is totally messed up

The PhysicsInterface.get_position function does not actually return position, because the values passed to _move are relative to the robot, and not relative to the field. Need to do some transform (but I'm tired and the math is escaping me at the moment) to the values so it'll be correct.

Of course, once those values are correct, then will need to adjust the simulation elements and such...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.