Gazebo | Ignition | Community
Ask Your Question

Creating a Constant Force Spring

asked 2018-08-29 16:14:51 -0500

gambini gravatar image

updated 2018-08-31 13:25:53 -0500

Hi all,

I am trying to make a prismatic joint into a constant force spring.

Does there exist a way to do this using Gazebo parameters?

If not, I am trying to write my own C++ code to read in the force on the joint/link and add a 200N constant force against it; however, I have been unable to read the force being applied. There seems to be gazebo::physics::joint::getForceTorque() and gazebo::physics::joint::getForce(), but a look at the source code shows these to be incomplete:

Is there something I may be missing? Has anyone else attempted to build something similar before?

Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-31 09:36:49 -0500

updated 2018-08-31 15:20:38 -0500

Have you tried using the SDF - Joint - Stiffness Element?


<joint name="gas_spring_joint" type="prismatic">
  <pose>0 0 0 0 0 0</pose>
    <xyz>0.0 0.0 1.0</xyz>

Also, see

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-08-29 16:14:51 -0500

Seen: 3,574 times

Last updated: Aug 31 '18