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

@midscene/arm-kit

v0.1.1

Published

Readme

Arm Kit

English / 简体中文

@midscene/arm-kit provides the controller and adapter API for integrating custom robot arms with Midscene. ArmController manages one physical arm and queues operations for touchscreen devices that share it.

Implement an adapter

Import RobotArmAdapter, RobotDriver, and RobotKinematics from @midscene/arm-kit/adapter-development. A RobotArmAdapter combines a vendor-specific driver with the identity, geometry, and readiness information the controller needs.

  1. Set contractVersion to 1 and provide an id, name, and connectionIdentity. Use a stable connection identity for the physical controller. In kinematics, describe the joint order and units, Cartesian axes, and supported orientation (fixed, yaw, or full). Supply a fixedOrientation reference quaternion for fixed or yaw, and include joint and workspace limits where available.
  2. Implement connect(), disconnect(), getState(), and stop() on driver. Report connection, enablement, motion, and faults from controller telemetry. Mark stale samples and preserve their original IDs and timestamps. Use readinessPolicy to declare the maximum sample age and the status fields that must be known before motion.
  3. For touchscreen control, implement moveLinear() and readPose(). Declare the accepted speed and acceleration ranges in motionLimits.linear. Add optional methods for features the arm supports, such as movePtp() with motionLimits.ptp, or startJog() and stopJog() together. Convert vendor units at the driver boundary. A CartesianPose uses the robot base frame, millimetres, and a quaternion. Joint values use degrees for revolute joints and millimetres for prismatic joints.
  4. Return a MotionHandle from each move. Use createMotionHandle() with a promise that resolves once controller feedback confirms the terminal outcome. Confirm arrival before reporting completed. Implement stop() so it can stop a move in progress even if its waiter times out or is cancelled.

The DOBOT MG400 adapter shows pose conversion, telemetry, and completion checks. The fake adapter shows how to exercise the same contract with simulated hardware.

Connect the adapter

Create one ArmController per physical arm and share it across the devices that arm controls.

import { ArmController } from '@midscene/arm-kit';
import type { RobotArmAdapter } from '@midscene/arm-kit/adapter-development';

export async function checkConnection(adapter: RobotArmAdapter) {
  const controller = new ArmController({ adapter });
  try {
    await controller.connect();
    return await controller.getStatus();
  } finally {
    await controller.close();
  }
}

The MG400 service implementation shows how to use an adapter factory, keep the controller open, and serve its touchscreens over Midscene Connect.

To set up and calibrate a DOBOT MG400, see the MG400 device service README.