Skip to content
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

Make a joint fixed #628

Open
benjamin-macadam opened this issue Nov 3, 2021 · 1 comment
Open

Make a joint fixed #628

benjamin-macadam opened this issue Nov 3, 2021 · 1 comment

Comments

@benjamin-macadam
Copy link

Hi there,

I've been using this library for some simulations the last month or two and have been very happy so far. I have a slight issue when working with a robot with a large number of joints (>50) - it would be helpful to be able to be able to update the state so that only a certain subset of joints are "active", and the rest would just be treated as fixed joints with their current values. It seems like this may be possible based on the SegmentedVector data structure used to represent the joint state (I'm not too sure how to set up a mimic-joint style linear relation between variables, however).

@JurajLieskovsky
Copy link

Purely updating the state of individual joints can be done using the set_position!(state, joint, pos) and set_velocity!(state, joint, vel) methods.

If you want to treat the other joints as fixed during some dynamics calculation, you can quite simply remove the corresponding rows and columns from the mass matrix and elements from the vectors.

There is probably a way to modify how the mass matrix and vectors are created so that those elements aren't calculated but I needed to remove individual joint velocities so I used the former approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants