motoman icon indicating copy to clipboard operation
motoman copied to clipboard

I/O Interface Development

Open marip8 opened this issue 4 years ago • 12 comments

Opening this thread as a discussion point for the development of I/O interface capabilities from the ROS driver

Milestones

The tasks below are the currently planned high-level milestones for the I/O interface

  • [x] Add I/O communication into joint trajectory streamer node (done: #355)
  • [x] Port I/O communication into stand-alone node (done: #365)
  • [x] Incorporate better error feedback for incorrect I/O addresses per #360 (started with #366 and #371 (and #369))
  • [x] Add support for reading/writing bytes (#435)

Future Development

  • [ ] Implement I/O solution for ROS 2 driver
  • [ ] Leverage high-speed ethernet server for I/O communication with complex types (i.e. strings, etc.) and other teach pendant functionality

Edit: not on the original list of work, but:

  • [x] Add support for reading/writing M-registers (#439)

marip8 avatar Oct 13 '20 18:10 marip8

@marip8 wrote:

Add support for multi-group I/O reading/writing

what is this exactly @marip8 ?

Reading/writing bytes and words, or getting everything to work in both the single and multi-motion group code paths?

gavanderhoorn avatar Oct 13 '20 18:10 gavanderhoorn

I meant I/O support for bytes/strings/etc. I just changed the wording above

marip8 avatar Oct 13 '20 18:10 marip8

Ok.

Suggestion: split this into (at least) two items, as reading/writing bytes is already supported by/through MotoROS (see also REP-I4: Assigned Message Identifiers for the Simple Message Protocol - Assigned Message Identifiers - Vendor Specific Messages - Motoman), while variables, strings and others like that would probably need the ethernet server.

gavanderhoorn avatar Oct 13 '20 18:10 gavanderhoorn

Suggestion: split this into (at least) two items, as reading/writing bytes is already supported by/through MotoROS

Yes, just adding read/write byte/word support would be helpful. IMHO having read/write_byte/word_io services would already save time and complexity for simple applications.

cjue avatar Oct 15 '20 08:10 cjue

While convenience is why we're adding them here, I'm going to repeat my advice (which I always give when talking about ROS, robot drivers and IO): consider using a proper fieldbus for industrial deployments. Having to add IO support to each and every robot driver doesn't scale very well, and will most likely use custom implementations of protocols which do not have the same level of support, integration nor testing as any of the available (software defined) fieldbuses in existence.

Even a simple wrapper around a modbus/tcp client would be a good option.

Having written that: we will add services to read & write bytes, as that is already supported by MotoROS.

Reading & writing single elements (ie: single bits) is already supported now that #355 is merged.

gavanderhoorn avatar Oct 15 '20 09:10 gavanderhoorn

@steviedale: #362 would also be good to consider here.

gavanderhoorn avatar Oct 15 '20 11:10 gavanderhoorn

#366 added message and success fields to the service responses.

Those could be improved to provide a better indication of the cause of a failure as part of a fix for #360 and #367.

gavanderhoorn avatar Oct 30 '20 17:10 gavanderhoorn

I've marked "provide better error messages" as completed, as we now have input verification on the MotoROS side and error reporting on the motoman_driver.

gavanderhoorn avatar Dec 07 '20 13:12 gavanderhoorn

WIP PR for "Group IO" support: #435.

gavanderhoorn avatar Dec 12 '21 14:12 gavanderhoorn

WIP PR for "M Register" support: #439.

gavanderhoorn avatar Dec 12 '21 16:12 gavanderhoorn

#438 (and the related PRs #435, #436 and #439) made it clear that including the MotoROS result (sub) code as part of the service response would actually be really nice. Right now we only include a human-readable error message, which is good, but doesn't work as well when trying to implement some automated recovery behaviour.

Adding a field to a message cannot be done in a bw-compatible way though (as in: the MD5 will change, even if the field is not a required field, or could be ignored), so changing the message definitions will require users to rebuild the driver.

(there would be no changes required to call sites though, as the new field(s) are additions)

gavanderhoorn avatar Dec 14 '21 11:12 gavanderhoorn

Just merged #435 and updated the OP.

Keeping this open to track status of "add MotoROS result (sub) code to service response".

gavanderhoorn avatar Mar 06 '22 12:03 gavanderhoorn

I'm going to close this as I believe we've implemented what we initially set out to do.

The two open (sub)tasks have either been implemented in MotoROS2 or we're not going to implement them (we won't be using HSES here).

gavanderhoorn avatar Jun 28 '23 14:06 gavanderhoorn