Skip to content
Snippets Groups Projects
Commit 76b2a4e0 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Minor temporary changes

parent 52f0f7b8
No related branches found
No related tags found
1 merge request!23Feature/gui implements #53
Pipeline #11110 passed
......@@ -183,8 +183,9 @@ class FTLApplication : public nanogui::Screen {
new Label(window, "Select source","sans-bold");
auto available = net->findAll<string>("list_streams");
auto select = new ComboBox(window, available);
select->setCallback([this,&available](int ix) {
select->setCallback([this,available](int ix) {
LOG(INFO) << "Change source: " << ix;
});
setVisible(true);
......
......@@ -29,6 +29,7 @@ class NetSource : public RGBDSource {
}
void setPose(const Eigen::Matrix4f &pose);
void setURI(const std::string &uri);
private:
bool has_calibration_;
......
......@@ -30,6 +30,7 @@ class RGBDSource : public ftl::Configurable {
const CameraParameters &getParameters() { return params_; };
std::string getURI() const { return config_["uri"].get<std::string>(); }
virtual void setURI(const std::string &uri);
virtual void setPose(const Eigen::Matrix4f &pose) { pose_ = pose; };
const Eigen::Matrix4f &getPose() { return pose_; };
......
......@@ -85,6 +85,11 @@ void NetSource::setPose(const Eigen::Matrix4f &pose) {
RGBDSource::setPose(pose);
}
void NetSource::setURI(const std::string &uri) {
RGBDSource::setURI(uri);
has_calibration_ = _getCalibration(*net_, peer_, getURI(), params_);
}
void NetSource::grab() {
// net_.broadcast("grab");
}
......
......@@ -24,6 +24,10 @@ bool RGBDSource::isReady() {
return false;
}
void RGBDSource::setURI(const std::string &uri) {
config_["uri"] = uri;
}
void RGBDSource::getRGBD(cv::Mat &rgb, cv::Mat &depth) {
unique_lock<mutex> lk(mutex_);
rgb_.copyTo(rgb);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment