Go to the documentation of this file. 1 #ifndef ED_SENSOR_INTEGRATION_FITTER_PLUGIN_H_
2 #define ED_SENSOR_INTEGRATION_FITTER_PLUGIN_H_
12 #include <image_geometry/pinhole_camera_model.h>
41 virtual const char*
what()
const throw ()
115 Fitter(
unsigned int nr_data_points,
float fx);
243 const geo::Pose3D &sensor_pose_xya,
const int expected_center_beam)
const;
void renderEntity(const ed::EntityConstPtr &e, const geo::Pose3D &sensor_pose_xya, int identifier, std::vector< double > &model_ranges, std::vector< int > &identifiers) const
renderEntity renders the entity in 2D using the beam model with the provided (2D) sensor pose....
EstimationInputData preProcessInputData(const ed::WorldModel &world, const ed::UUID &id, const geo::Pose3D &expected_pose, const FitterData &data) const
preProcessInputData pre-processes the inputs for the fitting algorithm, i.e., gets the shape of the e...
std::vector< std::vector< geo::Vec2 > > Shape2D
FitterError(const std::string &msg)
geo::Pose3D sensor_pose_xya
The FitterError class exception is thrown in case of errors in the fitter algorithm.
bool estimateEntityPose(const FitterData &data, const ed::WorldModel &world, const ed::UUID &id, const geo::Pose3D &expected_pose, geo::Pose3D &fitted_pose, double max_yaw_change=M_PI) const
estimateEntityPose performs the entity pose estimation. Basically, tries to call estimateEntityPoseIm...
The FitterData struct contains the downprojected (hence 2D) sensor readings as well as the sensor pos...
The EntityRepresentation2D struct contains the (downprojected) shape that is used for the fitting.
std::map< ed::UUID, EntityRepresentation2D > entity_shapes_
void checkExpectedBeamThroughEntity(const std::vector< double > &model_ranges, ed::EntityConstPtr entity, const geo::Pose3D &sensor_pose_xya, const int expected_center_beam) const
checkExpectedBeamThroughEntity checks if the expected center beam passes through the entity....
shared_ptr< const Entity > EntityConstPtr
unsigned int shape_revision
EntityRepresentation2D GetOrCreateEntity2D(const ed::EntityConstPtr &e) const
GetOrCreateEntity2D returns the downprojected shape of the entity. If it's already in the cache,...
Fitter(const image_geometry::PinholeCameraModel &cammodel)
Fitter constructor.
std::unique_ptr< OptimalFit > findOptimum(const EstimationInputData &input_data, const YawRange &yaw_range) const
findOptimum finds the 'optimal' fit by evaluating candidates over all beams and over the entire yaw r...
Shape2D get2DShape(ed::EntityConstPtr entity_ptr) const
get2DShape gets the downprojected, 2D shape from an entity
std::string error_message_
ed::models::ModelLoader model_loader_
void configureBeamModel(const image_geometry::PinholeCameraModel &cammodel)
configure the beam model (nr of data points and focal length) according to the camera you are using.
bool estimateEntityPoseImp(const FitterData &data, const ed::WorldModel &world, const ed::UUID &id, const geo::Pose3D &expected_pose, geo::Pose3D &fitted_pose, double max_yaw_change) const
estimateEntityPoseImp actual implementation of the entity pose estimation. Preprocess input data iter...
bool evaluateCandidate(const EstimationInputData &static_data, Candidate &candidate) const
evaluateCandidate renders the model, transform the model along the beam direction to get this distanc...
void processSensorData(const rgbd::Image &image, const geo::Pose3D &sensor_pose, FitterData &data) const
processSensorData pre-processes sensor data, i.e., performs a downprojection of the input depth image...
The Fitter class contains the algorithm to do the 2D fit of an entity.
geo::Pose3D sensor_pose_zrp
virtual const char * what() const
void renderWorldModel2D(const ed::WorldModel &world, const geo::Pose3D &sensor_pose_xya, const ed::UUID &skip_id, std::vector< double > &model_ranges, std::vector< int > &identifiers) const
renderWorldModel2D renders all world model entities
Fitter()
Fitter default constructor, must be configured later.
std::vector< double > sensor_ranges