Skip to content

Commit 18b5bb5

Browse files
rwc2022: supporting entity (#69)
2 parents d9ec66e + 2a898da commit 18b5bb5

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

ed_sensor_integration/include/ed/kinect/updater.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ struct UpdateRequest
2424
// When refitting an entity, this states the maximum change in yaw (in radians), i.e., the fitted
2525
// yaw will deviate at most 'max_yaw_change' from the estimated yaw
2626
double max_yaw_change;
27+
28+
// Should the supporting entity be fitted
29+
bool fit_supporting_entity;
2730
};
2831

2932
// ----------------------------------------------------------------------------------------------------

ed_sensor_integration/src/kinect/kinect_plugin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ bool KinectPlugin::srvUpdate(ed_sensor_integration_msgs::Update::Request& req, e
167167
UpdateRequest kinect_update_req;
168168
kinect_update_req.area_description = req.area_description;
169169
kinect_update_req.background_padding = req.background_padding;
170+
kinect_update_req.fit_supporting_entity = req.fit_supporting_entity;
170171

171172
// We expect the orientation of the supporting entity to be approximately correct.
172173
// Therefore, only allow rotation updates up to 45 degrees (both clock-wise and anti-clock-wise)

ed_sensor_integration/src/kinect/ray_tracer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ RayTraceResult ray_trace(const ed::WorldModel& world, const geo::Pose3D& raytrac
6767
res.active_entity_ = e->id().str();
6868
for (const auto& volume : e->volumes())
6969
{
70-
std::string name = volume.first;
71-
geo::ShapeConstPtr shape = volume.second;
70+
const std::string& name = volume.first;
71+
const geo::ShapeConstPtr& shape = volume.second;
7272
if (name == "on_top_of")
7373
{
7474
ROS_DEBUG("Raytrace on_top_of array of %s included", e->id().c_str());

ed_sensor_integration/src/kinect/updater.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ bool Updater::update(const ed::WorldModel& world, const rgbd::ImageConstPtr& ima
225225
// Check if the update_command is a segmented entity.
226226
// If so, lookup the corresponding area_description
227227

228-
bool fit_supporting_entity = true;
228+
bool fit_supporting_entity = req.fit_supporting_entity;
229229

230230
std::map<ed::UUID, std::string>::const_iterator it_area_descr = id_to_area_description_.find(req.area_description);
231231
if (it_area_descr != id_to_area_description_.end())

ed_sensor_integration_msgs/srv/Update.srv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ string area_description
1212
# Padding of the world model when subtracting background for segmentation (in meters)
1313
float32 background_padding
1414

15+
# Should the supporting entity be fitted
16+
bool fit_supporting_entity
17+
1518
---
1619
string[] new_ids # ids of new entities
1720
string[] updated_ids # ids of updated entities

0 commit comments

Comments
 (0)