gaze_residual.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <Eigen/Core>
4
5
namespace
armarx::view_selection::gaze_controller
6
{
7
8
/**
9
* @brief How far the gaze currently is from a target.
10
*/
11
struct
GazeResidual
12
{
13
/// Angle between the gaze ray and the direction to the target [rad].
14
float
angularError
= 0.F;
15
16
/// Lateral miss distance at target range [mm].
17
float
lateralError
= 0.F;
18
};
19
20
/**
21
* @brief The gaze residual, in a form that means the same thing for every controller variant.
22
*
23
* Taking two directions rather than a robot node keeps the optical axis convention out of here:
24
* each variant supplies its gaze ray using the convention it already works in -- `atan2` rebuilds
25
* it from its own yaw/pitch parametrization, `gaze_ik` takes the axis of the virtual prismatic
26
* joint that *is* its gaze ray. Thresholds set on the result are therefore portable between them.
27
*
28
* Degenerate input (a target at the gaze origin, or a zero-length direction) yields a zero
29
* residual rather than NaN.
30
*
31
* @param currentGazeDirection Where the robot is looking. Need not be normalized.
32
* @param targetDirection Where the target is. Need not be normalized.
33
* @param targetDistance Distance to the target [mm].
34
*/
35
GazeResidual
computeGazeResidual
(
const
Eigen::Vector3f& currentGazeDirection,
36
const
Eigen::Vector3f& targetDirection,
37
float
targetDistance);
38
39
}
// namespace armarx::view_selection::gaze_controller
armarx::view_selection::gaze_controller
Definition
aron_conversions.cpp:7
armarx::view_selection::gaze_controller::computeGazeResidual
GazeResidual computeGazeResidual(const Eigen::Vector3f ¤tGazeDirection, const Eigen::Vector3f &targetDirection, const float targetDistance)
The gaze residual, in a form that means the same thing for every controller variant.
Definition
gaze_residual.cpp:10
armarx::view_selection::gaze_controller::GazeResidual
How far the gaze currently is from a target.
Definition
gaze_residual.h:12
armarx::view_selection::gaze_controller::GazeResidual::lateralError
float lateralError
Lateral miss distance at target range [mm].
Definition
gaze_residual.h:17
armarx::view_selection::gaze_controller::GazeResidual::angularError
float angularError
Angle between the gaze ray and the direction to the target [rad].
Definition
gaze_residual.h:14
armarx
view_selection
gaze_controller
gaze_residual.h
Generated by
1.13.2