sea-bass / pyroboplan

Educational Python library for manipulator motion planning
https://pyroboplan.readthedocs.io
MIT License
237 stars 25 forks source link

Support setting / getting named joint states #65

Open sea-bass opened 4 months ago

sea-bass commented 4 months ago

There should be an API to set/get joint states by name by storing them in dictionaries.

Additionally, this could support different groups, as well as loading the states from SRDF (which Pinocchio sort of already has).

henrygerardmoore commented 2 months ago

I'm going to try this out :)

sea-bass commented 2 months ago

Awesome, looking forward to it!

Although it might make things easier to start with an attempt at https://github.com/sea-bass/pyroboplan/issues/56, since ideally named states could pertain to a subset of joints.

This probably won't be super straightforward, but I suspect it requires a wrapper around the models to manage joint indices and the like. I left a blank placeholder for something like this in https://github.com/sea-bass/pyroboplan/blob/main/src/pyroboplan/core/planning_context.py, if you wanna give it a try and fill it partially?

henrygerardmoore commented 2 months ago

Yes, I'd like to give that a try! I actually already finished a super rudimentary setting/getting joint states API which is basically a dict wrapper with some added convenience functions + an example (didn't take into account any joint groups), but it makes sense that starting with joint groups should come first. I'll maybe make a draft PR of that so you can just give it a quick look over and see if it captures your intent with this issue, and then update it once I've made an attempt at #56. Does that seem like a good approach?

sea-bass commented 2 months ago

SGTM, thanks @henrygerardmoore!