USD -> SDF: Added lights attached to the world#875
Conversation
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
ed473a5 to
4b09785
Compare
Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
… ahcorde/usd_to_sdf_transforms
…nto ahcorde/usd_to_sdf_lights
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
… ahcorde/usd_to_sdf_transforms
Signed-off-by: ahcorde <ahcorde@gmail.com>
…nto ahcorde/usd_to_sdf_lights
Signed-off-by: ahcorde <ahcorde@gmail.com>
… ahcorde/usd_to_sdf_transforms
There is some data that is not common between these two formats, I would say that some of the data might be "lost in translation" |
Signed-off-by: ahcorde <ahcorde@gmail.com>
koonpeng
left a comment
There was a problem hiding this comment.
There is some data that is not common between these two formats, I would say that some of the data might be "lost in translation"
I assume that these differences are due to the different formats and can't be addressed easily?
Signed-off-by: ahcorde <ahcorde@gmail.com>
…nitionrobotics/sdformat into ahcorde/usd_to_sdf_transforms
Signed-off-by: ahcorde <ahcorde@gmail.com>
…nitionrobotics/sdformat into ahcorde/usd_to_sdf_transforms
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
…nto ahcorde/usd_to_sdf_lights
Signed-off-by: ahcorde <ahcorde@gmail.com>
1878882 to
7299701
Compare
Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
adlarkin
left a comment
There was a problem hiding this comment.
I have a few questions before merging. Otherwise, I think this looks good.
| // In general USD models used in Issac Sim define the model path | ||
| // under a root path for example: | ||
| // -> /robot_name/robot_name_link0 | ||
| // But sometimes for enviroments it uses just a simple path: | ||
| // -> /ground_plane | ||
| // -> /wall_0 | ||
| // the shortName variable defines if this is the first case when it's | ||
| // False or when it's true then it's the second case. | ||
| // This conversion might only work with Issac Sim USDs | ||
| if (primPathTokens.size() >= 2) | ||
| { | ||
| bool shortName = false; | ||
| if (primPathTokens.size() == 2) | ||
| { | ||
| if (prim.IsA<pxr::UsdGeomGprim>() || (primType == "Plane")) | ||
| { | ||
| if (primName != "imu") | ||
| { | ||
| linkName = "/" + primPathTokens[0]; | ||
| shortName = true; | ||
| } | ||
| } | ||
| } | ||
| if (!shortName) | ||
| { | ||
| linkName = "/" + primPathTokens[0] + "/" + primPathTokens[1]; | ||
| } | ||
| } |
There was a problem hiding this comment.
Is this code mainly used for finding the parent prim of the light? I find it a little odd that we are manually parsing through the first 2 levels of the prim path to find the parent. I imagine this could be problematic if the light's parent isn't in the first two levels of the stage. Is there a better way to find the parent of a light that offers more flexibility/is less error prone?
There was a problem hiding this comment.
I didn't find a better way to do it, I'm open to suggestions
There was a problem hiding this comment.
I can't think of a better way at the moment - since we are pressed for time, I added a TODO note in 847271a and created an issue in #927.
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Signed-off-by: ahcorde ahcorde@gmail.com
🎉 New feature
Summary
USD -> SDF: Added lights attached to the world
Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-bymessages.