Hi all,
Starting with the Poppy Ergo Jr and not really comfortable with any UI approach about programming, in particular through web browser (Snap, not to mention names), I have developped a new client side tool intended to simply and programmatically drive the Poppy Ergo Jr.
It allows:
- First, querying and sending basic set of instructions to the motor registries and then, to perform unary ‘action’ on motors such as move, speed settings, simply typing in a command line terminal,
- On a second hand, combining these basic instructions in order to test more complex motions writing some simple scripts from any text editor, and then to be able to “execute” them to the robot.
It acts as a pure client side which only requires to be installed on your local computer (the poppy ergo jr is seen as a black box.)
As example, in command line mode, typing in a terminal:
poppy exec rotate -m m1 m2 -v -30
will rotate by 30 degrees the motors m1 and m2.
And here a script example:
let script = P.createScript()
.select('all') // Select all motors
.compliant(false) // Make them "drivable"
.speed(150) // Set their speed
.position(0) // and move all motors to position 'O' degree.
.select('m1','m2') // Next select only the motors 'm1' and 'm2'...
.rotate(30) // and apply them a rotation by +30 degrees.
;
From a technical point of view, this project has been developped in node.js/javascript and it is intended to run whatever the OS i.e. Windows, Linux and MacOS. It communicates with the robot through the REST API served by the pypot http server.
As I think the maturity of this project is good i.e. stable and exploitable by other users
as well as it could be useful, I have published it on github at the following URL:
https://github.com/nbarikipoulos/poppy-robot-client
Note this module has been split in to 2 new ones. The entry point is now:
https://github.com/nbarikipoulos/poppy-robot-cli
Details about it are explained in the last post of this thread here.
It is provided with:
- An exhaustive documentation which:
- Aims to drive the users although ones without any skill in node.js/javascript (it embeds all details about installation, use, etc for newbees),
- Describes all the implemented features,
- some examples about scriptings, introducing some good practices (or I hope so ;).
Interested people could consult the full documentation on github.
I Hope it could be useful to others and any feedbacks are welcome.
Enjoy,
N.