Commits

German Larrain committed 4dc50df

second example: arm and pole radius changed. At the end of the simulation, the inertia tensor of both links are printed

  • Participants
  • Parent commits 7f91b33
  • Branches dev-IROS

Comments (0)

Files changed (1)

File bin/IROS/example2_conical_pendulum.py

 	FPS = 50
 	STEPS_PER_FRAME = 80
 
-	POLE_RADIUS = 0.01
+	POLE_RADIUS = 0.141421 # 1/(5*sqrt(2))
 	POLE_HEIGHT = 1
 	POLE_INITIAL_POS = (0.0,1.0,0.0)
 	POLE_MASS = 10.0
 	
-	ARM_RADIUS = 0.01
+	ARM_RADIUS = 0.141421
 	ARM_LENGTH = 1.0
 	ARM_INITIAL_POS = (0.0,1.0,0.1)
 	ARM_MASS = 10.0
 
 if __name__ == '__main__':
 	sim_program = Example2()
-	sim_program.start()
+	sim_program.start()
+	
+	pole_body = sim_program.sim.get_object(sim_program.pole).get_body()
+	arm_body = sim_program.sim.get_object(sim_program.arm).get_body()
+	print(pole_body.get_inertia_tensor())
+	print(arm_body.get_inertia_tensor())