Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Gazebo not loading moving joints

Hi! I am trying to spawn a urdf file on gazebo but it looks like gazebo is only reading fixed joints. If I change all my moving joints to fixed I can see a tf tree published on the tf topic but if I change back to moving joints it only publishes fixed ones. The spawned model just vibrates while moving the moving joints around randomly. I might be doing something wrong in my urdf file. My urdf files looks something like this...

<robot name="robot"> <link name="world"/> <joint name="base_fix" type="fixed"> <parent link="world"/> <child link="base_link"/> </joint> <link name="base_link"> <inertial> <mass value="3.0"/> <origin xyz="0 0 0"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <box size="0.3 .2 .05"/> </geometry> <material name="blue"> <color rgba="0 0 .8 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0.3 .2 .05"/> </geometry> </collision> </link> <gazebo reference="base_link"> <material>Gazebo/Red</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="turret" type="continuous"> <axis xyz="0 0 1"/> <parent link="base_link"/> <child link="shoulder_link"/> <origin rpy="0 0 0" xyz="0.15 0 0.035"/> <limit effort="100" velocity="2.0"/> <calibration falling="-1.1606"/> <safety_controller k_velocity="0.5"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <gazebo reference="turret"> <material>Gazebo/Red</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="shoulder_link"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.01" radius="0.01"/> </geometry> <origin rpy="1.57 0 0" xyz="0 0 0"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin xyz="1.57 0 0" rpy="0 0 0"/> <geometry> <cylinder length="0.01" radius="0.02"/> </geometry> </collision> </link> <gazebo reference="shoulder_link"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo>

<joint name="shoulder" type="revolute"> <axis xyz="0 1 0"/> <parent link="shoulder_link"/> <child link="link1"/> <origin rpy="0 0 0" xyz="0 0.01 0"/> <limit effort="100" velocity="2.0" lower="-1.57" upper="1.57"/> <calibration falling="-1.1606"/> <joint_properties damping="100.0" friction="0.0"/> </joint> <gazebo reference="shoulder"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="link1"> <inertial> <mass value="1.0"/> <origin xyz="0 0.0 0.12"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0 0.0 0.12"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.0 0.12"/> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="link1"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="elbow1" type="revolute"> <axis xyz="0 1 0"/> <parent link="link1"/> <child link="link2"/> <origin rpy="0 0 0" xyz="0 0 0.25"/> <limit effort="100" velocity="100" lower="-3.14159" upper="3.14159"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> <safety_controller k_velocity="10"/> </joint> <gazebo reference="elbow1"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="link2"> <inertial> <mass value="1.0"/> <origin xyz="0 -0.015 0.14"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.27" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0 -0.015 0.14"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.015 0.14"/> <geometry> <cylinder length="0.27" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="link2"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="elbow2" type="revolute"> <axis xyz="0 1 0"/> <parent link="link2"/> <child link="link3"/> <origin rpy="0 0 0" xyz="0 -0.015 0.27"/> <limit effort="100" velocity="100" lower="-3.14159" upper="3.14159"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> <safety_controller k_velocity="10"/> </joint> <gazebo reference="elbow2"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="link3"> <inertial> <mass value="1.0"/> <origin xyz="0 0.015 0.12"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0.0 0.015 0.12"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.015 0.12"/> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="link3"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="tilt" type="revolute"> <axis xyz="0 1 0"/> <parent link="link3"/> <child link="tilt_link"/> <origin rpy="0 0 0" xyz="0 0 0.25"/> <limit effort="100" velocity="100" lower="-3.14159" upper="3.14159"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> <safety_controller k_velocity="10"/> </joint> <gazebo reference="tilt"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="tilt_link"> <inertial> <mass value="0.02"/> <origin xyz="0.0 0.015 0.02"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.05" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0.0 0.015 0.02"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.015 0.02"/> <geometry> <cylinder length="0.025" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="tilt_link"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> --> <joint name="head_joint" type="fixed"> <axis xyz="0 1 0"/> <parent link="tilt_link"/> <child link="head"/> <origin rpy="0 0 0" xyz="0 0 0.025"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <gazebo reference="head_joint"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="head"> <inertial> <mass value="0.05"/> <origin xyz="0.0 0.015 0.05"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <box size="0.05 .05 .05"/> </geometry> <origin rpy="0 0 0" xyz="0.0 0.015 0.05"/> <material name="blue"> <color rgba="0 0 .8 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.015 0.05"/> <geometry> <box size="0.05 .05 .05"/> </geometry> </collision> </link> <gazebo reference="head"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> </robot>

Gazebo not loading moving joints

Hi! I am trying to spawn a urdf file on gazebo but it looks like gazebo is only reading fixed joints. If I change all my moving joints to fixed I can see a tf tree published on the tf topic but if I change back to moving joints it only publishes fixed ones. The spawned model just vibrates while moving the moving joints around randomly. I might be doing something wrong in my urdf file. My urdf files looks something like this...

<robot name="robot"> <link name="world"/> <joint name="base_fix" type="fixed"> <parent link="world"/> <child link="base_link"/> </joint> <link name="base_link"> <inertial> <mass value="3.0"/> <origin xyz="0 0 0"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <box size="0.3 .2 .05"/> </geometry> <material name="blue"> <color rgba="0 0 .8 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0.3 .2 .05"/> </geometry> </collision> </link> <gazebo reference="base_link"> <material>Gazebo/Red</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="turret" type="continuous"> <axis xyz="0 0 1"/> <parent link="base_link"/> <child link="shoulder_link"/> <origin rpy="0 0 0" xyz="0.15 0 0.035"/> <limit effort="100" velocity="2.0"/> <calibration falling="-1.1606"/> <safety_controller k_velocity="0.5"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <gazebo reference="turret"> <material>Gazebo/Red</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="shoulder_link"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.01" radius="0.01"/> </geometry> <origin rpy="1.57 0 0" xyz="0 0 0"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin xyz="1.57 0 0" rpy="0 0 0"/> <geometry> <cylinder length="0.01" radius="0.02"/> </geometry> </collision> </link> <gazebo reference="shoulder_link"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo>

<joint name="shoulder" type="revolute"> <axis xyz="0 1 0"/> <parent link="shoulder_link"/> <child link="link1"/> <origin rpy="0 0 0" xyz="0 0.01 0"/> <limit effort="100" velocity="2.0" lower="-1.57" upper="1.57"/> <calibration falling="-1.1606"/> <joint_properties damping="100.0" friction="0.0"/> </joint> <gazebo reference="shoulder"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="link1"> <inertial> <mass value="1.0"/> <origin xyz="0 0.0 0.12"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0 0.0 0.12"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.0 0.12"/> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="link1"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="elbow1" type="revolute"> <axis xyz="0 1 0"/> <parent link="link1"/> <child link="link2"/> <origin rpy="0 0 0" xyz="0 0 0.25"/> <limit effort="100" velocity="100" lower="-3.14159" upper="3.14159"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> <safety_controller k_velocity="10"/> </joint> <gazebo reference="elbow1"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="link2"> <inertial> <mass value="1.0"/> <origin xyz="0 -0.015 0.14"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.27" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0 -0.015 0.14"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.015 0.14"/> <geometry> <cylinder length="0.27" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="link2"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="elbow2" type="revolute"> <axis xyz="0 1 0"/> <parent link="link2"/> <child link="link3"/> <origin rpy="0 0 0" xyz="0 -0.015 0.27"/> <limit effort="100" velocity="100" lower="-3.14159" upper="3.14159"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> <safety_controller k_velocity="10"/> </joint> <gazebo reference="elbow2"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="link3"> <inertial> <mass value="1.0"/> <origin xyz="0 0.015 0.12"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0.0 0.015 0.12"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.015 0.12"/> <geometry> <cylinder length="0.25" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="link3"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <joint name="tilt" type="revolute"> <axis xyz="0 1 0"/> <parent link="link3"/> <child link="tilt_link"/> <origin rpy="0 0 0" xyz="0 0 0.25"/> <limit effort="100" velocity="100" lower="-3.14159" upper="3.14159"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> <safety_controller k_velocity="10"/> </joint> <gazebo reference="tilt"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="tilt_link"> <inertial> <mass value="0.02"/> <origin xyz="0.0 0.015 0.02"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <cylinder length="0.05" radius="0.01"/> </geometry> <origin rpy="0 0 0" xyz="0.0 0.015 0.02"/> <material name="white"> <color rgba="1 1 1 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.015 0.02"/> <geometry> <cylinder length="0.025" radius="0.01"/> </geometry> </collision> </link> <gazebo reference="tilt_link"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> --> <joint name="head_joint" type="fixed"> <axis xyz="0 1 0"/> <parent link="tilt_link"/> <child link="head"/> <origin rpy="0 0 0" xyz="0 0 0.025"/> <calibration falling="-1.1606"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <gazebo reference="head_joint"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> <link name="head"> <inertial> <mass value="0.05"/> <origin xyz="0.0 0.015 0.05"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <geometry> <box size="0.05 .05 .05"/> </geometry> <origin rpy="0 0 0" xyz="0.0 0.015 0.05"/> <material name="blue"> <color rgba="0 0 .8 1"/> </material> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.015 0.05"/> <geometry> <box size="0.05 .05 .05"/> </geometry> </collision> </link> <gazebo reference="head"> <material>Gazebo/Blue</material> <turngravityoff>false</turngravityoff> </gazebo> </robot>Please help!