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

Set custom initial joint state in Bullet simulation #64

Open
stephane-caron opened this issue Jun 7, 2023 · 3 comments
Open

Set custom initial joint state in Bullet simulation #64

stephane-caron opened this issue Jun 7, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@stephane-caron
Copy link
Member

This change is essentially the same as https://github.com/tasts-robots/vulp/pull/33/files but for initial joint positions and velocities rather than base orientation. Currently the initial joint state is hard-coded to:

    bullet_.resetJointState(robot_, joint_index, 0.0);

We can pipe a custom joint state instead by extending BulletInterface::Parameters as in the PR.

@stephane-caron
Copy link
Member Author

As discussed with @mariogpascual in #105 we should add velocities to the custom state in this proposal so that the full state of a simulation can be saved and restored.

@stephane-caron
Copy link
Member Author

stephane-caron commented Oct 5, 2023

On a related note, #148 allows us to reset the initial base velocity in Bullet.

The corresponding PR in Vulp was upkie/vulp#61 (a similar change can be applied to reset joint states).

@stephane-caron
Copy link
Member Author

stephane-caron commented Feb 9, 2024

Some progress in this direction with the new RobotState class in Upkie 3.2.0. There are joint_configuration and joint_velocity attributes, but for now they are placeholders not forwarded to the simulation. The next step will be to forward them in spine configuration dictionaries, and handle them in Vulp.

@stephane-caron stephane-caron removed the good first issue Good for newcomers label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant