Skip to content

add SpringJoint::rest_length and set_rest_length - #1073

Open
dundysm wants to merge 1 commit into
dimforge:masterfrom
dundysm:spring-joint-rest-length
Open

dundysm wants to merge 1 commit into
dimforge:masterfrom
dundysm:spring-joint-rest-length

Conversation

@dundysm

@dundysm dundysm commented Nov 12, 2026

Copy link
Copy Markdown

Fixes #1026.

The rest length accessors on SpringJoint were commented out. This adds SpringJoint::rest_length, SpringJoint::set_rest_length and SpringJointBuilder::rest_length. They read and write the target position of the LinX motor, and leave stiffness, damping and the spring model unchanged.

Tests

  • unit tests for the getter, the setter and the builder (rapier3d and rapier2d)
  • cargo fmt --check is clean

The setter was commented out. Add rest_length and set_rest_length on SpringJoint and rest_length on SpringJointBuilder, which update the motor target position and keep stiffness, damping and spring model. Fixes dimforge#1026.

Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
@dundysm

dundysm commented Nov 12, 2026

Copy link
Copy Markdown
Author

@sebcrozet small addition for #1026 when you have a moment; thanks

This branch has not been deployed

No deployments
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.

Add SpringJoint::set_rest_length

1 participant