-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to attach collision objects to collision objects? #3060
Comments
A couple of questions:
I feel like this may already be a feature that we're just not making use of. |
There is no hierarchy of attached collision objects supported. They are stored in a flat map:
|
@rhaschke Thanks for confirming. I think I'll take a deeper look through the code some time this weekend, and come up with a more comprehensive proposal regarding how the implementation might look. |
AttachedBodyMembers
Constructors
Unchanged MethodsThe following methods can be unchanged, as these do not involve querying child or parent objects:
Additional MethodsThe following methods should be added to allow parent objects to lookup their children and vice versa:
The following methods should be added to allow for taking object hierarchy transforms into account. This should be done by taking the relevant poses, and iterating up to the root object, applying each object's transformation. For root objects, this is identical to the corresponding non-root-frame method:
Method ModificationsThe following methods should be modified to use the appropriate
Alternatively, since Additional ThoughtsIt'd be good to choose a suitable naming convention for denoting child objects. We could use the same convention as with submframes, however I think this could cause un-necessary ambiguity e.g. in I think my preference would be to choose a different denoter. A few ideas:
I think my preference would be the third option, since it's single-character, so less effort to parse, and is easier to distinguish than a pipe character, but I'm open to suggestions. |
@rhaschke Could you take a look over this proposal when you have time? I think I'd like to approach this work as a series of PRs, since it seems like it might require changes across quite a few files. I think I'd like to do things in the following order
This way, each PR should be easier to review and can be thoroughly tested at each step. Since the functionality will only be effectively available when the final PR goes in, this allows users to continue using collision objects without needing to consider hierarchies, whilst the tests from the previous PRs should provide confidence that enabling this feature will not break existing functionality. |
Also brief thoughts on the follow-on PR:
|
And some brief thoughts on mutating collision object operations in the planning scene:
I'm unsure what the desired behaviour would be if an attempt is made to attach a child object to a link. On the one hand, this feels like invalid behaviour, since if you're modelling collision objects in a hierarchy, you probably want to consider the group of objects as a whole. An error indicating that the root object should be attached could be raised. Alternatively, the child object could be de-associated with its parent object, and attached as usual. It'd also be nice to be able to propagate colour information to child objects. Though this feels like behaviour that should be optional, as I can imagine use-cases where you'd want to visually distinguish between parts of a compound object. (Also I don't think this piece of work should cover that side of things, but might be nice to raise as an issue once the core functionality is implemented) |
Is your feature request related to a problem? Please describe.
In our software, we have a need to attach tools to a robot.
Each tool is composed of separate parts, e.g. tool, connector, toolbit, some of which can be switched out with one another, requiring us to represent them as separate collision objects to avoid a combinatorial explosion of collision objects as more parts are added to the chain.
I think this is also nicer for modularity.
Describe the solution you'd like
It'd be nice to allow collision objects to be attached to other collision objects.
I'm unsure if this is already a feature in moveit. If so, we may be duplicating code (see alternatives).
It seems like this would be nearly identical to attaching the object to a link (i.e. specifying the name of the parent object and the transform relative to the parent object). When a query is made for the frame of the object relative to a frame which includes its parent object(s) as part of the transformation chain, the parent object transforms are also taken into account.
It'd probably also make sense for some operations to propagate to child objects, e.g.
Describe alternatives you've considered
Our current solution involves keeping track of which collision objects are defined relative to other collision objects, and their relative transformations.
We attach all collision objects to the end-effector link of the robot, using the relative object to object transforms to compute the attach pose of children objects with respect to the end-effector link.
Additional context
No response
The text was updated successfully, but these errors were encountered: