opensource.google.com

Menu
Showing posts with label library. Show all posts
Showing posts with label library. Show all posts

Introducing the Pigweed SDK: A modern embedded development suite

Thursday, August 8, 2024

Back in 2020, Google announced Pigweed, an open-source collection of embedded libraries to enable a faster and more reliable development experience for 32-bit microcontrollers. Since then, Pigweed’s extensive collection of middleware libraries has continuously evolved and now includes RTOS abstractions and a powerful RPC interface. These components have shipped in millions of devices, including Google’s own Pixel suite of devices, Nest thermostats, DeepMind robots, as well as satellites and autonomous aerial drones.

Today, we introduce the first developer preview of the Pigweed SDK, making it even easier to leverage Pigweed’s libraries to develop, debug, test, and deploy embedded C++ applications. Using the included sample applications and comprehensive tutorial, you can easily get started prototyping simple programs and build up to more complex applications that leverage advanced Pigweed functionalities. Pigweed’s modern and modular approach makes it easy to design applications with significantly reduced debugging and maintenance overhead, thus making it a perfect choice for medium to large product teams.

We are also thrilled to contribute to the Raspberry Pi Pico 2 and RP2350 launch, providing official support in Pigweed for RP2350 and its predecessor, the RP2040. Building on the success of the Pico 1 and RP2040, the Pico 2 introduces the RP2350 microcontroller, bringing more performance and an exciting set of new capabilities in a much lower power profile. We’ve worked closely with the Raspberry Pi team to not only provide a great experience on Pigweed, but also upstreamed a new Bazel-based build system for Raspberry Pi’s own Pico SDK.

Raspberry Pi Pico 2 (RP2350) with Enviro+ pack hat.
Raspberry Pi Pico 2 (RP2350) with Enviro+ pack hat.

What's in the SDK

The Pigweed SDK aims to be the best way to develop for the Pico family of devices. The SDK includes the Sense showcase project, which demonstrates a lot of our vision for the future of sustainable, robust, and rapid embedded system development, such as:

  • Hermetic building, flashing, testing, and cross-platform toolchain integration through Bazel.
  • Fully open-source Clang/LLVM toolchain for embedded that includes a compiler, linker, and C/C++ libraries with modern performance, features, and standards compliance
  • Efficient and robust device communication over RPC
  • An interactive REPL for viewing device logs and sending commands via command-line and web interfaces
  • Visual Studio Code integration with full C++ code intelligence
  • GitHub Actions support for continuous building and testing
  • Access to pico-sdk APIs when you need to drop down to hardware-specific functionality
Moving image of the Pigweed CLI console engaging with the device through interactive Remote Procedure Calls (RPCs).
Utilize the Pigweed CLI console to communicate with your device through interactive Remote Procedure Calls (RPCs).

By building your project with the Pigweed SDK (using the Sense showcase as your guide), you can start on readily available hardware like the Pico 1 or 2 today. Then when you’re ready to start prototyping your own custom hardware, you can target your Pigweed SDK project to your custom hardware without the need for a major rewrite.

Try Sense now

Bazel for embedded

Pigweed is all-in on Bazel for embedded development. We believe Bazel has great potential to improve the productivity (and mental wellbeing) of embedded development teams. We made the "all-in" decision last September and the Raspberry Pi collaboration was a great motivator to really flesh out our Bazel strategy:

  • We contributed to an entirely new Bazel-based build for the Pico SDK to make it easy for the RP2 ecosystem to use Bazel and demonstrate how Bazel takes care of complex toolchains and dependencies for you.
  • The new Sense showcase demonstrates Bazel-based building, testing, and flashing.
  • Our GitHub Actions guide shows you how to build and test your Bazel-based repo when pull requests are opened, updated, or merged.

    Head over to Bazel's launch blog post to learn more about the benefits of Bazel for embedded.


    Clang/LLVM for embedded

    Pigweed SDK fully leverages the modern Clang/LLVM toolchain. We are especially excited to include LLVM libc, a fully compliant libc implementation that can easily be decomposed and scaled down for smaller systems. The team spent many months developing and contributing patches to the upstream project. Their collaboration with teams across Google and the upstream LLVM team was instrumental in making this new version of libc available for embedded use cases.

    The sample applications, Pigweed modules, host-side unit tests, and showcase examples already use Clang, LLD, LLVM libc and libc++. Thus, developers can take advantage of Clang’s diagnostics and large tooling ecosystem, LLD’s fast linking times, and modern C and C++ standard library implementations which support features such as Thread Safety Analysis and Hardening.


    IDE integration

    With full Visual Studio Code support through pw_ide, you can build and test the Sense showcase from the comfort of a modern IDE and extend the IDE integration to meet your needs. Full target-aware code intelligence makes the experience smooth even for complicated embedded products. Automatic linting, formatting, and code quality analysis integrations are coming soon.


    Parallel on-device testing with PicoPico

    As you would expect from a team with the mission to make embedded development more sustainable, robust, and rapid for large teams, we are of course obsessed with testing. We have hundreds of on-device unit tests running all the time on Picos. The existing options were a bit slow so we whipped up PicoPico in a week (literally) to make it easier to run all these tests in parallel.

    A “PicoPico” node
    One “PicoPico” node for running parallel on-device tests

    RP2 support

    The goal behind our extensive catalog of modules is to make it easy to fully leverage C++ in your embedded system codebases. We aim to provide sensible, reusable, hardware-agnostic abstractions that you can build entire systems on top of. Most of our modules work with any hardware, and we have RP2 drivers for I2C, SPI, GPIO, exception handling, and chrono. When Pigweed's modules don't meet your needs, you can still fallback to using pico-sdk APIs directly.


    Get started

    Clone our Sense showcase repo and follow along with our tutorial. The showcase is a suitable starting point for learning what a fully featured embedded system built on top of the Pigweed SDK looks like.


    What’s next

    The Pigweed team will continue to have regular and on-going preview releases, with new features, bug fixes, and improvements based on your feedback. The team is working on a comms stack for all your end-to-end networking needs, factory-at-your-desk scripting, and much, much more. Stay tuned on the Pigweed blog for updates!


    Learn more

    Questions? Feedback? Talk to us on Discord or email us at pigweed-team@googlegroups.com.

    We have a Pigweed Live session scheduled on August 26th, 13:00 PST where the Pigweed team will talk more about the Pigweed SDK and answer any questions you have. Join pigweed@googlegroups.com to get an invite to the meetings.


    Acknowledgements

    We are profoundly grateful for our passionate community of customers, partners, and contributors. We honor all the time and energy you've given us over the years. Thank you!

    By Amit Uttamchandani – Product Manager, Keir Mierle – Software Engineer, and the Pigweed team.

    Cloud Spanner Emulator Reaches 1.0 Milestone!

    Wednesday, August 19, 2020

    The Cloud Spanner emulator provides application developers with the full set of APIs, including the full breadth of SQL and DDL features that can be run locally for prototyping, development and testing. This offline emulator is free and improves developer productivity for customers. Today, we are happy to announce that Cloud Spanner emulator is generally available (GA) with support for Partitioned APIs, Cloud Spanner client libraries, and SQL features.

    Since Cloud Spanner emulator’s beta launch in April, 2020, we have seen strong adoption of the local emulator from customers of Cloud Spanner. Several new and existing customers adopted the emulator in their development & continuous test pipelines. They noticed significant improvements in developer productivity, speed of test execution, and error-free applications deployed to production. We also added several features in this release based on the valuable feedback we received from beta users. The full list of features is documented in the GitHub readme.

    Partition APIs

    When reading or querying large amounts of data from Cloud Spanner, it can be useful to divide the query into smaller pieces, or partitions, and use multiple machines to fetch the partitions in parallel. The emulator now supports Partition Read, Partition Query, and Partition DML APIs.

    Cloud Spanner client libraries

    With the GA launch, the latest versions of all the Cloud Spanner client libraries support the emulator. We have added support for C#, Node.js, PHP, Python, Ruby client libraries and the Cloud Spanner JDBC driver. This is in addition to C++, Go and Java client libraries that were already supported with the beta launch. Be sure to check out the minimum version for each of the client libraries that support the emulator.

    Use the Getting Started guides to try the emulator with the client library of your choice.

    SQL features

    Emulator now supports the full set of SQL features provided by Cloud Spanner. Some of the notable additions being support for SQL functions JSON_VALUE, JSON_QUERY, CEILING, POWER, CHARACTER_LENGTH, and FORMAT. We now also support untyped parameter bindings in SQL statements which are used by our client libraries written in languages with dynamic typing e.g., Python, PHP, Node.js and Ruby.

    Using Emulator in CI/CD pipelines

    You may now point the majority of your existing CI/CD to the Cloud Spanner emulator instead of a real Cloud Spanner instance brought up on GCP. This will save you both cost and time, since an emulator instance comes up instantly and is free to use!

    What’s even better is that you can bring up multiple instances in a single execution of the emulator, and of course multiple databases. Thus, tests that interact with a Cloud Spanner database can now run in parallel since each of them can have their own database, making tests hermetic. This can reduce flakiness in unit tests and reduce the number of bugs that can make their way to continuous integration tests or to production.

    In case your existing CI/CD architecture assumes the existence of a Cloud Spanner test instance and/or test database against which the tests run, you can achieve similar functionality with the emulator as well. Note that the emulator doesn’t come up with a default instance or a default database as we expect users to create instances and databases as required in their tests for hermeticity as explained above. Below are two examples of how you can bring up an emulator with a default instance or database: 1) By using a docker image or 2) Programmatically.

    Starting Emulator from Docker

    The emulator can be started using Docker on Linux, MacOS, and Windows. As a prerequisite, you would need to install Docker on your system. To bring up an emulator with a default database/instance, you can execute a shell script in your docker file to do so. Such a script would make RPC calls to CreateInstance and CreateDatabase after bringing up the emulator server. You can also look at this example on how to put this together when using docker.

    Run Emulator Programmatically

    You can bring up the emulator binary in the same process as your test program. Then you can then create a default instance/database in your ‘Setup’ and clean up the same when the tests are over. Note that the exact procedure for bringing up an ‘in-process’ service may vary with the client library language and platform of your choice.

    Other alternatives to start the emulator, including pre-built linux binaries, are listed here.
    Try it now

    Learn more about Google Cloud Spanner emulator and try it out now.

    By Asheesh Agrawal, Google Open Source

    Expanding our Differential Privacy Library

    Wednesday, June 24, 2020

    All developers have a responsibility to treat data with care and respect. Differential privacy helps organizations derive insights from data while simultaneously ensuring that those results do not allow any individual's data to be distinguished or re-identified. This principled approach supports data computation and analysis across many of Google’s core products and features.

    Last summer, Google open sourced our foundational differential privacy library so developers and organizations around the world can benefit from this technology. Today, we’re announcing the addition of Go and Java to our library, an end-to-end solution for differential privacy: Privacy on Beam, and new tools to help developers implement this technology effectively.

    We’ve listened to feedback from our developer community and, as of today, developers can now perform differentially private analysis in Java and Go. We’re working to bring these two libraries to full feature parity with C++.

    We want all developers to have access to differential privacy, regardless of their level of expertise. Our new Privacy on Beam framework captures years of Googler developer experience and efficiency improvements in a comprehensive and easy-to-use solution that handles computation end-to-end. Built on Apache Beam, Privacy on Beam can reduce implementation mistakes, and take care of all the steps that are essential to differential privacy, including noise addition, partition selection, and contribution bounding. If you’re new to Apache Beam or differential privacy, our codelab can get you started.

    Tracking privacy budgets is another challenge developers face when implementing differential privacy. So, we’re also releasing a new Privacy Loss Distribution tool for tracking privacy budgets. With this tool, developers can maintain an accurate estimate of the total cost to user privacy for collections of differentially private queries, and better evaluate the overall impact of their pipelines. Privacy Loss Distribution supports widely used mechanisms (such as Laplace, Gaussian, and Randomized response) and can scale to hundreds of compositions.

    We hope these new languages, tools, and features unlock differential privacy for even more developers. Continue to share your stories and suggestions with us at dp-open-source@google.com—your feedback will help inform our future differential privacy launches and updates.

    Acknowledgements

    Software Engineers: Yurii Sushko, Daniel Simmons-Marengo, Christoph Dibak, Damien Desfontaines, Maria Telyatnikova, Dennis Kraft, Jimmy Ross, Vadym Doroshenko
    Research Scientists: Pasin Manurangsi, Ravi Kumar, Sergei Vassilvitskii, Alex Kulesza, Jenny Gillenwater, Kareem Amin

    By: Miguel Guevara, Mirac Vuslat Basaran, Sasha Kulankhina, and Badih Ghazi – Google Privacy Team and Google Research

    Pigweed: A collection of embedded libraries

    Thursday, March 19, 2020


    We’re excited to announce Pigweed, an open source collection of embedded-targeted libraries, or as we like to call them, modules. Pigweed modules are built to enable faster and more reliable development on 32-bit microcontrollers.

    Pigweed is in early development and is not suitable for production use at this time.


    Getting Started with Pigweed

    As of today, the source is available for everyone at pigweed.googlesource.com under an Apache 2.0 license. Instructions on getting up and running can be found in the README.


    See Pigweed in action

    Pigweed offers modules that address a wide range of embedded developer needs. These highlight how Pigweed can accelerate embedded development across the entire lifecycle:

    • Setup: Get started faster with simplified setup via a virtual environment with all required tools
    • Development: Accelerated edit-compile-flash-test cycles with watchers and distributed testing
    • Code Submission: Pre-configured code formatting and integrated presubmit checks

    Setup

    A classic challenge in the embedded space is reducing the time from running git clone to having a binary executing on a device. Oftentimes, an entire suite of tools is needed for non-trivial production embedded projects. For example, your project likely needs:

    • A C++ compiler for your target device, and also for your host
    • A build system (or three); for example, GN, Ninja, CMake, Bazel
    • A code formatting program like clang-format
    • A debugger like OpenOCD to flash and debug your embedded device
    • A known Python version with known modules installed for scripting
    • … and so on

    Below is a system with Python 2.7, clang-format, and no ARM compiler. The bootstrap script in Pigweed’s pw_env_setup module, sets up the current shell to have access to a standardized set of tools—Python 3.8, clang-format, and an ARM compiler among them. All of this is done in a virtual environment so the system’s default environment remains unmodified.

    Moving image showing a system with Python 2.7, clang-format, and no ARM compiler running the bootstrap script in Pigweed’s `pw_env_setup module`

    Development

    In typical embedded development, adding even a small change involves the following additional manual steps:

    • Re-building the image
    • Flashing the image to a device
    • Ensuring that the change works as expected
    • Verifying that existing tests continue to pass

    This is a huge disparity from web development workflows where file watchers are prevalent—you save a file and instantly see the results of the change.

    Pigweed’s pw_watch module solves this inefficiency directly, providing a watcher that automatically invokes a build when a file is saved, and also runs the specific tests affected by the code changes. This drastically reduces the edit-compile-flash-test cycle for changes.

    Moving image of Pigweed's pw_watch-build demo

    In the demo above, the pw_watch module (on the right) does the following:

    • Detects source file changes
    • Builds the affected libraries, tests, and binaries
    • Flashes the tests to the device (in this case a STM32F429i Discovery board)
    • Runs the specific unit tests

    There’s no need to leave your code editor—all of this is done automatically. You can save additional time by using the pw_target_runner module to run tests in parallel across multiple devices.


    Code submission

    When developing code as a part of a team, consistent code is an important part of a healthy codebase. However, setting up linters, configuring code formatting, and adding automated presubmit checks is work that often gets delayed indefinitely.

    Pigweed’s pw_presubmit module provides an off-the-shelf integrated suite of linters, based on tools that you’ve probably already used, that are pre-configured for immediate use for microcontroller developers. This means that your project can have linting and automatic formatting presubmit checks from its inception.

    Moving image of Pigweed's pw-presubmit demo

    Other modules

    There are many modules in addition to the ones highlighted above:

    • pw_tokenizer – A module that converts strings to binary tokens at compile time. This enables logging with dramatically less overhead in flash, RAM, and CPU usage.
    • pw_string – Provides the flexibility, ease-of-use, and safety of C++-style string manipulation, but with no dynamic memory allocation and a much smaller binary size impact. Using pw_string in place of the standard C functions eliminates issues related to buffer overflow or missing null terminators.
    • pw_bloat – A module to generate memory reports for output binaries empowering developers with information regarding the memory impact of any change.
    • pw_unit_test – Unit testing is important and Pigweed offers a portable library that’s broadly compatible with Google Test. Unlike Google Test, pw_unit_test is built on top of embedded friendly primitives; for example, it does not use dynamic memory allocation. Additionally, it is to port to new target platforms by implementing the test event handler interface.
    • pw_kvs – A key-value-store implementation for flash-backed persistent storage with integrated wear levelling. This is a lightweight alternative to a file system for embedded devices.
    • pw_cpu_exception_armv7m – Robust low level hardware fault handler for ARM Cortex-M; the handler even has unit tests written in assembly to verify nested-hardware-fault handling!
    • pw_protobuf – An early preview of our wire-format-oriented protocol buffer implementation. This protobuf compiler makes a different set of implementation tradeoffs than the most popular protocol buffer library in this space, nanopb.

    Why name the project Pigweed?

    Pigweed, also known as amaranth, is a nutritious grain and leafy salad green that is also a rapidly growing weed. When developing the project that eventually became Pigweed, we wanted to find a name that was fun, playful, and reflective of how we saw Pigweed growing. Teams would start out using one module that catches their eye, and after that goes well, they’d quickly start using more.

    So far, so good 😁


    What’s next?

    We’re continuing to evolve the collection and add new modules. It’s our hope that others in the embedded community find these modules helpful for their projects.

    By Keir Mierle and Mohammed Habibulla, on behalf of the Pigweed team

    Open Location Code: Addresses for everything, everywhere

    Thursday, April 30, 2015

    Accurate street addresses are taken for granted in much of the world. But in many areas, formal street names and addresses don't exist and the only real alternative is to use addresses of the form "behind the old bus stop". Without a street address, it's difficult to organise deliveries, to receive visitors or to find businesses. And street addresses only work where there are named and numbered streets - without these, there's no easy way to provide someone with a location.

    image03.png
    Area with unknown street names in Indonesia. (Google Maps)

    Latitude and longitude coordinates can specify any location, but they’re long and cumbersome. What if they were more human-friendly, like a very accurate postcode that refers to just your home? We’re happy to share Open Location Code, a stand-alone open source library for this purpose.
    The Open Location Code system allows people to derive plus codes from latitude and longitude coordinates that already exist everywhere. Plus codes are similar in length to a telephone number -- 849VCWC8+R9, for example -- but can often be shortened to only four or six digits when combined with a locality (CWC8+R9, Mountain View).  Locations close to each other have similar codes. They can be encoded or decoded offline, and the character set was chosen to avoid spelling words in more than 30 different languages. We removed similar looking characters to reduce confusion and errors, and because they aren't case-sensitive, they can be easily exchanged over the phone.


    image04.png
    image00.png
    World's largest carrot,
    H3+XG Ohakune, New Zealand.
    The big gumboot.
    GV+8J Taihape, New Zealand.


    Developers of websites that need location from users (such as delivery or taxi firms in locations where street addresses are poorly defined) could use plus codes to get accurate locations from their users. Other services which map locations that don't have street addresses (such as water sources, mountain refuges, or nesting sites) could use plus codes since they don't rely on street information.


    image02.png
    image01.png
    The big trout.
    2W+GW Gore, New Zealand.
    Kime Hut, in New Zealand's Tararua Ranges.


    We have a sample implementation to find and use codes at plus.codes. You can download the latest release of the library from our GitHub page and join our discussion list to learn more.

    by Doug Rinckes, Travel team

    Jsonnet: a more elegant language for composing JSON

    Monday, April 20, 2015

    A few months ago, we quietly released Jsonnet: a simple yet rich configuration language (i.e., a programming language for specifying data). Many systems can be configured with JSON, but writing it by hand is troublesome. Jsonnet is packed with useful data-specification features that expand into JSON for other systems to act upon. Below is a trivial example of such expansion:

    // Jsonnet Example
    {
       person1: {
           name: "Alice",
           welcome: "Hello " + self.name + "!",
       },
       person2: self.person1 { name: "Bob" },
    }
    {
      "person1": {
         "name": "Alice",
         "welcome": "Hello Alice!"
      },
      "person2": {
         "name": "Bob",
         "welcome": "Hello Bob!"
      }
    }
    Jsonnet doesn’t just generate JSON: Jsonnet is also an extension of JSON. By adding new constructs between the gaps of existing JSON syntax, Jsonnet adds useful features without breaking backwards compatibility. Any valid JSON is also a valid Jsonnet program that simply emits that JSON unchanged, and existing systems that consume JSON (or its cousin YAML) can be easily modified to accept data in the full Jsonnet language. As such, Jsonnet is an example of a templating language, but one specifically designed for JSON data and less error-prone than other techniques.
    “Jsonnet” is a portmanteau of JSON and sonnet. We chose that name to convey that data expressed in Jsonnet is easier to write and maintain because it is more elegant and concise, like a poem. This is not just due to syntactic niceties like comments and permissive quotes/commas, but because Jsonnet has all the modern multi-paradigm programming language conveniences needed to manage complexity. One key benefit is the ability to use Jsonnet's mixin and import features to write modular configuration template libraries, allowing the creation of domain-specific configuration languages for particular applications.
    Most configuration languages are created ad-hoc for the needs of a given application, accruing features over time and becoming unwieldy. From day one, Jsonnet was designed as a coherent programming language, benefitting from both academic techniques and our experience implementing production languages. Unlike most configuration languages, Jsonnet has a full operational semantics, ensuring matching behavior from third party implementations as well as mathematical analysis. It is a very small and carefully chosen extension to JSON that can express both object-oriented and declarative styles. More importantly, unlike regular programming languages, Jsonnet is hermetic:  Its evaluation is independent of any implicit environmental factors, ensuring that high level configuration will resolve to the same thing every time.
    Jsonnet is open source. It’s currently available as a library with C and Python bindings, and also as a command line utility. A real-world example configuration can be found on the website, where 217 lines (9.7kB) of Jsonnet expand into 740 lines (25kB) of configuration for other tools. Learn more about Jsonnet by reading the tutorial and experimenting with our javascript demo!


    by Dave Cunningham, New York Technical Infrastructure team

    We throw pie with a little help from our friends

    Thursday, April 9, 2015

    (Cross-posted with the Google Developers Blog)

    Fun Propulsion Labs at Google* is back today with some new releases for game developers. We’ve updated Pie Noon (our open source Android TV game) with networked multi-screen action, and we’ve also added some delicious new libraries we’ve been baking since the original release: the Pindrop audio library and the Motive animation system.

    Pie Noon multi-screen action

    Got an Android TV and up to 4 friends with Android phones or tablets? You’re ready for some strategic multi-player mayhem in this updated game mode. Plan your next move in secret on your Android phone: will you throw at an opponent, block an incoming attack, or take the risky approach and wait for a larger pie? Choose your target and action, then watch the Android TV to see what happens!

    We used the NearbyConnections API from the most recent version of Google Play Games services to easily connect smartphones to your Android TV and turn our original Pie Noon party game into a game of turn-based strategy. You can grab the latest version of Pie Noon from Google Play to try it out, or crack open the source code and take a look at how we used FlatBuffers to encode data across the network in a fast, portable, bandwidth-efficient way.

    Pindrop: an open source game audio library

    Pindrop is a cross-platform C++ library for managing your in-game audio. It supports cross compilation to Android, Linux, iOS and OSX. An early version of this code was part of the first Pie Noon release, but it’s now available as a separate library that you can use in your own games. Pindrop handles loading and unloading sound banks, tracking sound locations and listeners, prioritization of your audio channels, and more.

    Pindrop is built on top of several other pieces of open source technology:

    • SDL Mixer is used as a backend for actually playing the audio.
    • The loading of data and configuration files is handled by our serialization library, FlatBuffers.
    • Our own math library, MathFu, is used for a number of under-the-hood calculations.

    You can download the latest open source release from our GitHub page. Documentation is available here and a sample project is included in the source tree. Please feel free to post any questions in our discussion list.

    Motive: an open source animation system

    The Motive animation system can breathe life into your static scenes. It does this by applying motion to simple variables. For example, if you’d like a flashlight to shine on a constantly-moving target, Motive can animate the flashlight so that it moves smoothly yet responsively.

    Motive animates both spline-based motion and procedural motion. These types of motion are not technically difficult, but they are artistically subtle. It's easy to get the math wrong. It's easy to end up with something that moves as required but doesn't quite feel right. Motive does the math and lets you focus on the feeling.

    Motive is scalable. It's designed to be extremely fast. It also has a tight memory footprint -- smaller than traditional animation compression -- that's based on Dual Cubic Splines. Our hope is that you might consider using Motive as a high-performance back-end to your existing full-featured animation systems.

    This initial release of Motive is feature-light since we focused our early efforts on doing something simple very quickly. We support procedural and spline-based animation, but we don't yet support data export from animation packages like Blender or Maya. Motive 1.0 is suitable for props -- trees, cameras, extremities -- but not fully rigged character models.  Like all FPL technologies, Motive is open source and cross-platform. Please check out the discussion list, too.

    What’s Fun Propulsion Labs at Google?

    You might remember us from such Android games as Pie Noon, LiquidFun Paint, and VoltAir, and such cross-platform libraries as MathFu, LiquidFun, and FlatBuffers.

    Want to learn more about our team? Check out this recent episode of Game On! with Todd Kerpelman for the scoop!

    by Jon Simantov, Fun Propulsion Labs at Google

    * Fun Propulsion Labs is a team within Google that's dedicated to advancing gaming on Android and other platforms.

    RE2/J: Linear-time regular-expression matching for Java

    Tuesday, February 24, 2015

    Today we’re announcing the public release of RE2/J: a pure-Java implementation of the popular RE2 regular expression library.

    Although RE2/J is not always faster than java.util.regexp, its running time is always linear in the size of the input. Thus when matching larger inputs, especially against patterns containing a high degree of alternation, RE2/J may be dramatically faster. With a backtracking implementation such as java.util.regexp, it is not hard to construct a pathological pattern whose matcher would take years to run on some inputs, so RE2/J's performance guarantee makes it suitable for use in applications where the pattern is supplied by untrusted users, such as the clients of a web server.

    If you are looking for a detailed technical discussion of the motivation for RE2 and RE2/J and the tradeoffs involved, please see “Regular Expression Matching Can Be Simple And Fast” and “Regular Expression Matching in the Wild”, both written by Russ Cox.

    RE2/J is used widely by Java projects within Google. In many cases, it can be used as a drop-in replacement for java.util.regexp. We are pleased to be able to make this library available for public consumption.

    Please head to RE2/J’s GitHub page to find out how to use it!

    By James Ring, Google Engineering

    Flowing into your games: LiquidFun 1.1

    Thursday, July 17, 2014

    We are thrilled to announce the 1.1 release of LiquidFun, an open-source 2D physics engine. It adds particle simulation to Erin Catto’s popular Box2D engine, and can be used as a drop-in replacement for Box2D. If your program is written in C++, Java, or JavaScript, you can easily use LiquidFun.

    Today’s release adds some exciting new features to LiquidFun. Some highlights:

    • LiquidFun now runs in your browser! Using Emscripten, we’ve translated LiquidFun into JavaScript. You can see LiquidFun’s Testbed application, rewritten in JavaScript, running on our landing page.
    • We’ve added iOS support for LiquidFun’s internal Testbed and EyeCandy applications. Earlier versions of LiquidFun could be made to run on iOS, but iOS is now officially supported.
    • We’ve optimized LiquidFun's particle simulation. In particular, we’ve written NEON (a.k.a., Advanced SIMD) code to improve performance on ARM processors.
    • We’ve stabilized the simulation, fixed bugs, and added some cool new functions, including one that automatically splits a particle group into multiple, disjoint particle groups. 
    • We’ve clarified and improved the documentation, thanks to questions from the LiquidFun community.

    LiquidFun Games

    The 1.1 release also includes two physics-based, open-source games from Google, currently available in the US Play Store.

    VoltAir, written in C++, is a fast platformer based on a compelling physics system, plenty of speed and motion, and interesting puzzles. If you’re a native developer, VoltAir’s source code is a great example of how to use LiquidFun.














    The second game, LiquidFun Paint, lets you create art that moves, shakes, and delights. It is written in Java, and uses LiquidFun via SWIG bindings. If you’re a Java programmer, you may want to peruse the source code of LiquidFun Paint.



    Several other games also have incorporated LiquidFun since its initial 0.9 release last December. One such game is the beautiful Battle of the SeaSons, written by three students from the technology university ETH Zurich.


    Adoption

    Our March 2014 release of LiquidFun 1.0 has already been integrated into several game development toolkits.
    • LiquidFun is also now a built-in component of the Lobster game programming language. 

    Inside LiquidFun

    If you’d like to learn even more about how the LiquidFun particle simulation works, you may enjoy our new presentation describing the tech and algorithms, Inside LiquidFun.

    By Jason Sanmiya, Fun Propulsion Labs at Google*

    *Fun Propulsion Labs is a team within Google that's dedicated to advancing gaming on Android and other platforms.

    .
    close