void TransformableMarkerOperatorAction::insertCylinderService(){ jsk_rviz_plugins::RequestMarkerOperate operator_srv; operator_srv.request.operate.type = jsk_rviz_plugins::TransformableMarkerOperate::CYLINDER; operator_srv.request.operate.action = jsk_rviz_plugins::TransformableMarkerOperate::INSERT; operator_srv.request.operate.name = name_editor_->text().toStdString(); operator_srv.request.operate.description = description_editor_->text().toStdString(); operator_srv.request.operate.frame_id = frame_editor_->text().toStdString(); callRequestMarkerOperateService(operator_srv); };
void TransformableMarkerOperatorAction::insertMeshService() { int current_index = object_editor_->currentIndex(); if (!(0 <= current_index && current_index < objects_.size())) { ROS_ERROR("Invalid index for object selection: %d. Please select again.", current_index); return; } jsk_recognition_msgs::Object object = objects_[current_index]; if (object.mesh_resource.empty()) { ROS_ERROR("Mesh resource of object '%s' is empty, so skipping.", object.name.c_str()); return; } jsk_rviz_plugins::RequestMarkerOperate operator_srv; operator_srv.request.operate.type = jsk_rviz_plugins::TransformableMarkerOperate::MESH_RESOURCE; operator_srv.request.operate.action = jsk_rviz_plugins::TransformableMarkerOperate::INSERT; operator_srv.request.operate.name = object.name; operator_srv.request.operate.description = description_editor_->text().toStdString(); operator_srv.request.operate.frame_id = frame_editor_->text().toStdString(); operator_srv.request.operate.mesh_resource = object.mesh_resource; operator_srv.request.operate.mesh_use_embedded_materials = true; callRequestMarkerOperateService(operator_srv); };
void TransformableMarkerOperatorAction::eraseFocusService(){ jsk_rviz_plugins::RequestMarkerOperate operator_srv; operator_srv.request.operate.action = jsk_rviz_plugins::TransformableMarkerOperate::ERASEFOCUS; callRequestMarkerOperateService(operator_srv); };
void TransformableMarkerOperatorAction::eraseWithIdService(){ jsk_rviz_plugins::RequestMarkerOperate operator_srv; operator_srv.request.operate.action = jsk_rviz_plugins::TransformableMarkerOperate::ERASE; operator_srv.request.operate.name = id_editor_->text().toStdString(); callRequestMarkerOperateService(operator_srv); };