v0.4.0 - Become Multifarious #118
sneakers-the-rat
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
See the changelog! https://docs.auto-pi-lot.com/en/latest/changelog/v0.4.0.html
v0.4.0 - Become Multifarious (August 3rd, 2021)
This release is primarily to introduce the new plugin system, the autopilot wiki, and their integration as a way of
starting the transformation of Autopilot into a tool with decentralized development and governance (as well as
make using the tool a whole lot easier and more powerful).
With humble thanks to Lucas Ott, Tillie Morris,
Chris Rodgers <https://github.com/cxrodgers/>,Arne Meyer <https://github.com/arnefmeyer>,Mikkel Roald-Arbøl <https://github.com/roaldarbol>_ ,David Robbe <https://github.com/neurodavidus>_ ,and an anonymous discussion board poster for being part of this release.
New Features
Registries & Plugins <https://github.com/wehr-lab/autopilot/pull/109>_ - Autopilot now supports users writing their codeoutside of the library as plugins! To support this, a registry system was implemented throughout the program. Plugin objects
can be developed as objects that inherit from the Autopilot object tree -- eg. implementing a GPIO object by subclassing
:class:
.hardware.gpio.GPIO, or a new task by subclassing :class:~.tasks.task.Task. This system is flexible enoughto allow any lineage of objects to be included as a plugin -- stimuli, tasks, and so on -- and we will be working to
expand registries to every object in Autopilot, including the ability for plugins to replace core modules to make
Autopilot's flexibility verge on ludicrous. The basic syntax of the registry system is simple and doesn't require any
additional logic beyond inheritance to be implemented on plugin objects --
autopilot.get('object_type', 'object_name')is the basic method, with a few aliases for specific object types like
autopilot.get_hardware(). Also thanks toArne Meyer <https://github.com/arnefmeyer>_ for submitting an early draft of the registry system andMikkel Roald-Arbøl <https://github.com/roaldarbol>_ for raising the issue.preservation of technical knowledge about using Autopilot, like hardware designs, build guides, parameter sets,
and beyond! This isn't any ordinary wiki, though, we got ourselves a semantic wiki which augments traditional wikis
with a rich system of human and computer-readable linked attributes: a particular type of page will have some set of attributes,
like a page about a 3D printed part will have an associated .stl file, but rather than having these be in plaintext
they are specified in a format that is queryable, extensible, and infinitely mutable. The vision for the wiki is much
grander (but not speculative! very concrete!) than just a place to take notes, but is intended to blend the use of
Autopilot as an experimental tool with body of knowledge that supports it. Autopilot can query the wiki with the
wikimodulelike
wiki.ask('[[Category:3D_CAD]]', 'Has STL')to get links to all .stl files for all 3D parts on the wiki. The integrationbetween the two makes using and submitting information trivial, but also makes designing whole new types of community interfaces
completely trivial. As a first pass, the Wiki will be the place to index plugins, the system for submitting them, querying them,
and downloading them only took a few hours and few dozen lines of code to implement. The wiki is infinitely malleable -- that's the point --
and I am very excited to see how people use it.
and the coveralls page is here: https://coveralls.io/github/wehr-lab/autopilot . At the moment we have a whopping 27% coverage,
but as we build out our testing suite we hope that it will become much easier for people to contribute to Autopilot and be
confident that it works!
.cameras.PiCamera- A fast interface to the PiCamera, wrapping the picamera library, and using tips from its developer to juice every bit of speed i could!.timeseries.Kalman- adapted a Kalman filter from the wonderful filterpy package! it's in the new timeseries transform module.geometry.IMU_Orientation- IMU_Orientation performs a sensor fusion algorithm with the Kalman Filter class to combine gyroscope and accelerometer measurements into a better estimate of earth-centric roll and pitch.This is used by the IMU class, but is made independent so it can be used without an Autopilot hardware object/post-facto/etc.
.timeseries.Filter_IIR- Filter_IIR implements scipy's IIR filter as a transform object..timeseries.Integrate- Integrate adds successive numbers together (scaled by dt if requested). not much by itself, but when used with a kalman filter very useful :).geometry.Rotate- use scipy to rotate a vector by some angle in x, y, and/or z.geometry.Spheroid- fit and transform 3d coordinates according to some spheroid - used in the IMU's accelerometer calibration method: given some target spheroid, and some deformed spheroid (eg. a miscalibrated accelerometer might have the x, y, or z axis scaled or offset) either explicitly set or estimated from a series of point measurements, transform future input given that transformation to correct for the deformed source spheroid.'AUTOPLUGIN'- Attempt to import the contents of the plugin directory,'PLUGIN_DB'- filename to use for the .json plugin_db that keeps track of installed plugins','PING_INTERVAL'- How many seconds should pilots wait in between pinging the Terminal?','TERMINAL_SETTINGS_FN'- filename to store QSettings file for Terminal','TERMINAL_WINSIZE_BEHAVIOR'- Strategy for resizing terminal window on opening','TERMINAL_CUSTOM_SIZE'- Custom size for window, specified as [px from left, px from top, width, height]',Major Improvements
Chris Rodgers! <https://github.com/cxrodgers/>_) - Stereo sound #102send multihop messages through multiple Station objects, as well as easier to send messages directly
between net nodes. See the examples in the network tests section of the docs.
Chris Rodgers! <https://github.com/cxrodgers/>_) - Connect to multiple CHILDID #103 -the
CHILDIDfield now accepts a list, allowing a Pilot to initialize child tasks on multiple children. (this syntax andthe hierarchical nature of pilots and children will be deprecated as we refactor the networking modules into a general mesh system,
but this is lovely to have for now :)
scripts by using
autopilot.setup -f prefs.json -p PREFNAME=VALUE -s scriptname1 -s scriptname2was only available for 3.7)
Minor Improvements
Chris Rodgers! <https://github.com/cxrodgers/>_) - Cxrodgers dev terminal winsize #70I2C_9DOFclas uses memoryviews rather than buffers for a small performance boost - 890f2c5Queues in favor ofcollections.dequefor applications that only need thread and not process safety because theyare way faster and what we wanted in the first place anyway.
i2c,picamera,env_terminalprefs-- thoughsome zombie code still remains there.
performancescript now setsswappiness = 10to discourage the use of swapfiles - see https://www.raspberrypi.org/forums/viewtopic.php?t=198765deprecationfield of a pref in_DEFAULTSprints it as a warning to start actually deprecating responsibly.Bugfixes
Chris Rodgers! <https://github.com/cxrodgers/>_) - fix: set_duration and Solenoid.duration are both in ms, no conversion… #63Terminal.reset_uimethod and made control panel better at adding/removing pilots - Hotfix - Continuous sounds, pinging pilots, graduation #91an absolute travesty that needs to be refactored badly.
Made more robust by having jackclient store samples locally int he sound server rather than being continuously streamed from the queue.
QtGuirather thanQtWidgets.gpio.clear_scriptsfunction now handles that.xcbwas removed fromPySide2distributions, so it's now listed in the requirements for the Terminal and made available in theenv_terminalscript.LED_RGBdidn't appropriately raise aValueErrorwhen called with a singlepin- LEDS RGB can't be set or pull #117Code Structure
autopilot.core- networking this timesetup_autopilotwere moved to a separate modulesetup_autopilotwas broken into functions instead of a very long and impenetrable script. still a bit of cleaning to do there.autopilot.setup.setup_autopilotwas always extremely awkward, so it's now been aliased asautopilot.setuprather than /dev/hardware.cameras.html . this should break some links when switching between versions on readthedocs
but other than that be nondestructive.
Docs
quickstartdocumentation with lots of quick examples!Regressions
check_compatiblemethod in the Transforms class. We will want to make a call at some point if we want to implement a full realtime pipelining framework or if we want to use something like luigi or joblib or etc.for now this is an admission that type and shape checking was never really implemented but it does raise some exceptions sometimes.
This discussion was created from the release v0.4.0 - Become Multifarious.
Beta Was this translation helpful? Give feedback.
All reactions