moppa.blogg.se

Pyrosim github
Pyrosim github










_assert_body ( composite_id, 'composite_id' ) self. (default 0.25) density : float (optional) The density of the body color : triple float (optional) Color of the body. (default ) radius : float (optional) The radius of the sphere. (default ) orientation : triple float (optional) The gloabl orientation of the body. _send_add_command ( composite_id, 'Geom', 'Cylinder', position, orientation, length, radius, capped, density, color ) def add_sphere_to_composite ( self, composite_id, position = ( 0.0, 0.0, 0.0 ), orientation = ( 0.0, 0.0, 1.0 ), radius = 0.25, density = 1.0, color = ( 1.0, 1.0, 1.0 )): """Adds sphere geometry to a composite body Parameters - composite_id : int The id tag of the target composite body position : triple float (optional) The global position of the body. _assert_body ( composite_id, 'composite_id' ) capped = int ( capped ) self.

pyrosim github

(default True) density : float (optional) The density of the body color : triple float (optional) Color of the body. (default 0.05) capped : boolean (optional) If true, the cylinder has rounded edges. (default 0.5) radius : float (optional) The radius of the cylinder. (default ) length : float (optional) The length of the long axis of the cylinder. _send_add_command ( composite_id, 'Geom', 'Box', position, orientation, sides, density, color ) def add_cylinder_to_composite ( self, composite_id, position = ( 0.0, 0.0, 0.0 ), orientation = ( 0.0, 0.0, 1.0 ), length = 0.5, radius = 0.05, capped = True, density = 1.0, color = ( 1.0, 1.0, 1.0 )): """Adds cylinder geometry to a composite body Parameters - composite_id : int The id tag of the target composite body position : triple float (optional) The global position of the body. (default ) density : float (optional) The density of the body color : triple float (optional) Color of the body. (default ) sides : triple float (optional) The length, width, and height of the body.

pyrosim github

_send_add_command ( body_id, 'Impulse', time_step, force ) def add_box_to_composite ( self, composite_id, position = ( 0.0, 0.0, 0.0 ), orientation = ( 0.0, 0.0, 1.0 ), sides = ( 0.25, 0.25, 0.25 ), density = 1.0, color = ( 1.0, 1.0, 1.0 )): """Adds box geometry to a composite body Parameters - composite_id : int The id tag of the target composite body position : triple float (optional) The global position of the body. _assert_body ( body_id, 'body_id' ) assert len ( force ) = 3, ( 'Force must be size 3' ) assert time_step >= 0, ( 'time_step must be >= 0' ) self. _send_entity ( 'Body', * args ) def add_impulse_to_body ( self, body_id, force, time_step = 0 ): """Adds an impulse force to a body at specified time step Parameters - body_id : int The id tag of the target body force : triple float The force vector to apply time_step : int (optional) The tme step to apply the specified force """ self. class Mixin ( object ): def _send_body ( self, * args ): """Sends an entity categorized as Body""" return self. # specialized class designed to be Mixin to pyrosim.py # Contains all send and add functions related to bodies, # geoms, physical things, etc.












Pyrosim github