ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can you add spring dynamics to a joint (urdf)?

asked 2022-04-18 05:48:51 -0600

botboy gravatar image

I'm trying to simulate a spring within the joints of a robot leg. I've managed to use

    <gazebo reference="Joint">
        <implicitSpringDamper>true</implicitSpringDamper>
        <springStiffness>50</springStiffness>
        <springReference>0.8</springReference>
    </gazebo>

in the urdf to simulate a spring in that joint, but it only works when running the robot in gazebo. Is there a proper way to set up spring dynamics inside the joint in the urdf so that it works in rviz as well? I'm using melodic ros if that matters. Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2022-04-18 07:29:37 -0600

gvdhoorn gravatar image

Is there a proper way to set up spring dynamics inside the joint in the urdf so that it works in rviz as well?

RViz is not a simulator, but a visualisation tool.

There is nothing in RViz which could do anything (different) with the information about a spring in a specific joint.

edit flag offensive delete link more
3

answered 2022-04-19 13:52:23 -0600

shonigmann gravatar image

@gvdhoorn is absolutely correct that RViz is not a simulator and has nothing to do with the spring dynamics on your simulated robot. That being said, if all you want to do is visualize the joint in Rviz as the joints compress and extend in Gazebo, then you will need to make sure the joint states for all your non-fixed joints are being published.

The gazebo_ros_pkgs joint_state_publisher plugin is one way to do this.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2022-04-18 05:48:51 -0600

Seen: 832 times

Last updated: Apr 19 '22