Throbol — The Robot Oriented Language
Throbol is a programming language and visual environment for programming robots. The language is purely functional, so actions and states at each tick are expressed as a function of previous states and sensor inputs. You can iterate inside a graphical environment seeing graphs of every value in the system. It can control both real robots and simulations.
The language has a familiar infix syntax. Features:
-
Cells contain a time series of values. Just as a cell can refer to the current value of another cell, it can also refer to a past value, like
bar[-dt]
, orbar[-0.5]
-
Every tick, robot sensor values are streamed into specially named cells, the sheet is recalculated, and actuator cells are streamed to the hardware. It can run fairly large spreadsheets in real time -- say 10000 cells at 100 Hz.
-
When controlling simulated harware, it can run hundreds of simulations in parallel to explore variations in parameters or different random events.
-
It has built-in types and functions for robotics, including matrix arithmetic, control theory blocks like low-pass filters, and 3D graphics functions for visualizing robot movement.
The video below is a quick demo of controlling 4-legged robot hardware. You can see a real-time replay of the code executing here.
Getting started
To get started with Throbol, try a simple example in your browser: the classic Lorenz system of chaotic differential equations. Try tweaking the parameters (shift-2-finger-drag over the blue parameter knobs) to see the solutions change.
Then, try a bigger example. A simulated Pong game has two automated players. To see a game in real time, press Shift-left arrow to go to time 0, then hold down the right arrow key to advance time. Then check out the policyTerrain cell in the bottom left. The false-color topographic map shows score vs. movement speed for the two players. You might grok the shape of the surface more easily by using Command-2-finger-drag to rotate the sheet around.
Then, try controlling a simulated humanoid robot (from Mujoco):
There are also more examples
If you log in, you'll be able to save any changes to the sheets and share them around by sending URLs.
The desktop version (for Mac and Linux) is higher-performance and can control real robots. Clone the repo and follow the instructions in the INSTALL.md file.
from Hacker News https://throbol.com/
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.