Skip to content

Commit 40b3710

Browse files
maciek-slonetsardou
authored andcommitted
Fix missing service advertisement
1 parent 0b2cc12 commit 40b3710

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rapp_hazard_detection/src/hazard_detection.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ HazardDetection::HazardDetection(void)
2929
// Creating the service server concerning the light_check functionality
3030
lightCheckService_ = nh_.advertiseService(lightCheckTopic_,
3131
&HazardDetection::lightCheckCallback, this);
32+
33+
// Fetching the service topic URI parameter
34+
if(!nh_.getParam("/rapp_hazard_detection_door_check_topic", doorCheckTopic_))
35+
{
36+
ROS_ERROR("Door check topic param does not exist");
37+
}
38+
39+
// Creating the service server concerning the door_check functionality
40+
doorCheckService_ = nh_.advertiseService(doorCheckTopic_,
41+
&HazardDetection::doorCheckCallback, this);
3242
}
3343

3444
bool HazardDetection::lightCheckCallback(

0 commit comments

Comments
 (0)