I am trying to simulate a snake robot, error: "joint_1 is not in gazebo mode". Please tell me how to make link_1 move freely w.r.to. the origin.

asked 2023-03-14 19:44:17 -0500

I am trying to simulate a snake robot, I created an .urdf, .yaml, and position control files. In URDF file I have started links from link_1 and given a topic command to each joint. But the link_1 is not moving at all. I tried to create a dummy link and a dummy joint to move link_1 but it is not working. When I created a dummy joint with type='fixed' then it was not giving any error. Since I don't want to fix the link_1, I created a floating joint between dummy_link and link_1. But it was giving an error 'this robot has a joint named "joint_1" which is not in the gazebo mode". Can anyone help me with this. I tried for many hours but it is not working. Please tell me how to make link_1 move freely w.r.to. the origin.

<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro">xmlns:xacro="http://www.ros.org/wiki/..." name="rrr_arm"></robot>

<xacro:property name="link_length" value = "0.14" />  <!--0.14, 0.05, 0.05 -->
<xacro:property name="link_width" value = "0.05" />
<xacro:property name="link_height" value = "0.05" />
<xacro:property name="link_mass" value = "1" />
<xacro:property name="next_link_with_gap" value = "0.10" />
<xacro:property name="next_link_cg_with_gap" value = "0.17" />

<material name="Grey">
    <color rgba="0.5 0.5 0.5 1.0"/>
<material name="White">
    <color rgba="1.0 1.0 1.0 1.0"/>
<material name="blue">
 <color rgba="0.2 0.2 1 1"/>


<xacro:macro name="inertial_box" params="mass x y z *origin">
      <xacro:insert_block name="origin"/>
      <mass value="${mass}" />
           ixx = "${(1/12)* mass * (y*y+z*z)}" ixy ="0" ixz ="0"
           iyy = "${(1/12)* mass * (x*x+z*z)}" iyz ="0" 
           izz = "${(1/12)* mass * (x*x+y*y)}" />


<!-- macros for transmission -->
<xacro:macro name="transmission_block" params="joint_name idx">
  <transmission name="tran_${idx}">
    <joint name="${joint_name}">
    <actuator name="motor_${idx}">


<!--Define Gazebo colors-->
<xacro:macro name="gazebo_grey_link_color_block" params="link_name">
<gazebo reference="${link_name}">
    <ambient>0.5 0.5 0.5 1.0</ambient>
    <diffuse>0.56666695 0.56666695 0.56666695 1.0</diffuse>
    <specular>0.6000003 0.6000003 0.6000003 1.0</specular>


<link name="link_dummy">  
<gazebo reference="link_dummy">
<joint name="link_dummy_joint" type="fixed">
  <parent link="link_dummy"/>
  <child link="link_1" />

<link name="link_1">
    <origin xyz="${link_length/2} 0 ${link_height/2}" rpy="0 0 0" />
       <box size="${link_length} ${link_width} ${link_height}"/>
    <material name="blue"/>
     <origin xyz="${link_length/2} 0 ...
edit retag flag offensive close merge delete