The Tinymovr CAN bus interface that we released a few years back (and which is still being used in almost all devices out there) has been reaching its limitations as the functionality of the controller expanded, and the number of state variables increased. In addition, the flat structure of the device description provided a limited, flat view of the device internals.
Recognizing these shortcomings, we developed our next-gen firmware and Studio software with the aim of making configuration and operation of a Tinymovr system as simple as possible while allowing full access to its internals, and ensuring expandability for the future.
Avlos RPC
To support this effort, we designed a lightweight Remote Procedure Call templating system and library, Avlos. Avlos uses a YAML file to define the embedded device as a tree structure. An example YAML describing a simplified device (a toaster!) is shown below:
name: toaster version: "1.0" remote_attributes: - name: sn dtype: uint32 getter_name: toaster_get_sn summary: The unique device serial number. - name: heater remote_attributes: - name: temperature dtype: float unit: celsius getter_name: toaster_get_heater_temp summary: The toaster heater temperature. - name: relay remote_attributes: - name: relay_state dtype: bool getter_name: toaster_get_relay_state setter_name: toaster_set_relay_state summary: The toaster heating relay element state.
With the above device specification, Avlos can automatically generate code implementing a communication protocol, for the embedded device (in C) and a Python library for use by the client. In addition, Avlos generates RestructuredText documentation, C++ client code (e.g. for use with Arduino) and CAN DBC files. We plan to add more generators in the near future such as e.g. for Rust and Markdown docs.
Cross-platform Studio GUI
We developed a cross-platform GUI based on Qt, to make introduction to brushless motor control more approachable for new users. The Studio GUI provides a comprehensive overview of the controller's state and configuration, allowing you to effortlessly inspect and modify any attribute, plot multiple values simultaneously, work with multiple Tinymovr nodes, store and export plots, and import or export your configurations.
CLI Studio App
The CLI app is still in place and is not going anywhere! In fact, the CLI received some improvements, so now it more clearly presents the internal state of nodes and their nested attributes, and enables automatic discovery of nodes on the bus.
Python Library
The Python library is a flexible gateway to control your fleet of Tinymovr nodes! The library offers facilities for discovering and initializing Tinymovr nodes on the CAN bus, in a layered architecture that enables using only what is needed. For instance, you can let the Discovery module monitor the bus and initialize nodes as they appear, or you can initialize the nodes yourself if you already know which ones are present. We are still documenting the library functionality, and improving and extending its API to provide better developer experience.
Arduino and ROS Libraries
We're in the process of upgrading our Arduino library to reflect the 1.x firmware, at the same time expanding functionality to enable full controller configuration and operation from an embedded Arduino system. We are adding more examples in the process, for Arduino UNO, MKR1000 and ESP32.
Finally, our Tinymovr ROS hardware interface is in an advanced state of development, and will be released very soon. We'll cover its structure and functionality in a separate blog post.
We've also prepared a short introduction video, check it out below!
We're excited about this major update, and would really value your feedback, so head over to the Github repo to get started!
Good luck and have fun!