question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

URDF Robot Base Joint Falls or Falls Apart

See original GitHub issue

Describe the bug When I import a generic URDF file the link above the base link falls through the simulation or falls off to the side. I’ve replicated this with more than one urdf file. Any help would be appreciated.

To Reproduce Steps to reproduce the behavior:

  1. Create a new blank scene
  2. Go to attached pi_robot.urdf file and import the robot as per the normal instructions
  3. Click the play button to start the scene

Expected behavior Robot should hold together link in the scene window. image

Actual undesired behavior Robot falls through the base link like this. image

Environment (please complete the following information, where applicable):

  • Unity Version: Unity 2020.3.14f1 & 2021.2.0b4
  • Unity machine OS + version: Windows 10 & Ubuntu 18.04
  • ROS machine OS + version: N/A
  • ROS–Unity communication: N/A
  • Branch or version: 0.5.0

URDF File `<robot name="pi_robot">

<!-- * * * Link Definitions * * * -->

<link name="base_link">
	<visual>
	    <origin xyz="0 0 0.0425" rpy="0 0 0"/>
		<geometry>
			<box size="0.32 0.26 0.085"/>
		</geometry>
		<material name="Cyan1">
       		<color rgba="0 0.9 0.9 1.0"/>
     	</material>
	</visual>	
</link>

<link name="base_laser">
	<visual>
	    <origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.025" length="0.07"/>
		</geometry>
		<material name="Black1">
       		<color rgba="0.2 0.2 0.2 1.0"/>
     	</material>
	</visual>	
</link>

<link name="cpu_link">
	<visual>
	    <origin xyz="0 0 0.035" rpy="0 0 0"/>
		<geometry>
			<box size="0.19 0.19 0.07"/>
		</geometry>
		<material name="Cyan2">
       		<color rgba="0 0.7 0.7 1.0"/>
     	</material>
	</visual>	
</link>

<link name="upper_base_link">
	<visual>
		<origin xyz="0 0 0.05" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.085" length="0.10"/>
		</geometry>
     	<material name="Cyan3">
			<color rgba="0 0.5 0.5 0"/>
		</material>
   </visual>
</link>

<link name="torso_link">
	<visual>
		<origin xyz="0 0 0.12" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.05" length="0.24"/>
		</geometry>
     	<material name="Yellow2">
			<color rgba="0.8 0.8 0 1.0"/>
		</material>
   </visual>
</link>

<link name="head_pan_link">
	<visual>
		<origin xyz="0 0 0.0225" rpy="0 0 0"/>
		<geometry>
			<box size="0.05 0.045 0.045"/>
		</geometry>
     	<material name="Green1">
			<color rgba="0 1 0 1.0"/>
		</material>
   </visual>
</link>

<link name="head_tilt_link">
	<visual>
		<origin xyz="0 0 0.02" rpy="0 0 0"/>
		<geometry>
			<box size="0.03 0.038 0.04"/>
		</geometry>
     	<material name="Green2">
			<color rgba="0.1 0.8 0 1.0"/>
		</material>
   </visual>
</link>

<link name="neck_link">
	<visual>
		<origin xyz="0 0 0.021" rpy="0 0 0"/>
		<geometry>
			<box size="0.03 0.05 0.042"/>
		</geometry>
     	<material name="Green3">
			<color rgba="0.1 0.5 0.1 1.0"/>
		</material>
   </visual>
</link>

<link name="head_link">
	<visual>
		<origin xyz="0 0 0.025" rpy="0 0 0"/>
		<geometry>
			<box size="0.03 0.07 0.11"/>
		</geometry>
     	<material name="Grey1">
			<color rgba="0.9 0.9 0.9 1.0"/>
		</material>
   </visual>
</link>
<link name="antenna_link">
	<visual>
		<origin xyz="0 0 0.035" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.002" length="0.05"/>
		</geometry>
     	<material name="Grey3">
			<color rgba="0.8 0.8 0.8 1.0"/>
		</material>
   </visual>
</link>

<link name="left_shoulder_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<box size="0.025 0.015 0.05"/>
		</geometry>
     	<material name="Green1">
			<color rgba="0 1 0 1.0"/>
		</material>
   </visual>
</link>

<link name="right_shoulder_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<box size="0.025 0.015 0.05"/>
		</geometry>
     	<material name="Green1">
			<color rgba="0 1 0 1.0"/>
		</material>
   </visual>
</link>

<link name="left_shoulder_forward_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<box size="0.03 0.05 0.03"/>
		</geometry>
     	<material name="Blue1">
			<color rgba="0 0 0.9 1.0"/>
		</material>
   </visual>
</link>
	
<link name="right_shoulder_forward_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<box size="0.03 0.05 0.03"/>
		</geometry>
     	<material name="Blue1">
			<color rgba="0 0 0.9 1.0"/>
		</material>
   </visual>
</link>

<link name="left_shoulder_up_link">
	<visual>
		<origin xyz="0 0 0" rpy="1.57 0 0"/>
		<geometry>
			<box size="0.03 0.05 0.03"/>
		</geometry>
     	<material name="Blue2">
			<color rgba="0 0 0.7 1.0"/>
		</material>
   </visual>
</link>

<link name="right_shoulder_up_link">
	<visual>
		<origin xyz="0 0 0" rpy="1.57 0 0"/>
		<geometry>
			<box size="0.03 0.05 0.03"/>
		</geometry>
     	<material name="Blue2">
			<color rgba="0 0 0.7 1.0"/>
		</material>
   </visual>
</link>

<link name="left_upper_arm_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.0075" length="0.05"/>
		</geometry>
     	<material name="Grey1">
			<color rgba="0.9 0.9 0.9 1.0"/>
		</material>
   </visual>
</link>

<link name="right_upper_arm_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.0075" length="0.05"/>
		</geometry>
     	<material name="Grey1">
			<color rgba="0.9 0.9 0.9 1.0"/>
		</material>
   </visual>
</link>

<link name="left_elbow_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 1.57"/>
		<geometry>
			<box size="0.035 0.035 0.05"/>
		</geometry>
     	<material name="Blue2">
			<color rgba="0 0 0.7 1.0"/>
		</material>
   </visual>
</link>

<link name="right_elbow_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 1.57"/>
		<geometry>
			<box size="0.035 0.035 0.05"/>
		</geometry>
     	<material name="Blue2">
			<color rgba="0 0 0.7 1.0"/>
		</material>
   </visual>
</link>

<link name="left_lower_arm_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.0075" length="0.11"/>
		</geometry>
     	<material name="Grey1">
			<color rgba="0.9 0.9 0.9 1.0"/>
		</material>
   </visual>
</link>

<link name="right_lower_arm_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<cylinder radius="0.0075" length="0.11"/>
		</geometry>
     	<material name="Grey1">
			<color rgba="0.9 0.9 0.9 1.0"/>
		</material>
   </visual>
</link>

<link name="left_wrist_link">
	<visual>
		<origin xyz="0 0 0" rpy="1.57 0 0"/>
		<geometry>
			<box size="0.03 0.05 0.03"/>
		</geometry>
     	<material name="Blue2">
			<color rgba="0 0 0.7 1.0"/>
		</material>
   </visual>
</link>

<link name="right_wrist_link">
	<visual>
		<origin xyz="0 0 0" rpy="1.57 0 0"/>
		<geometry>
			<box size="0.03 0.05 0.03"/>
		</geometry>
     	<material name="Blue2">
			<color rgba="0 0 0.7 1.0"/>
		</material>
   </visual>
</link>

<link name="left_hand_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<box size="0.03 0.01 0.06"/>
		</geometry>
     	<material name="Grey1">
			<color rgba="0.7 0.7 0.7 1.0"/>
		</material>
   </visual>
</link>

<link name="right_hand_link">
	<visual>
		<origin xyz="0 0 0" rpy="0 0 0"/>
		<geometry>
			<box size="0.03 0.01 0.06"/>
		</geometry>
     	<material name="Grey1">
			<color rgba="0.9 0.9 0.9 1.0"/>
		</material>
   </visual>
</link>

<!-- * * * Joint Definitions * * * -->

<joint name="cpu_joint" type="fixed">
	<parent link="base_link"/>
	<child link="cpu_link"/>
	<origin xyz="0.025 0 0.085" rpy="0 0 0"/>
</joint>

<joint name="base_laser_joint" type="fixed">
	<parent link="base_link"/>
	<child link="base_laser"/>
	<origin xyz="0.18 0 0.07" rpy="0 0 0"/>
</joint>

<joint name="upper_base_joint" type="fixed">
	<parent link="cpu_link"/>
	<child link="upper_base_link"/>
	<origin xyz="0 0 0.07" rpy="0 0 0"/>
</joint>

<joint name="torso_joint" type="revolute">
	<parent link="upper_base_link"/>
	<child link="torso_link"/>
	<origin xyz="0 0 0.10" rpy="0 0 0"/>
	<axis xyz="0 0 1"/>
	<limit lower="-3.1416" upper="3.1416" effort="10" velocity="3"/>
</joint>

<joint name="head_pan_servo" type="fixed">
	<parent link="torso_link"/>
	<child link="head_pan_link"/>
	<origin xyz="0 0 0.225" rpy="0 0 0"/>
</joint>

<joint name="head_pan_joint" type="revolute">
	<parent link="head_pan_link"/>
	<child link="head_tilt_link"/>
	<origin xyz="0 0 0.045" rpy="0 0 0"/>
	<axis xyz="0 0 1"/>
	<limit lower="-3.1416" upper="3.1416" effort="10" velocity="3"/>
</joint>

<joint name="head_tilt_joint" type="revolute">
	<parent link="head_tilt_link"/>
	<child link="neck_link"/>
	<origin xyz="0 0 0.04" rpy="0 0 0"/>
	<axis xyz="0 1 0"/>
	<limit lower="-1.57" upper="1.57" effort="10" velocity="3"/>
</joint>

<joint name="neck_joint" type="fixed">
	<parent link="neck_link"/>
	<child link="head_link"/>
	<origin xyz="0.05 0 0.015" rpy="0 0 0"/>
</joint>
<joint name="antenna_joint" type="fixed">
	<parent link="head_link"/>
	<child link="antenna_link"/>
	<origin xyz="0.0 -0.025 0.065" rpy="0 0 0"/>
</joint>

<joint name="left_shoulder_joint" type="fixed">
	<parent link="torso_link"/>
	<child link="left_shoulder_link"/>
	<origin xyz="0 0.055 0.165" rpy="0 0 0"/>
</joint>

<joint name="right_shoulder_joint" type="fixed">
	<parent link="torso_link"/>
	<child link="right_shoulder_link"/>
	<origin xyz="0 -0.055 0.165" rpy="0 0 0"/>
</joint>

<joint name="left_shoulder_forward_joint" type="revolute">
	<parent link="left_shoulder_link"/>
	<child link="left_shoulder_forward_link"/>
	<origin xyz="0 0.025 0" rpy="0 0 0"/>
   	<limit lower="-1.57" upper="1.57" effort="10" velocity="3"/>
    <axis xyz="0 0 1"/>
</joint>

<joint name="right_shoulder_forward_joint" type="revolute">
	<parent link="right_shoulder_link"/>
	<child link="right_shoulder_forward_link"/>
	<origin xyz="0 -0.025 0" rpy="0 0 0"/>
   	<limit lower="-1.57" upper="1.57" effort="10" velocity="3"/>
    <axis xyz="0 0 1"/>
</joint>

<joint name="left_shoulder_up_joint" type="revolute">
	<parent link="left_shoulder_forward_link"/>
	<child link="left_shoulder_up_link"/>
	<origin xyz="0 0.04 -0.01" rpy="0 -0.707 0"/>
   	<limit lower="-1.57" upper="1.57" effort="10" velocity="3"/>
    <axis xyz="0 1 0"/>
</joint>

<joint name="right_shoulder_up_joint" type="revolute">
	<parent link="right_shoulder_forward_link"/>
	<child link="right_shoulder_up_link"/>
	<origin xyz="0 -0.04 -0.01" rpy="0 -0.707 0"/>
   	<limit lower="-1.57" upper="1.57" effort="10" velocity="3"/>
    <axis xyz="0 1 0"/>
</joint>

<joint name="left_upper_arm_joint" type="fixed">
	<parent link="left_shoulder_up_link"/>
	<child link="left_upper_arm_link"/>
	<origin xyz="0 0 -0.05" rpy="0 0 0"/>
</joint>

<joint name="right_upper_arm_joint" type="fixed">
	<parent link="right_shoulder_up_link"/>
	<child link="right_upper_arm_link"/>
	<origin xyz="0 0 -0.05" rpy="0 0 0"/>
</joint>

<joint name="left_elbow_joint" type="revolute">
	<parent link="left_upper_arm_link"/>
	<child link="left_elbow_link"/>
	<origin xyz="-0.005 0 -0.05" rpy="0 0 0"/>
   	<limit lower="-3.146" upper="3.146" effort="10" velocity="3"/>
    <axis xyz="0 0 1"/>
</joint>

<joint name="right_elbow_joint" type="revolute">
	<parent link="right_upper_arm_link"/>
	<child link="right_elbow_link"/>
	<origin xyz="-0.005 0 -0.05" rpy="0 0 0"/>
   	<limit lower="-3.146" upper="3.146" effort="10" velocity="3"/>
    <axis xyz="0 0 1"/>
</joint>

<joint name="left_lower_arm_joint" type="fixed">
	<parent link="left_elbow_link"/>
	<child link="left_lower_arm_link"/>
	<origin xyz="0 0 -0.08" rpy="0 0 0"/>
</joint>

<joint name="right_lower_arm_joint" type="fixed">
	<parent link="right_elbow_link"/>
	<child link="right_lower_arm_link"/>
	<origin xyz="0 0 -0.08" rpy="0 0 0"/>
</joint>

<joint name="left_wrist_joint" type="revolute">
	<parent link="left_lower_arm_link"/>
	<child link="left_wrist_link"/>
	<origin xyz="0 0 -0.05" rpy="0 0 0"/>
   	<limit lower="-1.57" upper="1.57" effort="10" velocity="3"/>
    <axis xyz="1 0 0"/>
</joint>

<joint name="right_wrist_joint" type="revolute">
	<parent link="right_lower_arm_link"/>
	<child link="right_wrist_link"/>
	<origin xyz="0 0 -0.05" rpy="0 0 0"/>
   	<limit lower="-1.57" upper="1.57" effort="10" velocity="3"/>
    <axis xyz="1 0 0"/>
</joint>

<joint name="left_hand_joint" type="fixed">
	<parent link="left_wrist_link"/>
	<child link="left_hand_link"/>
	<origin xyz="0 0 -0.055" rpy="0 0 0"/>
</joint>

<joint name="right_hand_joint" type="fixed">
	<parent link="right_wrist_link"/>
	<child link="right_hand_link"/>
	<origin xyz="0 0 -0.055" rpy="0 0 0"/>
</joint>

</robot>`

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bryceikedacommented, Jan 19, 2022

I created a quick video tutorial on how to get the spot moving using Unity and ROS.

https://www.youtube.com/watch?v=3MYeBxFVBHI

Let me know if it helps and if you have any suggestions for improvement. In the description, I added an edit on how I get the spot movement smoother.

0reactions
ryangoh206commented, Jan 19, 2022

Ok thanks @bryceikeda ! I will take a look at the video.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do the wheels move away from joint when the robot ...
The wheels seem to fall of the robot when it falls over in gazebo. When the model is first spawned the wheels seem...
Read more >
URDF robot falling apart with link origins to global ...
Hi All, I have spent about a week now absolutely racking my brains to try and solve this issue and have had zero...
Read more >
URDF model falls through the ground - Real-Time Physics ...
Re: URDF model falls through the ground​​ down, but the other parts still fall down. So it seems like the connections (joints) between...
Read more >
Robot model in Isaac Sim falls apart
However, my robot falls apart when I press play, ... Edit: The below problem is solved, I unchecked 'Fix Base Link' in the...
Read more >
Why my robot is lying down in gazebo simulator?
When I lift and release robot in gazebo using mouse, robot just fall down and axis are just shaking like there is no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found