

send_hinge_joint ( first_body_id = pyrosim. Simulator ( play_paused = True, debug = True, use_textures = True, xyz =, hpr =, eval_time = 1000 ) cyl_1 = sim. Import pyrosim import random # basically same code as previous examples with a few parameter tweaks sim = pyrosim. If they were enabled the simulation would most likely break.

Regardless of how groups are defined and connected, the collisions between bodies which are attached by joints are disabled automatically. They are depicted using the ‘env’ and ‘robot’ groups by the following figure:

By using the sim.create_collision_matrix(collision_type) command you can choose from four different collision types: ‘none’, ‘inter’, ‘intra’, and ‘all’. If you do not want to specify every collision between every group you can use the predefined collision matrices provided by pyrosim. Loops specify intra-group collision while edges between two different nodes specify inter-group collision. To go back to our robot/environment example above, we would want a connection between the ‘robot’ and ‘env’ collision groups and a loop connection on the ‘env’ node. If we imagine each collision group as a node on a network, then it is easy to see the collision matrix as an adjacency matrix for this network where there is an edge between two groups if they collide and none if they do not.
