ed_sensor_integration
include
ed
kinect
kinect/updater.h
Go to the documentation of this file.
1
#ifndef ED_KINECT_UPDATER_H_
2
#define ED_KINECT_UPDATER_H_
3
4
#include "
ed/kinect/fitter.h
"
5
#include "
ed/kinect/segmenter.h
"
6
#include "
ed/kinect/entity_update.h
"
7
8
#include <
string
>
9
#include <
tue/config/configuration.h
>
10
11
#include <
map
>
12
#include <
vector
>
13
// ----------------------------------------------------------------------------------------------------
14
15
struct
UpdateRequest
16
{
17
UpdateRequest
() :
background_padding
(0),
max_yaw_change
(M_PI) {}
18
19
// Symbolic description of area to be updated (e.g. "on_top_of cabinet")
20
std::string
area_description
;
21
22
// When applying background removal, amount of padding given to the world model (the more padding
23
// the points are 'cut away')
24
double
background_padding
;
25
26
// When refitting an entity, this states the maximum change in yaw (in radians), i.e., the fitted
27
// yaw will deviate at most 'max_yaw_change' from the estimated yaw
28
double
max_yaw_change
;
29
30
// Should the supporting entity be fitted
31
bool
fit_supporting_entity
;
32
};
33
34
// ----------------------------------------------------------------------------------------------------
35
36
struct
UpdateResult
37
{
38
UpdateResult
(
ed::UpdateRequest
& update_req_) :
update_req
(update_req_) {}
39
40
std::vector<EntityUpdate>
entity_updates
;
41
std::vector<ed::UUID>
removed_entity_ids
;
42
ed::UpdateRequest
&
update_req
;
43
std::stringstream
error
;
44
};
45
46
// ----------------------------------------------------------------------------------------------------
47
48
class
Updater
49
{
50
51
public
:
52
53
Updater
(
tue::Configuration
config
);
54
55
~Updater
();
56
57
bool
update
(
const
ed::WorldModel
& world,
const
rgbd::ImageConstPtr
&
image
,
const
geo::Pose3D
& sensor_pose,
58
const
UpdateRequest
&
req
,
UpdateResult
& res);
59
60
private
:
61
62
Fitter
fitter_
;
63
64
std::unique_ptr<Segmenter>
segmenter_
;
65
66
// Stores for each segmented entity with which area description it was found
67
std::map<ed::UUID, std::string>
id_to_area_description_
;
68
69
//For displaying SAM MASK
70
ros::Publisher
mask_pub_
;
71
ros::Publisher
cloud_pub_
;
72
bool
logging
;
73
74
};
75
76
#endif
UpdateResult::update_req
ed::UpdateRequest & update_req
Definition:
kinect/updater.h:42
ed::UpdateRequest
std::string
std::shared_ptr
vector
std::stringstream
geo::Transform3T
UpdateRequest::background_padding
double background_padding
Definition:
kinect/updater.h:24
image
cv::Mat image
UpdateResult::entity_updates
std::vector< EntityUpdate > entity_updates
Definition:
kinect/updater.h:40
tue::config::ReaderWriter
segmenter.h
Updater
Definition:
kinect/updater.h:48
Updater::~Updater
~Updater()
Definition:
kinect/updater.cpp:231
UpdateResult::error
std::stringstream error
Definition:
kinect/updater.h:43
Updater::Updater
Updater(tue::Configuration config)
Definition:
kinect/updater.cpp:207
Updater::cloud_pub_
ros::Publisher cloud_pub_
Definition:
kinect/updater.h:71
req
string req
Updater::fitter_
Fitter fitter_
Definition:
kinect/updater.h:62
UpdateRequest::UpdateRequest
UpdateRequest()
Definition:
kinect/updater.h:17
map
UpdateRequest::area_description
std::string area_description
Definition:
kinect/updater.h:20
ed::WorldModel
UpdateResult::removed_entity_ids
std::vector< ed::UUID > removed_entity_ids
Definition:
kinect/updater.h:41
UpdateRequest::max_yaw_change
double max_yaw_change
Definition:
kinect/updater.h:28
configuration.h
entity_update.h
Updater::update
bool update(const ed::WorldModel &world, const rgbd::ImageConstPtr &image, const geo::Pose3D &sensor_pose, const UpdateRequest &req, UpdateResult &res)
Definition:
kinect/updater.cpp:237
UpdateRequest::fit_supporting_entity
bool fit_supporting_entity
Definition:
kinect/updater.h:31
UpdateRequest
Definition:
kinect/updater.h:15
fitter.h
Updater::mask_pub_
ros::Publisher mask_pub_
Definition:
kinect/updater.h:70
UpdateResult::UpdateResult
UpdateResult(ed::UpdateRequest &update_req_)
Definition:
kinect/updater.h:38
Fitter
The Fitter class contains the algorithm to do the 2D fit of an entity.
Definition:
fitter.h:100
std::unique_ptr< Segmenter >
Updater::logging
bool logging
Definition:
kinect/updater.h:72
Updater::id_to_area_description_
std::map< ed::UUID, std::string > id_to_area_description_
Definition:
kinect/updater.h:67
Updater::segmenter_
std::unique_ptr< Segmenter > segmenter_
Definition:
kinect/updater.h:64
UpdateResult
Definition:
kinect/updater.h:36
config
tue::config::ReaderWriter config
string
Generated on Wed Jan 14 2026 05:00:21 for ed_sensor_integration by
1.8.17