31 #ifndef INCLUDE_ARTICULATION_ROBOTSCENECONFIGURATION_H_ 32 #define INCLUDE_ARTICULATION_ROBOTSCENECONFIGURATION_H_ 34 #include <gpu_coverage/AbstractRenderer.h> 35 #include <gpu_coverage/Node.h> 36 #include <glm/detail/type_mat4x4.hpp> 164 throw std::out_of_range(
"RobotSceneConfiguration::getArticulation index out of range");
179 throw std::out_of_range(
"RobotSceneConfiguration::setArticulation index out of range");
238 : constant(constant), linear(linear) {
static float maxCameraHeight
Maximum feasible camera height above ground, see loadCosts()
Definition: RobotSceneConfiguration.h:245
void setCameraLocalTransform(const glm::mat4x4 &cameraTransform)
Sets the camera to a given pose.
static float costDistance
Cost factor for moving the camera (Euclidean distance), see loadCosts()
Definition: RobotSceneConfiguration.h:243
float getCost(RobotSceneConfiguration &previousConfig) const
Computes the cost for transitioning from a previous configuration.
void setCameraHeight(const float &value)
Sets the camera height.
glm::vec3 cameraPosition
Camera position in world coordinates.
Definition: RobotSceneConfiguration.h:222
static float gainFactor
Coefficient for weighting the information gain relative to the costs, see loadCosts() ...
Definition: RobotSceneConfiguration.h:246
GLuint count
Total number of observed pixels so far.
Definition: RobotSceneConfiguration.h:224
static float minCameraHeight
Minimum feasible camera height above ground, see loadCosts()
Definition: RobotSceneConfiguration.h:244
Scene graph corresponding to Assimp's aiScene.
Definition: Scene.h:59
RobotSceneConfiguration()
Constructor.
float * articulation
Array current of articulation positions.
Definition: RobotSceneConfiguration.h:223
virtual ~RobotSceneConfiguration()
Destructor.
float constant
Constant cost factor for manipulating the object.
Definition: RobotSceneConfiguration.h:230
Definition: RandomSearchTask.h:47
void applyToScene(Scene *const scene) const
Applies the articulation configuration to the scene and re-computes the scene graph transformations...
void setRandomCameraHeight(unsigned int &seed)
Sets the camera height to a random value within the feasible range.
float linear
Linear cost factor for manipulating the object.
Definition: RobotSceneConfiguration.h:231
void setCount(const GLuint &count)
Sets the total number of observed pixels so far.
Definition: RobotSceneConfiguration.h:199
float getEvaluation(RobotSceneConfiguration &previousConfig) const
Returns the evaluation of the current config.
Definition: RobotSceneConfiguration.h:93
float getGain(RobotSceneConfiguration &previousConfig) const
Calculates the information gain achieved by moving to the new configuration.
void setRandomArticulation(unsigned int &seed)
Sets a random articulated object to a random configuration and the other articulated objects to the z...
const glm::mat4x4 & getCameraLocalTransform() const
Returns the camera pose.
Definition: RobotSceneConfiguration.h:145
Linear cost function for manipulating an articulated scene object.
Definition: RobotSceneConfiguration.h:229
Definition: AbstractCamera.h:41
static size_t numArticulation
The maximum number of articulated objects, hard-coded to 20.
Definition: RobotSceneConfiguration.h:218
glm::mat4x4 cameraLocalTransform
Camera pose as homogeneous transformation matrix in world coordinates.
Definition: RobotSceneConfiguration.h:221
static ArticulationCost * costArticulation
Linear cost function for changing articulation, see loadCosts()
Definition: RobotSceneConfiguration.h:247
static float costCameraHeightChange
Cost factor for changing the height of the camera, see loadCosts()
Definition: RobotSceneConfiguration.h:242
Represents a combined configuration of the robot and the articulation objects.
Definition: RobotSceneConfiguration.h:45
ArticulationCost(const float &constant=0.0f, const float &linear=0.0f)
Constructor.
Definition: RobotSceneConfiguration.h:237
float getArticulation(const size_t &handle) const
Returns the current articulation pose for a given articulated object.
Definition: RobotSceneConfiguration.h:161
void 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.
Definition: HillclimbingTask.h:51
const GLuint & getCount() const
Returns the total number of observed pixels so far.
Definition: RobotSceneConfiguration.h:190
static void loadCosts()
Load the cost coefficients and feasible ranges from the configuration file.
void setArticulation(const size_t &handle, const float &value)
Sets the current articulation pose for a given articulated object.
Definition: RobotSceneConfiguration.h:176