This is an old revision of the document!


Bullet World Reasoning

This section takes a look at the reasoning that is provided by PyCRAM and explains the different types. The reasoning consists of semantic queries one can utilize to get a better understanding of the situation inside the simulation. For example, there are methods to determine if two objects are colliding or if one object is visible from a specific point (like the visual sensor of a robot). In the following sections these queries will be referred to as reasoning queries. Below you can see a table of all available reasoning queries along with the parameter types and a short description. Every query will be explained in detail further below.

Query Parameter Description
Stable Object, Bulletworld (optional) Checks if the given object is stable in the simulation. An object is considered stable if it will not change its position if the simulation is running.
Contact Object, Object, Bulletworld (optional) Checks if two given objects are in contact with each other.
Visible Object, list[list[float]], list[float]], list[float], float (optional), Bulletworld (optional) Checks if the given object is visible from a given position.
Occluding Object, list[list[float], list[float]], list[float], Bulletworld (optional) Returns a list of objects that occlude the object.
Reachable_position Object, Object, String, Bulletworld (optional) Checks if a given object is reachable for a given robot.
Reachable_object list[float], Object, String, BulletWorld (optional) Checks if a given position is reachable for a given robot.
Blocking Object, Object, String, BulletWorld (optional) Returns a list of objects that are in contact with the robot if it were to reach the object.
Supporting Object, Object, BulletWorld (optional) Checks if the first object supports the second.

Stable

This reasoning query determines if an object is stable inside the simulation, i.e., that the object does not change over a longer period of time. This is the case if the object is, for example, placed on top of a table or a counter.

To accomplish this, the coordinates of the objects will be saved at the beginning for later comparison. In addition, the current state of the world will also be saved so it can be restored later. Next, the world will be simulated for an equivalent of 2 seconds and the current coordinates will be saved. Because of how precise PyBullet works, the coordinates cannot be directly compared. Instead they will be rounded to three decimal places that correspond to the precision of 1 millimeter. Now, the previous saved state will be restored and the result of the comparison will be returned.