Revolutionize Automotive Software Development with RemotiveBroker's gRPC API

Written by remotivelabs | Published 2024/04/16
Tech Story Tags: automotive-software | automotive-software-dev | remotivebroker | remotivebroker-grpc-api | grpc-stubs | vehicle-signal-data | automotive-industry-trends | good-company | hackernoon-es | hackernoon-hi | hackernoon-zh | hackernoon-fr | hackernoon-bn | hackernoon-ru | hackernoon-vi | hackernoon-pt | hackernoon-ja | hackernoon-de | hackernoon-ko | hackernoon-tr

TLDRThe RemotiveBroker gRPC API enables developers to build and test automotive software efficiently. It supports multiple programming languages and provides a simple Python wrapper and gRPC stubs via a public GitHub repository. This API allows for reading and writing vehicle signal data, applicable to both live and recorded data settings. The process starts with just three lines of code for setting up a RemotiveBroker using Docker. Additionally, the platform integrates with the RemotiveCloud for scaling development efforts, supporting common vehicle networks and leveraging HTTP/2 for reduced latency and network bandwidth. The article also mentions available TypeScript and JavaScript stubs for gRPC-web and encourages community contributions through pull requests.via the TL;DR App

Get to know RemotiveBroker’s gRPC API and how it simplifies prototyping, building & testing automotive software. Build software the way you want and in the programming language of your choice. We make things easier with a Python wrapper and the gRPC stubs available in a public repo on our GitHub.

Get stuff done with our gRPC API

Want to make a quick prototype using Python? Interested in Rust? The RemotiveBroker gRPC API can be used to read and write vehicle signal data in your language of choice. This means that you can use the tools you prefer to quickly build applications that depend on real vehicle signal data. Given a simple configuration and a signal database file, you can get to work right away with recorded data or inside a physical vehicle with live data.

Use the same API regardless if you are working with recorded or live data, write your application once and test it on your desktop and inside a vehicle! You can reuse previously recorded drive cycles, e.g. in a deterministic ECU testing setup or when prototyping graphical user interfaces. Once you are satisfied with your work you can, in a true shift-left spirit, bring it to a test rig or physical vehicle knowing that the code has been tested.

Paired with our collaboration platform, RemotiveCloud, you can quickly scale up your development efforts with multiple virtualized RemotiveBrokers!

Get started with three lines of code

Start a RemotiveBroker with three lines of code:

$ git clone https://github.com/remotivelabs/remotivebroker-bootstrap.git
$ cd remotivebroker-bootstrap
$ docker-compose up -d

Try our free 3-minute demo or check out some of our stuff on Github, e.g the APIs, simple samples, ProtoPie integration) and go to the repo for running the bootstrap RemotiveBroker on your desktop.

What is a RemotiveBroker?

The RemotiveBroker is a flexible developer tool that fit into most setups. it exposes vehicle signal data via a pub/sub gRPC API. We support the most common vehicle networks like CAN, Flexray, LIN, and Automotive Ethernet – enabled by .dbx, .xml (fibex), .ldf and .arxml. We also proved E2E Protection.

Make it even easier with API wrappers and gRPC stubs

We have a public repo for our wrappers and stubs. Anyone is welcome to submit a pull request with a wrapper in their favorite language, get started with our gRPC proto files. Our ambition is to have wrappers and stubs/clients available for everyone.

Advantages of gRPC

Given a simple configuration, the RemotiveBroker will expose a gRPC API that puts you in control. With the broad language support that gRPC has you can use what you prefer, e.g Node.js, Ruby, C# or Kotlin. gRPC leverages HTTP/2 and a binary message format, this helps to reduce network bandwidth and decrease latency. This allows our RemotiveBroker to send large amounts of data in real-time, like in the case of high-speed CAN & CAN-FD or FlexRay.

Python wrapper

We have a Python wrapper API for a subset of the RemotiveBroker API to make it even easier to build applications. It is also available for easy installation through the Python Package Index. This wrapper API makes it easier to perform common operations like connecting to a RemotiveBroker and setting up vehicle signal data subscriptions.

Connect to a RemotiveBroker and set up a signal subscription:

# Connect to RemotiveBroker
client = Client()
client.on_connect = lambda c: print(f"Yay! - connected as {c.client_id} to {c.url}")
client.on_signals = lambda signals: print(signals.to_json())
client.connect(url="http://localhost:50051")

subscription = client.subscribe(
signal_names=["Vehicle.Speed"],
namespaces=["vss"],
changed_values_only=False)

Typescript and Javascript stubs/clients

Since we are working with gRPC-web in our web clients, we have both Typescript and Javascript stubs/clients available for grpc-web. It is also available via npm/yarn. While not as useful as a proper wrapper API, the stubs/clients are required when working with gRPC. However, just looking at the stubs is helpful when exploring the API.

Subscribe to frame frequency distribution:

// Setup request
const config = new FramesDistributionConfig()
const namespace = new NameSpace()namespace.setName(namespaceName)
config.setNamespace(namespace)

// Subscribe
this._frameDistributionStream =  
this._networkServiceClient.subscribeToFramesDistribution(config)

Our tooling and APIs are constantly evolving.

Follow us on GitHub and LinkedIn to not miss out on more helpful developer content.

If you have wishes or thoughts for what we should develop next don’t be a stranger!


Written by remotivelabs | Open & developer-centric platform for automotive software engineering
Published by HackerNoon on 2024/04/16