Skip to content

Zultron/2022 09 19 rebase for PRs: 3 minor core#16

Closed
zultron wants to merge 20 commits intotormach:foxy-develfrom
zultron:zultron/2022-09-19-rebase_for_PRs-3-minor-core
Closed

Zultron/2022 09 19 rebase for PRs: 3 minor core#16
zultron wants to merge 20 commits intotormach:foxy-develfrom
zultron:zultron/2022-09-19-rebase_for_PRs-3-minor-core

Conversation

@zultron
Copy link
Copy Markdown
Collaborator

@zultron zultron commented Sep 19, 2022

This is 3 of 9 in a series of PRs refactoring the hw_device_mgr to run outside ROS, handle file resources more intelligently, manage PDO configurations, improve abstraction, improve CiA402 homing, simplify initialization, fix a state_cmd race condition, and other fixes and improvements.

This PR is based on & should be merged after #15 .

This third PR makes minor changes to core code; these shouldn't change the external API (but still could introduce unexpected breakage).

New features:

  • Add method to dump values of entire object tree from a device
  • Update HAL to work with LinuxCNC HAL (with no 64-bit int support)
  • Add error data for Inovance drives

Fixes:

  • Fix manager problems by resetting feedback_in interface in the read() method
  • Fix setting negative int type & reading str type parameter data
  • Catch KeyboardInterrupt in non-ROS manager run loop
  • Clean up & fix device_config reading routines
  • Misc. console output tweaks
  • Fix broken errors code
  • Fix HAL pin name generation
  • Fix graphviz test

Fix test_dot test.  External projects may have mgr classes without a
separate category, i.e. in the `all` class, which causes collisions.
I'm not sury why this was ever this way in the first place.

Other changes for cleanliness only; nothing fixed:
- Remove redundant piece of conditional
- Improve assertion exception messages
...and `update()` that interface from `get_feedback()`.

This fixes issues with the manager class.  It also shows that for a
more intuitive interface, interfaces should be reset from a `reset()`
method in the base `read()`, and `update()` renamed to `set()`.
When dumping drive params, uploading some objects is expected to fail;
suppressing stderr silences the cryptic & out of context error
messages printed by the `ethercat` command
The `dump_param_values()` method uploads all device SDO values and
returns in a dict of `{sdo_obj : value}` pairs.
Remove unneeded fixtures
The dash character in e.g. `-1` confuses the `ethercat` utility.  Fix
up the `ethercat download` command to explicitly signal the end of
options.
The `LCECCommand.upload()` method can now handle string types.
The `munge_config()` method was too rigid, requiring each key to be
named.  It also clobbered bits of the original.  Instead, copy the
whole raw device config, avoiding skipped and clobbered keys, and
munge just the bits that need munging.
Add objects shown in manual (and seen on drives) but not in original
ESI from Inovance

- 2002-06h, 2002-07h:  Stop mode settings
- 2004-18h:  Forced DO output in non-OP state
- 2005-08h, 2005-0Ah:  Electronic gear ratio settings
- 200D-03h:  Offline autotuning setting
The `index` attribute was unused other than to compute pin names in
the `HALDevice` class.  Replace it with a generic string used for
generated identifiers.
The base `Device` class `index` attribute, unused outside this class,
was removed.  Generate HAL pins by munging the `address` attribute
instead.
LinuxCNC doesn't support these
@zultron zultron marked this pull request as ready for review September 22, 2022 19:48
@zultron
Copy link
Copy Markdown
Collaborator Author

zultron commented Sep 22, 2022

Lumped together into a single PR, this looks like a random stack of changes. Individual commits are mostly well-documented, though, for any reviewer trying to make sense of what's going on here.

@zultron
Copy link
Copy Markdown
Collaborator Author

zultron commented Aug 8, 2025

Superseded by #22.

@zultron zultron closed this Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant