MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / actionCallback

Method actionCallback

opt_calibration/src/opt_calibration_node.cpp:267–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void OPTCalibrationNode::actionCallback(const std_msgs::String::ConstPtr & msg)
268{
269 if (msg->data == "save" or msg->data == "saveExtrinsicCalibration")
270 {
271 ROS_INFO("Saving calibration results...");
272 calibration_->optimize();
273 save();
274 }
275 else if (msg->data == "start floor")
276 {
277 if (calibration_->floorAcquisition())
278 {
279 ROS_WARN("Floor acquisition already started.");
280 }
281 else
282 {
283 ROS_INFO("Floor acquisition started.");
284 calibration_->startFloorAcquisition();
285 }
286 }
287 else if (msg->data == "stop floor")
288 {
289 if (not calibration_->floorAcquisition())
290 ROS_WARN("Floor acquisition not started.");
291 else
292 calibration_->stopFloorAcquisition();
293 }
294 else
295 {
296 ROS_ERROR_STREAM("Unknown action: \"" << msg->data << "\"!");
297 }
298}
299
300void OPTCalibrationNode::spin()
301{

Callers

nothing calls this directly

Calls 4

optimizeMethod · 0.80
floorAcquisitionMethod · 0.80
startFloorAcquisitionMethod · 0.80
stopFloorAcquisitionMethod · 0.80

Tested by

no test coverage detected