-
Notifications
You must be signed in to change notification settings - Fork 98
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
Should support SDFormat to URDF conversion #273
Comments
This is related to ros/urdf#34 - Likely a tool that accomplishes this SDFormat -> URDF task could live side-by-side with the |
In ros/sdformat_urdf#1, there is an approach to parsing an sdformat file and generating urdfdom data structures. I've noticed one place where some additional APIs could be provided by libsdformat for finding the root link, since they are currently assuming that the canonical link is the root link (https://github.com/ros/sdformat_urdf/pull/1/files#diff-12b109e5d429371a684ac656c3aa2037R111-R126), which is not guaranteed to be true. There was some prototype code for generating a
I think we could potentially add APIs like |
Per f2f, my opinion is that things like root link are effective implementation details of KDL. If it needs to be specified through SDFormat, it's non-physical (a modelilng consideration) and should possibly be a custom tag. |
Consider a directed graph with a vertex for each
Also, even if directionality is somewhat arbitrary, I still think it would be useful to query:
I don't think these questions are unique to KDL; they've been relevant to our previous work with dartsim and simbody, for example. |
EDIT 2: See Derp comment below: #273 (comment) I get that these thing are relevant for libraries that model things as trees (Drake included), but I'm still feel like it's a bit of scope creep to add too many tree-based queries. But yes, undirected graph queries sound great! Regarding the directed parts:
IMO, it feels like the undirected queries can help inform this (connected components == 1, no cycles), and that's all Thoughts? To clarify: I don't think EDIT 1: Follow-up is, if all downstream libraries use the exact same canonical representation of a tree for a given graph, then I'd be down for it. But if we have to add knobs, then I'd say nah. That, or |
Ooohhh, one more thing: Since URDF has |
Derp. This issue is about However, there is a question about what level of API Thoughts? |
Yeah, we've hidden the |
how many connected components are in this undirected kinematic graph?
does this undirected graph have any cycles / loops?
is a fully-connected directed kinematic graph also a directed tree? if so, what is the root of that tree?
|
That looks better! Some minor questions / comments:
|
"Compatible" means that the frame placement must respect the existing URDF (both C++ DOM and XML format) constraints on the position of the link frame? The main constraint is that for 1-dof joints the link frame origin must lie on the axis of the parent joint. If that is the case, in practice there in most models there is only one possible choice of kinematic root for the model that respects this constraint. |
that's a good point @traversaro; I hadn't thought about that additional difference, that URDF link frames are co-located with the parent joint frame. We should make a test for this. I think this can be handled by computing the values of |
I think it would take some careful thought for how to represent nested models in urdf DOM data structures. Would you use the approach of sdf::addNestedModel from libsdformat9 that concatenates nested model names with link names using
That's a fine suggestion; it is more specific at the cost of being longer.
Since it is a method of the |
I'm not sure if I know why you're suggesting I don't think That being said, it also doesn't seem like we need to rush this in? Shane already has a working prototype, so we could wait til we have proper nested models and only the solve the problem there?
I mean, these probably aren't going to be used that much, so meh on length? And also, they're not that long. I've seen longer :P -- and for much more frequently used functions :( |
I didn't mean to suggest we should literally use
Agreed that it doesn't need to be in the first implementation. |
Should ensure that SDFormat models are compatible (e.g. no loops, etc.).
URIs are up for debate for how to handle / convert (if at all).
Can help with #265, e.g. making sure compatibility checks are good, exposing that as public API.
\cc @IanTheEngineer
The text was updated successfully, but these errors were encountered: