| 265 | } |
| 266 | |
| 267 | void 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 | |
| 300 | void OPTCalibrationNode::spin() |
| 301 | { |
nothing calls this directly
no test coverage detected