1. German Larrain
  2. ars

Commits

German Larrain  committed 51e0e35

model.simulator: all references to ragdoll were commented out

  • Participants
  • Parent commits 9246d2d
  • Branches dev

Comments (0)

Files changed (1)

File ars/model/simulator/__init__.py

View file
  • Ignore whitespace
 		self._space = None
 
 		self._floor_geom = None
-		self._ragdoll = None
+		#self._ragdoll = None
 
 		self._debug = do_debug
 		self._objects = {}
 
 		if self._debug:
 			print(self.sim_time)
-			print(self._ragdoll.head.get_position())
+			#print(self._ragdoll.head.get_position())
 		self.update_actors()
 
 	def toggle_pause(self):
 			self.num_iter += 1
 
 			# TODO: abstract this to a call for each "complex" object present
-			try:
-				# apply internal ragdoll forces
-				if self._ragdoll: self._ragdoll.update_internal_forces()
-			except (ValueError, AttributeError) as err:
-				print(err)
+			#===================================================================
+			# try:
+			#	# apply internal ragdoll forces
+			#	if self._ragdoll: self._ragdoll.update_internal_forces()
+			# except (ValueError, AttributeError) as err:
+			#	print(err)
+			#===================================================================
 
 			# Remove all contact joints
 			self._contact_group.empty()
 		name = "obstacle"
 		return self.add_object(SimulatedObject(name, obstacle, g_capsule))
 
-	def add_ragdoll(self, offset, density):
-		self._ragdoll = cb.RagDoll(self._world, self._space, offset, density)
-		self._ragdoll.printMass()
-
-		for rBody in self._ragdoll.bodies:
-			actor = gp.Capsule(rBody.get_length(), rBody.get_radius(), rBody.get_position())
-			name = str(rBody)
-			self.add_object(SimulatedObject(name, rBody, actor))
+#===============================================================================
+#	def add_ragdoll(self, offset, density):
+#		self._ragdoll = cb.RagDoll(self._world, self._space, offset, density)
+#		self._ragdoll.printMass()
+#
+#		for rBody in self._ragdoll.bodies:
+#			actor = gp.Capsule(rBody.get_length(), rBody.get_radius(), rBody.get_position())
+#			name = str(rBody)
+#			self.add_object(SimulatedObject(name, rBody, actor))
+#===============================================================================
 
 	def add_sphere(self, radius, center, mass=None, density=None):
 		body = phs.Sphere(self._world, self._space, radius, mass, density)