robot doesn't stay steady, gazebo9

asked 2019-05-07 09:57:02 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

link texthttps://www.youtube.com/watch?v=PmhsE...

<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
  <robotNamespace>/</robotNamespace>
        <legacyModeNS>true</legacyModeNS>
</plugin>

it was after this plugin

robotak_11.xacroall: https://paste.ubuntu.com/p/9vTQBC6MMh/

  <gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
  <robotNamespace>/</robotNamespace>
        <legacyModeNS>true</legacyModeNS>
</plugin>

</gazebo>

<xacro:macro name="gazebo_reference" params="ref mu1 mu2 kp kd"> <gazebo reference="${ref}"> <mu1 value="${mu1}"/> <mu2 value="${mu2}"/> <kp value="${kp}"/> <kd value="${kd}"/> </gazebo> </xacro:macro>

<xacro:property name="mu1" value="0.0"/> <xacro:property name="mu2" value="0.0"/> <xacro:property name="kp" value="0.0"/> <xacro:property name="kd" value="0.0"/>

<xacro:gazebo_reference ref="base_link" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<!--xacro:gazebo_reference ref="omuz_kol_on_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="omuz_kol_on_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="omuz_kol_arka_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="omuz_kol_arka_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="kol_ayak_on_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="kol_ayak_on_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="kol_ayak_arka_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="kol_ayak_arka_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="base_link_omuz_on_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="base_link_omuz_on_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="base_link_omuz_arka_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="base_link_omuz_arka_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" /-->

<xacro:gazebo_reference ref="kol_on_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="kol_on_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="kol_arka_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />
<xacro:gazebo_reference ref="kol_arka_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}" />

<xacro:gazebo_reference ref="ayak_on_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/> <xacro:gazebo_reference ref="ayak_on_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/> <xacro:gazebo_reference ref="ayak_arka_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/> <xacro:gazebo_reference ref="ayak_arka_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/> <xacro:gazebo_reference ref="omuz_on_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/> <xacro:gazebo_reference ref="omuz_on_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/> <xacro:gazebo_reference ref="omuz_arka_sol" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/> <xacro:gazebo_reference ref="omuz_arka_sag" mu1="${mu1}" mu2="${mu2}" kp="${kp}" kd="${kd}"/>

<xacro:macro name="trans" params="ref"> <transmission name="swivel_${ref}"> <type>transmission_interface/SimpleTransmission</type> <joint name="${ref}">

        <!--hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface-->
        <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
    </joint>    
    <actuator name="$swivel_${ref}_motor">
        <mechanicalReduction>1</mechanicalReduction>        
    </actuator> 

</transmission>

</xacro:macro>

<xacro:trans ref="omuz_kol_on_sol"/> <xacro:trans ref="omuz_kol_on_sag"/> <xacro:trans ref="omuz_kol_arka_sol"/> <xacro:trans ref="omuz_kol_arka_sag"/>

</robot>

kollar.launch

<?xml version="1.0"?>
<launch>
  <arg name="model" default="$(find robotak_11)/urdf/robotak_11.xacro"/>

  <include file="$(find robotak_11)/launch/gazebo_xacro.launch">
    <arg name="model" value="$(arg model)"/>
  </include>


  <rosparam command="load"
            file="$(find robotak_11)/config/joint_names_robotak_11.yaml"
            ns ...
(more)
edit retag flag offensive close merge delete

Comments

Hello,

I would suggest you to look into the kp,kd, mu1 and mu2 values Gazebo Elements For Links

pmuthu2s gravatar imagepmuthu2s ( 2019-05-08 03:21:31 -0600 )edit

As far as I can see, you don't use meaningful inertia values (they are all 0). Fix that please and try again.

steradiant gravatar imagesteradiant ( 2019-05-12 04:11:59 -0600 )edit