bool RosUi::services_b(rgbd_slam::rgbdslam_ros_ui_b::Request &req, rgbd_slam::rgbdslam_ros_ui_b::Response &res ) { ROS_INFO_STREAM("Got Service Request. Command: " << req.command << ". Value: " << ( req.value ? "True" : "False")); if (req.command == "pause" ){ pause(req.value); } else if(req.command == "record" ){ bagRecording(req.value); } else if(req.command == "mapping" ){ Q_EMIT toggleMapping(req.value); } else if(req.command == "store_pointclouds"){ toggleCloudStorage(req.value); } else{ ROS_ERROR("Invalid service call commands: %s", req.command.c_str()); ROS_ERROR("Valid commands are: {pause, record, mapping, store_pointclouds}"); return false; } return true; }
void Graphical_UI::toggleMappingPriv(bool mapping_on) { Q_EMIT toggleMapping(mapping_on); }