Skip to content

Fix the joint ordering in Simple #14

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix the joint ordering in Simple #14

wants to merge 4 commits into from

Conversation

edantec
Copy link
Contributor

@edantec edantec commented Jun 20, 2025

This PR fixes the joint ordering in the Simple wrapper and correctly set up the Simple solver by using PGS rather than ADMM.

Copy link
Contributor

@fabinsch fabinsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @edantec , thanks for fixing the joint ordering.

Your PR introduces many other (unrelated) changes. Some of them refer to older versions of Simple and have either no effect or are not necessary anymore. I think we should revert them or discuss what we why you want to integrate them.

Comment on lines +32 to +34
self.simulator.contact_solver_info = pin.ProximalSettings(
args["tol"], args["tol_rel"], args["mu_prox"], args["maxit"]
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contact_solver_info does not exist anymore, please revert this change. in my PR I changed these things on purpose to make it work with the latest Simple API.

Comment on lines +43 to +44
self.simulator.constraints_problem.Kp = args["Kp"]
self.simulator.constraints_problem.Kd = args["Kd"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@@ -70,6 +61,9 @@ def __init__(self, model, geom_model, visual_model, q0, args):
self.v = np.zeros(self.model.nv)
self.a = np.zeros(self.model.nv)
self.f_feet = np.zeros(4)
self.fext = [pin.Force(np.zeros(6)) for _ in range(self.model.njoints)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont understand, why do you introduce zeros forces here ? this is not necessary anymore in simple step, please remove

Comment on lines +75 to +78
self.simulator.step(self.q, self.v, tau, self.fext, self.dt)
else:
self.simulator.stepPGS(self.q, self.v, tau, self.dt)
#print(self.simulator.getStepCPUTimes().user)
self.simulator.stepPGS(self.q, self.v, tau, self.fext, self.dt)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

'tol': node.declare_parameter('tol', 1e-6).value,
'tol_rel': node.declare_parameter('tol_rel', 1e-6).value,
'mu_prox': node.declare_parameter('mu_prox', 1e-4).value,
'maxit': node.declare_parameter('maxit', 100).value,
'warm_start': node.declare_parameter('warm_start', 1).value,
'contact_solver': node.declare_parameter('contact_solver', 'ADMM').value,
'contact_solver': node.declare_parameter('contact_solver', 'PGS').value,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you change the default solver ?

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

Successfully merging this pull request may close these issues.

3 participants