-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[FEATURE] expose joint position query #1385
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
base: main
Are you sure you want to change the base?
Conversation
Can you explain what is the use-case for this? As already discussed several times in the past, I think exposing the “position” of joints is a bad idea because it is error prone. Most of the user will not understand what this is and will use it incorrectly. In my view, only link and geom poses should be exposed to the user. |
I was thinking of using this when I convert some code using different simulator but I think I can use the links to do the same! |
(Maybe) |
Now that I remember, there is already |
@gs.assert_built | ||
def get_joints_anchor_pos(self, joints_idx_local=None, envs_idx=None, *, unsafe=False): | ||
""" | ||
Returns anchor position of the entity's joints. This is the position of the joint in the world frame. |
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.
This means nothing: "This is the position of the joint in the world frame."
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.
Here is the actual definition:
Mathematically, the anchor point corresponds to the point that is fixed wrt parent link and is coincident with |
After think twice, maybe we could factorize the implementations at joint-level with what you did? If you do so, I'm open to merge it! |
Description
Add two new API
get_joints_anchor_pos
andget_joints_anchor_axis
that returns the joint position in world coordinate and the axis direction in unit vector.Related Issue
Resolves Genesis-Embodied-AI/Genesis#
Motivation and Context
How Has This Been / Can This Be Tested?
Screenshots (if appropriate):
Checklist:
Submitting Code Changes
section of CONTRIBUTING document.