# Multi-Layered Interactive Target Guidance with Visual Safety in Convex-Shaped Obstacle Environments
## 3 Safety Layer for Visual Safety
### Occlusion Avoidance  
Before presenting the candidate control barrier function, the safe set (17) defined in Section 2.3 is reconsidered. The safe set \(\mathcal{D}_{occ,k}\) for occlusion avoidance with obstacle \(\mathcal{O}_{k}\) includes the undesirable situation where the camera robot and the target are in contact, i.e., \(p_{\alpha}=0\). Therefore, to exclude \(p_{\alpha}=0\) from the safe set, the following set is considered:  
\[\mathcal{D}_{occ,k}^{\gamma}:=\bigg{\{}x_{pe}\in SE(3)^{2}\mid l_{c,k}+l_{o,k} -\|p_{\alpha}\|-\frac{\gamma}{\|p_{\alpha}\|}-\Delta_{occ}\geq 0\bigg{\}}, \tag{33}\]  
where \(\gamma\geq 0\), and \(\Delta_{occ}>2r_{M}\). The relationship \(\mathcal{D}_{occ,k}^{\gamma}\subseteq\mathcal{D}_{occ,k}\) holds between the two sets. In other words, if occlusion avoidance is achieved in the sense of \(\mathcal{D}_{occ,k}^{\gamma}\), it is also achieved in the sense of \(\mathcal{D}_{occ,k}\). Henceforth, \(\mathcal{D}_{occ,k}^{\gamma}\) is referred to as the safe set of occlusion avoidance. Additionally, a function \(h_{occ,k}:\mathcal{D}_{occ}^{\gamma}\rightarrow\mathbb{R}\) is defined as  
\[h_{occ,k}(x_{pe}):=l_{c,k}+l_{o,k}-\|p_{\alpha}\|-\frac{\gamma}{\|p_{\alpha}\| }-\Delta_{occ}. \tag{34}\]  
It is shown that \(h_{occ,k}\) is a control barrier function for the pursuit-evasion system (5)-(7). To present the result, the following unit vectors are defined:  
\[\textbf{e}_{c,k}:=\frac{p_{\text{nc}}-P_{\mathcal{O}_{k}}(p_{\text{nc}})}{\| p_{\text{nc}}-P_{\mathcal{O}_{k}}(p_{\text{nc}})\|},\,\textbf{e}_{o,k}:=\frac{p_{ \text{nc}}-P_{\mathcal{O}_{k}}(p_{\text{nc}})}{\|p_{\text{nc}}-P_{\mathcal{O}_ {k}}(p_{\text{nc}})\|},\,\textbf{e}_{\alpha}:=\frac{p_{\text{nc}}-p_{\text{nc} }}{\|p_{\text{nc}}-p_{\text{nc}}\|}. \tag{35}\]  
**Theorem 2**. : _Suppose that the parameters of the pursuit-evasion system (5)-(7) satisfy_  
\[\gamma\leq\frac{2k_{e}}{v_{max}}. \tag{36}\]  
_Then, the function \(h_{occ,k}\) is a control barrier function for the pursuit-evasion system (5)-(7) in \(\mathcal{D}_{occ,k}^{\gamma}\) for \(k\in\{1,\ldots,n_{\mathcal{O}}\}\)._  
Proof. : First, it is shown that \(h_{occ,k}\) is continuously differentiable in its domain \(\mathcal{D}_{occ,k}^{\gamma}\). From Lemma A1 in Appendix A, \(l_{c,k}\) is continuously differentiable if \(l_{c,k}>0\). If \(l_{c,k}=0\), \(l_{c,k}+l_{o,k}-\|p_{\alpha}\|-\frac{\gamma}{\|p_{\alpha}\|}\leq 0\) follows from the fact \(\|p_{\alpha}\|\geq l_{o,k}\), which contradicts the definition of \(\mathcal{D}_{occ,k}^{\gamma}\). Thus, \(l_{c,k}>0\) holds in the set \(\mathcal{D}_{occ,k}^{\gamma}\). The continuous differentiability of \(l_{o,k}\) in \(\mathcal{D}_{occ,k}^{\gamma}\) is also obtained similarly. In addition, \(\|p_{\alpha}\|\) (\(p_{c}\) is continuously differentiable when \(\|p_{\alpha}\|>0\), and it holds on \(\mathcal{D}_{occ,k}^{\gamma}\). Therefore \(h_{occ,k}\) is continuously differentiable. Next, it is shown that the set of inputs \(K_{occ,k}\), defined as  
\[K_{occ,k}(x_{pe})\coloneqq\Big{\{}V^{b}_{wc}\in\mathbb{R}^{6}\mid h_{occ,k}(x_{pe },V^{b}_{wc})\geq-h_{occ,k}(x_{pe})\Big{\}},\;\;k\in\{1,\dots,n_{\mathcal{O}}\} \tag{37}\]  
is not empty in \(\mathcal{D}^{\gamma}_{occ,k}\). The time derivative of \(h_{occ,k}\) is  
\[\dot{h}_{occ,k} =\dot{l}_{c,k}+\dot{l}_{o,k}-\left(1-\frac{\gamma}{\|p_{co}\|^{2} }\right)\frac{d}{dt}\|p_{co}\| \tag{38}\] \[=\mathbf{e}^{\gamma}_{c,k}\dot{p}_{wc}+\mathbf{e}^{\gamma}_{o,k} \dot{p}_{wo}-\left(1-\frac{\gamma}{\|p_{co}\|^{2}}\right)\mathbf{e}_{co}(\dot {p}_{wo}-\dot{p}_{wc})\] (39) \[=\left(\mathbf{e}_{c,k}+\left(1-\frac{\gamma}{\|p_{co}\|^{2}} \right)\mathbf{e}_{co}\right)^{T}e^{\delta_{w}x}v^{b}_{wc}+\left(\mathbf{e}_{ o,k}-\left(1-\frac{\gamma}{\|p_{co}\|^{2}}\right)\mathbf{e}_{co}\right)^{T}e^{ \delta_{w}x}v^{b}_{wo}. \tag{40}\]  
If \(\|p_{co}\|\
eq\sqrt{\frac{\gamma}{2}}\) or \(\mathbf{e}_{c,k}\
eq\mathbf{e}_{co}\), the coefficient of \(v^{b}_{wc}\) in the first term of (40) is not zero.