-
Notifications
You must be signed in to change notification settings - Fork 216
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
Urdf: store handle to created Urdf object. #160
Conversation
Why not use required data for identification such as simply keeping the You can always attach additional fields, outside of the constructor, to the object after construction to support your specific application's needs. |
I have multiple URDFs which share the same
How would I get a reference to the ROS3D.Urdf instance when doing // Setup the URDF client.
var urdfClient = new ROS3D.UrdfClient({
ros : ros,
tfClient : tfClient,
path : 'http://resources.robotwebtools.org/',
rootObject : viewer.scene,
loader : ROS3D.COLLADA_LOADER_2
}); Is there a possibility to access the created ROS3D.Urdf instance through the
This only helps if I can get a reference to the created |
My suggestion would be to simply modify Then in your application keep a reference to the client and grab your Urdf when needed. Use could be something like:
Or look up using the param like:
By keeping all the options attached to the object we enable all developers to query however they need at a later time without needing to somehow generate unique names for every instance in the scene. |
@sevenbitbyte thanks for your suggestions, works for me and is also cleaner 👍 |
Merged without grunt build.. Maybe add this check to your Travis CI job or make it a pre-commit hook? |
That's a result of merging via the web UI - I was merging a bunch of PRs and figured I'd push a fresh grunt build for all of them. |
When having multiple URDFs visualized, I was missing the option to remove a specific URDF instance. This PR adds the option to assign a name to the URDF object, so it can be easily found in the viewer's scene objects, e.g. for removal: