German Larrain avatar 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

Comments (0)

Files changed (1)

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())
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.