ed_sensor_integration
Classes | Functions | Variables
test_furniture_fit.cpp File Reference
#include <gtest/gtest.h>
#include <math.h>
#include <iostream>
#include <opencv2/highgui/highgui.hpp>
#include <image_geometry/pinhole_camera_model.h>
#include <ros/console.h>
#include <ros/package.h>
#include <sensor_msgs/CameraInfo.h>
#include <sensor_msgs/distortion_models.h>
#include <ed/entity.h>
#include <ed/world_model.h>
#include <ed/models/model_loader.h>
#include <ed/update_request.h>
#include <ed/rendering.h>
#include <ed/uuid.h>
#include <ed/relations/transform_cache.h>
#include <geolib/Shape.h>
#include <geolib/sensors/DepthCamera.h>
#include <rgbd/image.h>
#include "tue/config/reader_writer.h"
#include "tue/config/loaders/sdf.h"
#include <ed/kinect/fitter.h>
Include dependency graph for test_furniture_fit.cpp:

Go to the source code of this file.

Classes

struct  EulerAngles
 
class  FurnitureFitTest
 
struct  ImageResolution
 
struct  Quaternion
 
class  TestSetup
 The TestSetup class contains all constant data for the test. More...
 

Functions

double degToRad (double input)
 degToRad converts degrees to radians More...
 
bool fitSupportingEntity (const rgbd::Image *image, const geo::Pose3D &sensor_pose, const ed::WorldModel &wm, const ed::UUID &entity_id, const double max_yaw_change, const Fitter &fitter, geo::Pose3D &new_pose)
 fitSupportingEntity fits a supporting entity More...
 
sensor_msgs::CameraInfo getDefaultCamInfo (const ImageResolution &resolution)
 
double getYaw (const geo::Mat3 &rotation)
 
int main (int argc, char **argv)
 
void moveFurnitureObject (const ed::UUID &id, const geo::Pose3D &new_pose, ed::WorldModel &wm)
 
void summarizeResult (std::vector< geo::Pose3D > &succeeded_poses, std::vector< geo::Pose3D > &failed_poses)
 
 TEST_F (FurnitureFitTest, testCase)
 
EulerAngles ToEulerAngles (Quaternion q)
 

Variables

const uint CAM_RESOLUTION_HEIGHT = 480
 
const uint CAM_RESOLUTION_WIDTH = 640
 
const double MAX_POSITION_ERROR = 0.05
 
const double MAX_YAW_ERROR_DEGREES = 5.0
 
const uint NR_SUCCEEDED_POSES = 1089 - 106
 
const uint NR_TEST_POSES = 1089
 
bool SHOW_DEBUG_IMAGES = false
 

Function Documentation

◆ degToRad()

double degToRad ( double  input)

degToRad converts degrees to radians

Parameters
input
Returns

Definition at line 103 of file test_furniture_fit.cpp.

◆ fitSupportingEntity()

bool fitSupportingEntity ( const rgbd::Image image,
const geo::Pose3D sensor_pose,
const ed::WorldModel wm,
const ed::UUID entity_id,
const double  max_yaw_change,
const Fitter fitter,
geo::Pose3D new_pose 
)

fitSupportingEntity fits a supporting entity

Parameters
imagedepth image
sensor_posepose of the camera when the image was taken
wmcurrent world model
entity_idid of the entity that will be fitted
max_yaw_changemax angle change
fitter
new_pose
Returns
success

Definition at line 150 of file test_furniture_fit.cpp.

◆ getDefaultCamInfo()

sensor_msgs::CameraInfo getDefaultCamInfo ( const ImageResolution resolution)

Definition at line 115 of file test_furniture_fit.cpp.

◆ getYaw()

double getYaw ( const geo::Mat3 rotation)

Definition at line 78 of file test_furniture_fit.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 407 of file test_furniture_fit.cpp.

◆ moveFurnitureObject()

void moveFurnitureObject ( const ed::UUID id,
const geo::Pose3D new_pose,
ed::WorldModel wm 
)

Definition at line 131 of file test_furniture_fit.cpp.

◆ summarizeResult()

void summarizeResult ( std::vector< geo::Pose3D > &  succeeded_poses,
std::vector< geo::Pose3D > &  failed_poses 
)

Definition at line 374 of file test_furniture_fit.cpp.

◆ TEST_F()

TEST_F ( FurnitureFitTest  ,
testCase   
)

Definition at line 389 of file test_furniture_fit.cpp.

◆ ToEulerAngles()

EulerAngles ToEulerAngles ( Quaternion  q)

Definition at line 54 of file test_furniture_fit.cpp.

Variable Documentation

◆ CAM_RESOLUTION_HEIGHT

const uint CAM_RESOLUTION_HEIGHT = 480

Definition at line 31 of file test_furniture_fit.cpp.

◆ CAM_RESOLUTION_WIDTH

const uint CAM_RESOLUTION_WIDTH = 640

Definition at line 30 of file test_furniture_fit.cpp.

◆ MAX_POSITION_ERROR

const double MAX_POSITION_ERROR = 0.05

Definition at line 33 of file test_furniture_fit.cpp.

◆ MAX_YAW_ERROR_DEGREES

const double MAX_YAW_ERROR_DEGREES = 5.0

Definition at line 34 of file test_furniture_fit.cpp.

◆ NR_SUCCEEDED_POSES

const uint NR_SUCCEEDED_POSES = 1089 - 106

Definition at line 39 of file test_furniture_fit.cpp.

◆ NR_TEST_POSES

const uint NR_TEST_POSES = 1089

Definition at line 38 of file test_furniture_fit.cpp.

◆ SHOW_DEBUG_IMAGES

bool SHOW_DEBUG_IMAGES = false

Definition at line 41 of file test_furniture_fit.cpp.