-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
A possible workflow for tool changing in simulation #13517
Comments
Also @joemasterjohn -- more parameterization! |
Thank for the very clear problem statement @huihuaTRI! @joemasterjohn is working currently towards (2) for mass and inertia properties. |
I don't fully understand which part is not needed. Are you saying that I could update the geometries without |
I believe 4 isn't necessary because (and correct me if I'm wrong):
|
Regarding implementation of MBP::UnFinalize(): Finalize() does the following:
Items 1-3 would be easy enough to undo. The primary impediment is the interaction with SG. Of course deleting the pointer is fatal, but we could change that. The exclusion groups cannot currently be undone, and I'm not sure that can be fixed due to potential interactions with other exclusion groups. What do you think @SeanCurtis-TRI ? My inclination at the moment is not to attempt unfinalizing, but rather focus on fast re-creation of a new (and unfinalized) MBP/SG pair. |
The magnitude of the difficulty depends on what's happening with the unfinalized plant.
|
After multiple offline conversations, here is my understanding Requests of this issue can be summarized into two items.
Solutions to this issue
Questions remaining:
|
@SeanCurtis-TRI: yeah, that matches how I see the problem. I don't think anything like that is feasible. A robust UnFinalize() method would have to put MBP and SG precisely back into the state they had prior to Finalize(). That would need to be done by something like a stack that could be popped. |
Not quite true. In the text above I confronted the question of collision filtering. Currently, collisions between adjacent bodies is not allowed. That gets enforced at finalization. If you delete geometries (that had their filter settings set by the original call to In order to patch that, you'd have to
|
The existence of Q2 basically contradicts the statement "no string attached" of R2. Thanks for answering Q2. I will investigate whether "identify adjacent bodies" is available. If not, it won't be an issue for this use-case since pretty much everything is already pre-defined. |
The point that I was trying to make is identifying adjacent bodies is an issue. Without doing so, you risk having the tool fly off when it experiences artificial collision with the arm end. |
This has been partially addressed by parameterization. Ongoing improvements to remodeling will eventually solve tool changing as a side effect. Closing. |
Problem statement
This issue tries to explain an approach for tool switching in simulation. This approach is not yet feasible with the current state of Drake, but probably only requires a small amount of functionalities for this particular tool change use case.
The main idea contains three steps.
Step 1: Define a robot model (via urdf/sdf) that contains all the necessary joints needed for both the robot and the tools. For example, a robot may use grippers (two joints) or wipes (no extra joint). Then the urdf/sdf should include the joint definition of the gripper, which has the most number of joints of all the tools the robot may use for this case. This allows the robot model to have the maximum number of states that the robot may need.
Step 2: In the urdf/sdf, set the necessary properties (for example, mass/inertia and size of the visual geometry) of the gripper, which are required to make the Drake parser happy. These default values do not matter. Essentially, these are just place holders for the properties of the tool links that we are going to modify later.
Step 3: In the code, the user could pragmatically set the actual properties (mass/inertial, visual and contact geometries, etc.) of a particular tool. Every time when the robot needs to switch to a different tool, the same routine will be called to update the properties of that tool.
Advantages and drawbacks
Advantages:
Drawbacks:
Pseudo steps
To realize this approach, several functions are needed and some of them may already available in Drake. I just list them below to show the flow.
ConfigToolProperties(const ToolParameters )
which includesa.
ConfigToolMassAndInertia(const ToolParameters )
b.
ConfigToolVisualGeometries(const ToolParameters )
c.
ConfigToolCollisionGeometires(const ToolParameters )
All the config functions should be able to change the transforms of the corresponding properties.
UnFinalize()
the MBP.Questions
I am tagging multiple people here for discussion purpose. Thank you in advance!
@sherm1 @amcastro-tri @SeanCurtis-TRI @jwnimmer-tri @sammy-tri
The text was updated successfully, but these errors were encountered: