Represents a combined configuration of the robot and the articulation objects.
More...
#include <RobotSceneConfiguration.h>
|
static void | loadCosts () |
| Load the cost coefficients and feasible ranges from the configuration file. More...
|
|
|
static size_t | numArticulation |
| The maximum number of articulated objects, hard-coded to 20.
|
|
|
glm::mat4x4 | cameraLocalTransform |
| Camera pose as homogeneous transformation matrix in world coordinates.
|
|
glm::vec3 | cameraPosition |
| Camera position in world coordinates.
|
|
float * | articulation |
| Array current of articulation positions.
|
|
GLuint | count |
| Total number of observed pixels so far.
|
|
|
class | RandomSearchTask |
|
class | HillclimbingTask |
|
Represents a combined configuration of the robot and the articulation objects.
Copy constructor.
- Parameters
-
void gpu_coverage::RobotSceneConfiguration::applyToScene |
( |
Scene *const |
scene | ) |
const |
Applies the articulation configuration to the scene and re-computes the scene graph transformations.
- Parameters
-
[in] | scene | The scene to which to apply the articulation configuration. |
float gpu_coverage::RobotSceneConfiguration::getArticulation |
( |
const size_t & |
handle | ) |
const |
|
inline |
Returns the current articulation pose for a given articulated object.
- Parameters
-
[in] | handle | The index of the articulated object. |
- Returns
- The articulation value between 0.0 and 1.0.
- Exceptions
-
std::out_of_range | The index of the articulated object is out of range. |
const glm::mat4x4& gpu_coverage::RobotSceneConfiguration::getCameraLocalTransform |
( |
| ) |
const |
|
inline |
Returns the camera pose.
- Returns
- The camera pose as a 4x4 homogeneous transformation matrix in world coordinates.
Computes the cost for transitioning from a previous configuration.
- Parameters
-
[in] | previousConfig | The previous configuration. |
- Returns
- Cost value.
The cost consists of costs for moving the camera from the old position to the new position and the costs for changing the articulated objects' configurations. See loadCosts() for loading the cost coefficients.
const GLuint& gpu_coverage::RobotSceneConfiguration::getCount |
( |
| ) |
const |
|
inline |
Returns the total number of observed pixels so far.
- Returns
- Number of observed pixels.
- See also
- setCount()
Returns the evaluation of the current config.
- Parameters
-
[in] | previousConfig | The previous config. |
- Returns
- Evaluation value.
The evaluation value is the information gain minus the costs for getting from the previous configuration to the current configuration.
See getGain() and getCosts() for the individual components.
Calculates the information gain achieved by moving to the new configuration.
- Parameters
-
[in] | previousConfig | The previous configuration. |
- Returns
- Information gain value.
Before calling this method, the setCount() method needs to be called with the number of observed pixels for both the previous and current configuration.
static void gpu_coverage::RobotSceneConfiguration::loadCosts |
( |
| ) |
|
|
static |
Load the cost coefficients and feasible ranges from the configuration file.
The following parameters are used:
Parameter | Description | Comment |
costCameraHeightChange | Cost factor for changing the height of the camera | |
costDistance | Cost factor for moving the camera (Euclidean distance) | |
costArticulation | Linear cost function for changing articulation (see ArticulationCost) | hard-coded, should be moved to config file |
minCameraHeight | Minimum feasible camera height above ground | |
maxCameraHeight | Maximum feasible camera height above ground | |
gainFactor | Coefficient for weighting the information gain relative to the costs | |
Copy the configuration over from another configuration.
- Parameters
-
[in] | other | The other configuration to copy from. |
void gpu_coverage::RobotSceneConfiguration::setArticulation |
( |
const size_t & |
handle, |
|
|
const float & |
value |
|
) |
| |
|
inline |
Sets the current articulation pose for a given articulated object.
- Parameters
-
[in] | handle | The index of the articulated object. |
[in] | The | articulation value between 0.0 and 1.0. |
- Exceptions
-
std::out_of_range | The index of the articulated object is out of range. |
void gpu_coverage::RobotSceneConfiguration::setCameraHeight |
( |
const float & |
value | ) |
|
Sets the camera height.
- Parameters
-
[in] | value | The new camera height above the ground. |
void gpu_coverage::RobotSceneConfiguration::setCameraLocalTransform |
( |
const glm::mat4x4 & |
cameraTransform | ) |
|
Sets the camera to a given pose.
- Parameters
-
[in] | value | The camera pose as a 4x4 homogeneous transformation matrix in world coordinates. |
void gpu_coverage::RobotSceneConfiguration::setCount |
( |
const GLuint & |
count | ) |
|
|
inline |
Sets the total number of observed pixels so far.
- Returns
- Number of observed pixels.
- See also
- getCount()
void gpu_coverage::RobotSceneConfiguration::setRandomArticulation |
( |
unsigned int & |
seed | ) |
|
Sets a random articulated object to a random configuration and the other articulated objects to the zero configuration.
- Parameters
-
void gpu_coverage::RobotSceneConfiguration::setRandomCameraHeight |
( |
unsigned int & |
seed | ) |
|
Sets the camera height to a random value within the feasible range.
- Parameters
-
void gpu_coverage::RobotSceneConfiguration::setRandomCameraPosition |
( |
unsigned int & |
seed, |
|
|
const std::vector< glm::vec3 > *const |
targetPoints |
|
) |
| |
Sets the camera pose to a random pose with the camera facing a random point from targetPoints.
- Parameters
-
[in] | seed | Random seed. |
[in] | targetPoints | A list of 3D points in world coordinates |
The documentation for this class was generated from the following file: