Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Releases: nbarikipoulos/poppy-robot-core

v12.0.1 release

29 Oct 15:59
Compare
Choose a tag to compare

Maintenance release.

Bug Fix

#73 In script, unable to select motors with an array

v12.0.0 release

23 Oct 21:29
Compare
Choose a tag to compare

This release is mainly dedicated to:

  • Use the 'goto' endpoint introduced with pypot v4.0.0. and then to allow:
    • Moving a group of motors,
    • Adding duration to movement,
  • Ease setting in scripts by allowing to use array of motors/target values.

Breaking Changes

  • In Poppy object, the signature of the query function has been updated (see #67 ):

    const  poppy = ... 
    
    poppy.query({
      motors=, // array of motor names or 'all' (default)
      registers
    })
    // instead of poppy.query(motorNames, registers)
  • #68 : Script object: remove the deprecated function 'position' (replaced with the 'goto' one.)

  • #61 Unit used in 'wait' function of script/motor is now second instead of millisecond.

New Features

Script Object

  • #60, In Script/Motor object,
    • allow to constrain rotation/goto with duration:
    const script = ...
    
    script.rotate(angle, duration=, wait=) // previously .rotate(angle, wait=)
    script.goto(position, duration=, wait=) // previously .goto(angle, wait=)
    • Allow to add set multi target values for rotation/goto
      const script = createScript()
        .select('m1', 'm2')
        .goto([0, 90], true) // m1 => 0, m2 =>90
        .rotate(30, true) // rotate by 30 degrees m1 and m2 
  • #71: In script factory/ 'select' function, allow to use an array of motor names.
    const script = createScript(['m1', 'm2'])
      .goto(0)
      .select(['m4', 'm6'])
      .rotate(30)

Poppy Object

  • #64: In Poppy Object, add access to the 'goto' endpoint of the REST API
    const poppy = ...
    
    await poppy.goto({
      motors, // Array of names of motor or 'all'
      positions, // Array of position for motors or a single value that will be applied to targeted motors.
      duration, // in second 
      wait= // wait end of movements
    })
  • #66: In Poppy Object, allow to rotate/move a set of motors
    poppy.move({
      motors, // array of motor names or 'all'
      positions, // array of target position for each motors/ single value used for all motors 
      duration=, // optional
      wait= // optional (default set to 'false')
    })
    
    poppy.rotate({
      motors, // array of motor names or 'all'
      angles, // array of rotation for each motors/ single value used for for all motors 
      duration=, // optional
      wait= // optional (default set to 'false')
    })

Motor object

#62, #63: allow to constrain rotation/goto with duration:

const motor = ...

motor.goto(position, duration=, wait=) // previously motor.goto(position, wait=)
motor.rotate(angle, duration=, wait=)  // previously motor.rotate(position, wait=)

Enhancements & Others

#65: Misc. code and documentation updates.
#69: [package] Remove the useless npm ignore file
#70: In Poppy object, the function toMotorNames has been updated to array containing the 'all' keyword

Bug Fix

#72 : In Motor object/rotate function, current position was set querying wrong register ('goal_position' instead of 'present_position').

v11.1.0 release

21 Jun 14:48
Compare
Choose a tag to compare

This release is mainly dedicated to:

  • Fix some bugs introduced with the the use of the /goto rest api endpoint,
  • Ease/clear scripting by renaming the 'position' action to 'goto' (Note the 'position' action is still available but deprecated),
  • At last, various minors improvements.

Bug Fixes

#54 goto/rotate: Avoid to block the http server when wait is set to true,
#55 goto/rotate could fail with duration set to 0.

Enhancements & Others

#56 In script, rename action 'position' to 'goto',
#57 Misc. internal update in code files,
#58 [package] Update dependency to the latest axios release,
#59 [package] Update npm scripts.

v11.0.0 release

08 Jan 16:51
Compare
Choose a tag to compare

This release is mainly dedicated to:

  • Adapt requests to the pypot REST API v4.0.0 (aka included in poppy software ^4.0.0),
  • Simplify the configuration settings.

Breaking Changes

Required Poppy Software

Next to use of the pypot REST API v4.0.0, the robot should embed the poppy sofwtare ^v4.0.0.

Settings Object

The settings object have been updated:

  • The config object has been "flatenized" aka the connect property is removed and its properties have been moved to root level,
  • The property 'hostname' has been renamed to 'host'.

As example, for the main object factories (createPoppy/Script/Descriptor/RequestHandler)

  const connect = { host:'poppy1.local', port: 8081 }
 
  const poppy = await createPoppy(connect) // instead of { connect }

see api documentation for further details.

Poppy Object

The property 'allMotorIds' have been renamed to 'motorNames'.

Node Version

Supported release of node are 14 and newer.

Bug Fixes

#51: Rotate/Position failed when speed/awaiting options are respectively set to 0/true.

Enhancements & Others

#48 Various minor internal code changes,
#49 Dependencies of the package have been updated,
#52 Update/clean-up documentation.

v10.0.1 release

19 Oct 22:29
Compare
Choose a tag to compare

Minor release dedicated to update the documentation about requirements on robot software/hardware:

  • Add info about required Poppy software release (aka v3.0.0),
  • Add warning about targeted motors: Tests have been only performed with dynamixel XL-320.

v10.0.0 release

07 Feb 23:49
Compare
Choose a tag to compare

This release is dedidcated to various functionalities updates and code improvements/restructuring.

Connection

Settings

The connection settings object has been updated:

  • The 'ip' property has been renamed to 'hostname',
  • A new property named 'resolved' is dedicated to store resolved address as ip, if any.

In parallel, "high-level" factories (createPoppy, createRequestHandler, createDescriptor) has been updated in order to automatically try to resolve hostname and store result in the 'resolved' property.
Note the resolved property will be set to the hostname in case of failure.

const connect = {
  hostname: 'poppy.local' // instead of ip: 'poppy.local'
}

const reqHandler = createRequesHandler(connect)
const resolved = reqHandler.settings.resolved // resolved  will be set to the resolved ip if resolved, with the hostname otherwise

Resolving hostname

Resolving hostname has been extended to any (only applied to .local ones before)

Misc.

Default timeout for request is now set to 500ms instead of 1000ms.

New Object Factories

New factories have been added to create PoppyRequestHandler and Descriptor.

const { createRequestHandler, createDescriptor } = require('poppy-robot-core')

createRequestHandler({ hostname: 'poppy1.home' }).then(reqHandler => {
  // Get compliant state of motor m1
  const speed = await reqHandler.get('/motor/m1/register/compliant/value.json')
  ...  // Other nice stuff
})

// Discover the structure/configuration of a poppy using default connection settings
// aka poppy.local and 8080 as hostname and port
createDescriptor().then(descriptor => {
  console.log(descriptor)
})

Performing Request with PoppyRequestHandler

Perform Function Update

Arguments of the perfom function has been updated and kind of method must be provided. (see jsdoc).

Performing Post or Get Request

Two functions named 'post' and 'get' have been added:

const { createRequestHandler, createDescriptor } = require('poppy-robot-core')

// RequestHandler to robot located at poppy.local with rest api served on port8080
createRequestHandler().then(reqHandler => {
  let response = await reqHandler.get('/motor/alias/list.json')
  console.log('aliases', response.data)
  
  // Set motor m1 to stiff state
  reqHandler.post('/motor/m1/register/compliant/value.json', false)

  // Get logs
 response = await reqHandler.post('/api/raw_logs', 'id=0', { baseURL: 'http://poppy.local' })
 console.log(response.data)
})

Code Improvements

Various internal changes have been performed (see #38 #40 #42) without any changes in the use of this module excepted the point below

Use of Getter

A bunch of getXXX functions have been replaced with getter (see #40) introducing breaking changes

object old function new property
Poppy getDescriptor() descriptor
  getAllMotorIds() allMotorIds
PoppyRequestHandler getSettings() settings
Raw/ExtMotor getName() name

v9.2.1 release

20 Dec 00:15
Compare
Choose a tag to compare

Misc. update next to v9.2.0

v9.2.0 release

19 Dec 23:53
Compare
Choose a tag to compare

Minor release dedicated to update the Script Engine:

  • #33: The exec function could take array of scripts as parameters.

v9.1.1 release

13 Dec 21:34
Compare
Choose a tag to compare

Minor release dedicated to:

  • Fix #31: Failing request was returning error object instead of throwing it,
  • #32: Improve the wait algorithm use in rotate/position functions.

v9.1.0 release

25 Oct 15:20
Compare
Choose a tag to compare

Release dedicated to:

  • Avoid to "overload" poppy rest server with requests and then decrease failure on requesting robot,
  • Introduce a better error case managment:
    • When requesting registers, do not throw error but set "unreachable" values to 'undefined',
    • Update error messages to (more) human-readable ones.
  • Update getRegister of PoppyRequestHandler to allow requesting of many registers at once.