Spherical Joint in URDF
I have the following URDF. I striped out the meshes for this post. Does anyone know how to make the shapes that are on the x y and z axis move like a spherical/ball joint? If you use this URDF and launch in rviz you will see shapes representing x,y, and z axis. If you move them their anchor point is at the base.
<robot name="mira">
<material name="blue">
<color rgba="0 0 0.8 1"/>
</material>
<material name="red">
<color rgba="0.8 0 0 1"/>
</material>
<material name="green">
<color rgba="0 0.8 0 1"/>
</material>
<material name="gray">
<color rgba="0.9 0.9 0.9 1"/>
</material>
<!-- * * * Link Definitions * * * -->
<link name="base_link">
<visual>
<origin rpy="1.54 0 0" xyz="0 0 0.13"/>
<geometry>
</geometry>
<material name="gray"/>
</visual>
</link>
<link name="roll_M1_link">
<visual>
<origin rpy="0 0 0" xyz="0 0 0.125"/>
<geometry>
<cylinder length="0.005" radius="0.01"/>
</geometry>
<material name="red"/>
</visual>
</link>
<!-- This is for color and physical properties in Gazebo, color won't work with the material tag in gazebo
only for URDF coloring -->
<gazebo reference="roll_M1_link">
<kp>1000.0</kp>
<kd>10.0</kd>
<mu1>10.0</mu1>
<mu2>10.0</mu2>
<material>Gazebo/Red</material>
</gazebo>
<joint name="roll_joint" type="revolute">
<parent link="base_link"/>
<child link="roll_M1_link"/>
<origin xyz="0.0 0 0.0" rpy="0 0 0"/>
<limit lower="-0.4" upper="0.3" effort="0.1" velocity="0.005"/>
<axis xyz="1 0 0"/>
</joint>
<link name="pitch_M2_link">
<visual>
<origin rpy="0 0 0" xyz="0.125 0 0"/>
<geometry>
<cylinder length="0.005" radius="0.01"/>
</geometry>
<material name="green"/>
</visual>
</link>
<!-- This is for color and physical properties in Gazebo, color won't work with the material tag in gazebo
only for URDF coloring -->
<gazebo reference="pitch_M2_link">
<kp>1000.0</kp>
<kd>10.0</kd>
<mu1>10.0</mu1>
<mu2>10.0</mu2>
<material>Gazebo/Green</material>
</gazebo>
<joint name="pitch_joint" type="revolute">
<parent link="roll_M1_link"/>
<child link="pitch_M2_link"/>
<origin xyz="0 0 0" rpy="0 -1.5708 0"/>
<limit lower="-0.22" upper="0.22" effort="0.1" velocity="0.005"/>
<axis xyz="0 1 0"/>
</joint>
<link name="yaw_M3_link">
<visual>
<origin rpy="0 0 0" xyz="0 0 0.125"/>
<geometry>
<cylinder length="0.005" radius="0.01"/>
</geometry>
<material name="blue"/>
</visual>
</link>
<!-- This is for color and physical properties in Gazebo, color won't work with the material tag in gazebo
only for URDF coloring -->
<gazebo reference="yaw_M3_link">
<kp>1000.0</kp>
<kd>10.0</kd>
<mu1>10.0</mu1>
<mu2>10.0</mu2>
<material>Gazebo/Blue</material>
</gazebo>
<joint name="yaw_joint" type="continuous">
<parent link="pitch_M2_link"/>
<child link="yaw_M3_link"/>
<origin xyz="0.01 0 0" rpy="0 1.5708 0"/>
<limit effort="0.1" velocity="0.01"/>
<axis xyz="0 0 1"/>
</joint>
<link name="head_link">
<visual>
<origin rpy="1.54 0 0" xyz="0 0 0.122"/>
<geometry>
</geometry>
<material name="gray ...