/gazebo_joint_torsional_spring_plugin

Integrate torsional springs into your Gazebo simulation.

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Gazebo Joint Torsional Spring Plugin

This Gazebo/ROS plugin allows you to easily add a torsional spring to your robot in Gazebo.

Installation

cd ~/catkin_ws/src
git clone https://github.com/makit0sh/gazebo_joint_torsional_spring_plugin.git
cd ~/catkin_ws
catkin build

Adding the joint torsional spring plugin

This plugin attaches to a joint, so the plugin needs to be given a reference to that link.

<robot>
  <joint name="knee_joint">
    ... joint description ...
  </joint>

  <gazebo>
    <!-- joint torsional spring plugin -->
    <plugin name="knee_joint_torsional_spring" filename="libjoint_torsional_spring_plugin.so">
      <kx>0.1</kx>
      <set_point>0.5</set_point>
      <joint>knee_joint</joint>
    </plugin>
  </gazebo>

</robot>

Parameters

kx : The spring coefficient in N-m

set_point : The angle at which the joint would feel no force in radians

joint : Name of the joint to add the torsional spring to

Contribute

If you find a bug in the code, feel free to submit a pull request.