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 🙏

© 2025 – Pkg Stats / Ryan Hefner

gros-client

v0.2.28

Published

this client for npm

Downloads

52

Readme

傅利叶通用机器人系统-客户端SDK(Javascript/Typescript)

概述

本例(GROS Client SDK)适用于您已经拥有傅利叶(Fourier)所提供的机器人设备,通过本例可实现对机器人的控制。它提供了一组简单的API,让你可以轻松地与机器人进行交互。

历程

| 版本号 | 作者 | 日期 | 描述 | 快速预览 | |-----|--------|--------|------------------------------|--------------------------------------------| | 0.1 | 傅利叶软件部 | 2023.8 | 1. 立项2. 确认基础架构 | 0.1说明 | | 0.2 | 傅利叶软件部 | 2023.9 | 1. 控制模块、系统模块2. 具体coding | 0.2说明 |

快速上手

安装

npm install gros-client

使用方法

导入sdk

首先你需要在你的代码中导入这个SDK

import {Human} from 'gros-client';   

创建机器人对象

然后,你需要创建一个机器人对象,以便使用这个SDK

import {Human} from 'gros-client';  // 按需导入Human、同理还有Car、Dog等

let human = new Human({host: '192.168.9.17'});

控制机器人

你可以使用以下方法来控制机器人:

  • start(): 回零/开启控制
  • stop(): 急停(会掉电停止)
  • exit(): 退出机器人控制
  • stand(): 原地站立
  • walk(angle, speed): 控制机器人移动、走路
    • angle(float): 角度 控制方向,取值范围为正负45度。向左为正,向右为负!(浮点数8位)
    • speed(float): 速度 控制前后,取值范围为正负0.8。向前为正,向后为负!(浮点数8位)
  • head(roll, pitch, yaw): 控制GR-01人形头部运动
    • roll(float): roll(翻滚角):描述围绕x轴旋转的角度,左转头为负,向右转为正,范围(-17.1887-17.1887)
    • pitch(float): pitch(俯仰角):描述围绕y轴旋转的角度。前点头为正,后点头为负,范围(-17.1887-17.1887)
    • yaw(float): yaw(偏航角):描述围绕z轴旋转的角度。左扭头为负,右扭头为正,范围(-17.1887-17.1887)

示例代码

下面是一个完整的示例代码,演示如何使用这个SDK来控制机器人:

import {Human} from 'gros-client';  

let human = new Human({host: '192.168.9.17'});      // 请将host替换为您所拥有设备的ip

human.start(); // 启动远程控制

setTimeout(() => {
    human.stand() // 站立
    human.walk(0, 0.1) // 以0.1的速度向正前方移动
    
    //  控制系统内置状态机。为了保证机器人的校准和启动正常,在start()指令之后建议10s再执行后续指令
}, 10 * 1000)