Standalone command line executable to interact with Poppy (Ergo Jr) [windows OS]

Hi all,

I have developed a simple standalone executable in order to basically interact with the registers of Poppy (Ergo Jr) motors (for windows OS).

It allows to:

  • Query the registers of motors/structure of the robot,
  • Set registers of motors.

As example:

  • To query compliant/stiff state, current position and speed of motors type:

    D:\>poppy query -r compliant present_position present_speed -t
    Poppy
     ├─ base
     │  ├─ m1
     │  │  ├─ compliant: true
     │  │  ├─ present_position: -1.3
     │  │  └─ moving_speed: 100
     │  ├─ m2
     │  │  ├─ compliant: true
     │  │  ├─ present_position: -90.8
     │  │  └─ moving_speed: 100
     │  └─ m3
     │     ├─ compliant: true
     │     ├─ present_position: 116.0
     │     └─ moving_speed: 100
     └─ tip
        ├─ m4
        │  ├─ compliant: true
        │  ├─ present_position: -1.0
        │  └─ moving_speed: 100
        ├─ m5
        │  ├─ compliant: true
        │  ├─ present_position: -93.7
        │  └─ moving_speed: 100
        └─ m6
           ├─ compliant: true
           ├─ present_position: -0.7
           └─ moving_speed: 100
    
  • To set both compliant state and speed of all motors, and next, move them to 0 degree type:

    D:\>poppy compliant
    D:\>poppy speed 100
    D:\>poppy position 0
    

This project is part of/based on the poppy robot cli project See

But it does not require to install nodejs as prerequisite.

It is provided through a windows installer (aka a msi file) and the latest release is available on this page.

Simply follow the instruction of the installer, and then, open a new command terminal and type

D:\>poppy -h
Usage: poppy <command> --help for detailed help

Commands:
  poppy compliant         Set state of selected motor(s) to compliant (i.e. handly drivable).
  poppy stiff             Set state of selected motor(s) to stiff (i.e. programmatically drivable).
  poppy speed <value>     Set the rotation speed of the selected motor(s).
                          Value must be in the [0, 1023] range
  poppy rotate <value>    Rotate the target motor(s) by x degrees
  poppy position <value>  Set the target position of the selected motor(s)
  poppy led [value]       Set the led color of the selected motor(s)
  poppy query             Query the state of Poppy motors.
  poppy config            Display the Poppy motor configuration.
  poppy logs              Get logs of the robot.
  poppy api [action]      Start/Reset/Stop the robot API.
  poppy reboot            Reboot the Rapsberry.
  poppy shutdown          Shutdown the Rapsberry.

Poppy Connection Settings:
  -i, --ip    Set the Poppy IP/hostname.                                               [string] [default: "poppy.local"]
  -p, --port  Set the port to the REST API served by the http server.                           [number] [default: 8080]

Options:
      --version  Show version number                                                                           [boolean]
  -h, --help     Show help                                                                                     [boolean]

To display global help.

N.

Awesome work!
Dunno the technologies behind, but are they actually windows-only? Isn’t it possible to produce MacOS + Linux binaries?

Hi,

Yes it is (and it could be performed whatever your OS):
As prerequiste, U need nodejs installed.
Once installed, type:

git clone https://github.com/nbarikipoulos/poppy-robot-cli.git
cd poppy-robot-cli
npm i // to install dependencies of the project
npx pkg . // do the job and produce 3 standalone executables named nodeX-linux-x64, nodeX-macos-x64 and nodeX-win-x64

That’s all :slight_smile:.

If needed, producing a dmg for macOS is simple enough too. Let me know in case of.

N.

1 Like