-
Notifications
You must be signed in to change notification settings - Fork 13
Add 3d visualization for Frame3d #268
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
Conversation
I like that this derives from group, makes it versatile to be use with custom models. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a 3D visualization component for debugging frame positions. It adds a new Frame3dSceneObject class that leverages nicegui's 3D scene capabilities and registers an update loop, and re-exports it as frame_3d_object for simpler usage in the UI.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
rosys/geometry/pose3d.py | Added Frame3dSceneObject to display 3D axes and update its position in real-time. |
rosys/geometry/init.py | Re-exported Frame3dSceneObject as frame_3d_object for easy access. |
- update "camera arm" example to use new frame object - rename class for consistency with exported name - add docstring - slightly reformat code for symmetry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pascalzauberzeug I just reviewed your code and just made a few minor changes and added the new object to the "camera arm" example. In my point of view, there are only two open questions:
- Is there a better name than
Frame3dObject
? I could imagine naming itAxesObject
orCoordinateAxes
. - The default length of 0.15 seems a bit arbitrary. I tend to set a default of 1.0 and adjust it in user code if needed.
What do you think?
@falkoschindler to throw a third one in, how about Well, it is arbitrary but perhaps more fitting for visualizing real world 3d objects than 1.0m. If you use your hands, it should be more like 0.1m. But from a code perspective, it should be 1.0m, yes |
Regarding the name: In this case Frame3dObject would work well. |
I want to share
Frame3dSceneObject
that I built for easier debugging of 3d frames. You only need nicegui's 3d scene and aFrame3d
, nothing else is needed and they update their positions themselves.Here I modified the camera arm example
Screen.Recording.2025-03-25.at.19.13.49.mov
I replaced the given page function
rosys/examples/camera_arm/main.py
Lines 68 to 96 in 10c7372
with this: