Represent your robot

I, robot

Describe its field of view

As we already explain, rather than describing each sensor (it will come), Overworld considers a single camera, being the robot head. To allow Overworld to reason about what the robot is perceiving, we have to describe the camera characteristics. The most important one is the Field of View (Fov) of the sensor. If an object is out of the sensor Fov, Overworld can thus deduce that it is normal if the object is no more perceived.

The FoV characteristics

The Field of View (Fov) can be seen as the definition of the area, relative to a detector, to which a detector is sensitive to the phenomenon it sense. Taking a camera, the FoV is also called the angle of view and it's generally defined by a horizontal angle and a vertical angle.

Considering a virtual camera, as used in video games, we usually consider two additional characteristics being the clip near and the clip far. They respectively represent the minimal distance at which an entity is rendered and the maximal distance. If the camera is placed at the location of an agent's head, the clip near avoids to render elements of the head. For the clip far, it avoids to render too many objects.

In Overworld, we thus need to define these four parameters: the horizontal angle (width) and the vertical angle (height), the clip near, and the clip far.

While the width and the height should match the used sensor, the clip near will be determined depending on your agent CAD model and the clip far will be determined by the used vision-based algorithm.

tutorial 1 fov explanation

Describing a FoV

To configure the agent's FoV, we will proceed as we already do, with the use of the ontology.

Open the "agent.owl" file and replace the Eve description with the following.

<!-- agents#eve_fov -->
<owl:NamedIndividual rdf:about="agents#eve_fov">
<rdf:type rdf:resource="cg_agents#FieldOfView"/>
<cg_agents:fovHasClipNear rdf:datatype="http://www.w3.org/2002/07/owl#real">0.1</cg_agents:fovHasClipNear>
<cg_agents:fovHasClipFar rdf:datatype="http://www.w3.org/2002/07/owl#real">12</cg_agents:fovHasClipFar>
<cg_agents:fovHasHeight rdf:datatype="http://www.w3.org/2002/07/owl#real">70</cg_agents:fovHasHeight>
<cg_agents:fovHasWidth rdf:datatype="http://www.w3.org/2002/07/owl#real">102.4</cg_agents:fovHasWidth>
</owl:NamedIndividual>
<!-- agents#eve -->
<owl:NamedIndividual rdf:about="agents#eve">
<rdf:type rdf:resource="cg_agents#Robot"/>
<cg_agents:hasBase rdf:resource="agents#base_link"/>
<cg_agents:hasHead rdf:resource="agents#head_camera_frame"/>
<cg_agents:hasRightHand rdf:resource="agents#right_gripper_frame"/>
<cg_agents:hasLeftHand rdf:resource="agents#left_gripper_frame"/>
<cg_agents:hasFieldOfView rdf:resource="agents#eve_fov"/>
</owl:NamedIndividual>

The newly introduced individual represents the agent's FoV. It's of type FieldOfView and instantiates four relations being our four parameters. Where the clip far and clip near are defined in meters, the width and the height are in degrees.

We then attach the FoV to the agent with the property hasFieldOfView in the agent's description.

We are done! Almost too easy...