npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ebowwa/unitree-g1

v0.1.2

Published

TypeScript bindings for Unitree G1 SDK2 - Control Unitree G1 humanoid robot from Node.js/Bun

Readme

@ebowwa/unitree-g1

TypeScript bindings for Unitree G1 SDK2 - Control Unitree G1 humanoid robot from Node.js/Bun.

Installation

bun add @ebowwa/unitree-g1

Prerequisites

  • libunitree_sdk2.so - Unitree SDK2 shared library
  • CycloneDDS (libddsc.so) - DDS middleware
  • Network connection to robot (Ethernet)

Usage

Basic Setup

import { init, release, G1Loco, FsmModeType } from '@ebowwa/unitree-g1';

// Initialize SDK with domain ID and network interface
init(0, 'eth0');

try {
  // Create locomotion client
  const loco = new G1Loco();

  // Check current mode
  const mode = loco.getFsmMode();
  console.log('Current mode:', mode);

  // Set to walking mode
  loco.setFsmMode(FsmModeType.WalkRun);

  // Move forward at 0.5 m/s
  loco.setVelocity(0.5, 0, 0);

  // Wait 2 seconds
  await new Promise(r => setTimeout(r, 2000));

  // Stop
  loco.stop();

  // Set to passive mode
  loco.setFsmMode(FsmModeType.Passive);
} finally {
  // Release resources
  release();
}

Arm Actions

import { init, release, G1Arm, ARM_ACTIONS } from '@ebowwa/unitree-g1';

init(0, 'eth0');

const arm = new G1Arm();

// Execute predefined action by ID
arm.executeAction(ARM_ACTIONS.SHAKE_HAND);

// Execute action by name
arm.executeActionByName('wave');

// Stop custom action
arm.stopAction();

// Get available actions
const actionList = arm.getActionList();
console.log('Available actions:', actionList);

release();

Using G1Robot Helper

import { G1Robot } from '@ebowwa/unitree-g1';

// Create robot with default config (domain 0, eth0)
const robot = new G1Robot(0, 'eth0');

// Get locomotion client
const loco = robot.loco();

// Get arm client
const arm = robot.arm();

API Reference

Functions

  • init(domainId: number, networkInterface: string) - Initialize SDK
  • release() - Release SDK resources
  • isInitialized(): boolean - Check if SDK is initialized

Classes

G1Loco

  • getFsmMode(): FsmModeType - Get current FSM mode
  • setFsmMode(mode: FsmModeType) - Set FSM mode
  • setVelocity(linearX, linearY, angularZ) - Set velocity command
  • stop() - Stop the robot

G1Arm

  • executeAction(actionId: number) - Execute action by ID
  • executeActionByName(name: string) - Execute action by name
  • stopAction() - Stop current action
  • getActionList(): string - Get available actions (JSON)

Constants

// FSM Modes
FsmModeType.Last = 0
FsmModeType.Passive = 1
FsmModeType.WalkRun = 2

// Arm Actions
ARM_ACTIONS.RELEASE = 99
ARM_ACTIONS.TWO_HAND_KISS = 11
ARM_ACTIONS.SHAKE_HAND = 27
ARM_ACTIONS.WAVE = 28
ARM_ACTIONS.THUMBS_UP = 29

// Channel Names
CHANNELS.LOW_STATE = 'rt/lowstate'
CHANNELS.LOW_COMMAND = 'rt/lowcmd'
CHANNELS.VELOCITY_COMMAND = 'rt/velocitycmd'

// API IDs
LOCO_API.SET_VELOCITY = 7105
LOCO_API.SET_FSM_MODE = 7003

Building from Source

# Build Rust crate
cd unitree-sdk && cargo build --release

# Build napi bindings
cd ../unitree-ts && bun run build

License

MIT