Ratkaistu: / tehtävää

HW3. Virtual Sensors

Due date: 2026-02-05 23:59.
Recommended Resources:

3D Preimage Visualization

In this part of the assignment, you will explore preimages of virtual sensors for a planar mobile robot with heading.
Rather than reasoning purely algebraically, you will use an interactive visualization tool to build geometric intuition about how different sensor mappings partition the state space. You are strongly encouraged to interact with the visualizer extensively before answering the questions that follow below:
3DPreimageVisualizer-5sensors

Problem Setup

For questions in this part of the homework, consider a point-sized mobile robot moving in a planar environment:
E \subset \mathbb{R}^2, \\\
which is either:
E = [-1,1]^2, \\\
E = {(x,y)\in\mathbb{R}^2 \mid x^2+y^2 \le 1}. \\\
The robot state is:
x = (x,y,\theta) \in X = E \times S^1, \\\
where 𝜃 ∈ 𝑆¹ denotes the robot’s heading.
A virtual sensor is modeled as a mapping:
h : X \to Y, \\\
where the observation space 𝑌 ⊂ ℝ depends on the sensor definition.

Sensor Models

The visualizer implements the following sensor mappings:
h_1(x,y,\theta) = \operatorname{dist}((x,y), \partial E). \\\
ℎ_2(x,y,\theta)= \inf \{ t > 0 | (x,y) + t(\cos \theta,\sin \theta) \notin E. \}. \\\
Here, inf denotes the infimum of a set, which means: the greatest value that is less than or equal to every element of the set. In this context, ℎ₂(𝑥, 𝑦, 𝜃) represents the distance from position (𝑥, 𝑦) along heading 𝜃, at which the robot is about to leave the environment 𝐸.
h_3(x,y,\theta)= h_2(x,y,\theta+\pi). \\\
h_4(x,y,\theta) = h_2(x,y,\theta) + h_3(x,y,\theta). \\\
h_5(x,y,\theta) = \min\{ h_2(x,y,\theta+\alpha), h_2(x,y,\theta-\alpha) \}.

⚠️ Note About the Visualizer

As seen in previous assignments, numerically computing roots of real-valued functions is subject to sampling limitations and numerical error. For the same reasons, this visualizer provides only a rough approximation of a preimage. It may miss some valid states or include extra ones.
Therefore, while the visualizer is useful for building intuition, use it as guidance while still applying analytical reasoning to answer the following questions correctly.

Visualizer Recommended Use

Question 1

In the visualizer, select the disk environment first. Then select sensor ℎ₁, which measures the distance to the closest boundary. For this environment, which statements are true about ℎ₁ and its preimages?
Select ALL that are true:
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 2

Now, select the square environment for the same sensor ℎ₁.
For this environment, select ALL of the statements that are true about ℎ₁ and its preimages:
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 3

In the visualizer, for the disk environment, select sensor ℎ₂, which measures the distance to the boundary along the robot heading.
For this environment, which statements about ℎ₂ and its preimages are true?
Note:
  • Think of ℎ₂ as the maximum distance the robot can move in direction 𝜃 while remaining in 𝐸.
  • When the robot is exactly on the boundary, the distance along heading is not always 0, and this case must be reasoned about analytically.
  • The visualizer can miss (or add) some cases due to numerical sampling limitations.
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 4

In the visualizer, for the square environment, select sensor ℎ₂, which measures the distance to the boundary along the robot heading.
For this environment, which statements are true about ℎ₂ and its preimages?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 5

In the visualizer, for the disk environment, select sensor ℎ4, which measures the corridor width along the heading.
For this environment, which statements are true about ℎ4 and its preimages?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 6

Consider the sensors ℎ₁, ℎ₂, ℎ₃, ℎ₄. Which statements are true?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 7

Consider the sensors ℎ₁, ℎ₂, ℎ₃, ℎ₄ and the additional (vector-valued) sensor:
h_{23}(x,y,\theta)=\big(h_2(x,y,\theta), \, h_3(x,y,\theta)\big). \\\
Which statements are TRUE? (Select all that are true.)
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 8

In the visualizer, select the disk environment and sensor ℎ₅, the two-ray aperture sensor with an aperture angle 𝛼 ∈ [0°, 90°].
For this environment, which statements are true about ℎ₅ and its preimages for all such 𝛼?
Select ALL that are true:
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 9

Consider the two-ray aperture sensor, ℎ₅, with either the disk or the square environment. Consider two aperture angles 𝛼 = 0 and 𝛼 = 90°.
Select ALL statements that are true:
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 10

Let the environment be uncertain:
\mathcal{E} = \{E_1, E_2\}, \,\,\,\,\, E_1 = [-1,1]^2, \,\,\,\,\, E_2 = \{(x,y) \in \mathbb{R}^2 \mid x^2 + y^2 \le 1\}. \\\
State space:
X = (E_1 \cup E_2) \times S^1 \times \{E_1, E_2\}. \\\
Write a state as 𝑥 = (𝑝, 𝜃, 𝐸) with 𝑝 = (𝑥, 𝑦). Define distance to the closest boundary of 𝐸:
d_E(p) = \operatorname{dist}(p, \partial E). \\\
And the virtual sensor:
h : X \to \mathbb{R}_{\ge 0}, \quad h(p,\theta,E) = d_E(p). \\\
Select ALL statements that are true:
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Multiple robots

Consider 10 point-sized mobile robots moving in a planar square environment
E = [-1,1]^2 \subset \mathbb{R}^2. \\\
Each robot has no heading and no internal degrees of freedom. The state of robot 𝑖 is given only by its position
p_i = (x_i,y_i) \in E, \quad \forall i \in \{1,\dots,10\}. \\\
The state space of the system is denoted by 𝑋.
A virtual sensor is modeled as a mapping:
h : X \to Y, \\\
where 𝑌 is the observation space.
Let the detection region be a fixed set 𝑉 ⊂ 𝐸. Define the following three sensor mappings:
h_6(x) = \begin{cases} 1, & \text{if } \,\, ∃i ∈ \{1, . . . , 10\}\,|\, p_i \in V,\\ 0, & \text{otherwise.} \end{cases} \\\
h_7(x) = \begin{cases} 1, & \text{if }\, ∀ i ∈ \{1, . . . , 10\},\,\, p_i \in V,\\ 0, & \text{otherwise.} \end{cases} \\\
h_8(x) = \bigl| \{ i ∈ \{1,...,10\} \mid p_i \in V \} \bigr|. \\\

Question 11

Which of the following statements about the state space 𝑋 are TRUE?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 12

Which of the following statements about the detection region 𝑉 are TRUE?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 13

Which of the following statements about sensor ℎ₆ are TRUE?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 14

Which of the following statements about sensor ℎ₇ are TRUE?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Question 15

Which of the following statements about sensor ℎ₈ are TRUE?
Varoitus: Et ole kirjautunut sisään. Et voi vastata.

Authors

Anna LaValle.
?