Commits

German Larrain  committed 5404e71

model.simulator.Simulation: replaced 'get_actors' method with 'actors' property.

  • Participants
  • Parent commits 687b15c

Comments (0)

Files changed (4)

File ars/app/__init__.py

 		self.create_sim_objects()
 
 		# add the graphic objects
-		self.gAdapter.add_objects_list(self.sim.get_actors().values())
+		self.gAdapter.add_objects_list(self.sim.actors.values())
 		self.sim.update_actors()
 
 	@abstractmethod

File ars/model/simulator/__init__.py

 	def time_step(self):
 		return self._DT / self._STEPS_PF
 
-	def get_collision_space(self):
+	@property
+	def collision_space(self):
 		return self._space
 
 	def add_axes(self):
 		name = "capsule"
 		return self.add_object(SimulatedBody(name, body, g_capsule))
 
-	def get_actors(self):
+	@property
+	def actors(self):
 		"""Returns a dictionary with each object actor indexed by its name"""
 		actors = {}
 		for key_ in self._objects:

File bin/IROS/example2_conical_pendulum.py

 		self.create_sim_objects()
 		
 		# add the graphic objects
-		self.gAdapter.add_objects_list(self.sim.get_actors().values())
+		self.gAdapter.add_objects_list(self.sim.actors.values())
 		self.sim.update_actors()
 	
 	def create_sim_objects(self):

File bin/IROS/example4_sinusoidal_terrain.py

 		self.create_sim_objects()
 
 		# add the graphic objects
-		self.gAdapter.add_objects_list(self.sim.get_actors().values())
+		self.gAdapter.add_objects_list(self.sim.actors.values())
 		self.sim.update_actors()
 
 	def on_pre_step(self):