0.18: Camera calibration and LaserScan Info refactoring (#324)

* Saving full camera calibration in database, added angle min/max/inc to LaserScan.

* Updated laserscan info save/load in db

* Database: added Tag table, added env_sensors field to Node

* fixed serialization/deserialization of stereo camera model

* fixed multi-calibration db saving

* fixed rebase errors

* Tango: Added saving environmental sensors option

* Memory: Save env sensors

* Tango: fixed env sensor ids

* DBViewer: show env sensors values

* DBViewer: added calibration details on tooltip

* increased package version to 0.18.0

* Fixed LaserScan copies when angleIncrement is valid

* fixed build error without OctoMap dependency
This commit is contained in:
matlabbe
2018-10-23 14:35:14 -04:00
committed by GitHub
parent 8701ae6de0
commit 8e99291e13
51 changed files with 2063 additions and 491 deletions

View File

@@ -438,6 +438,7 @@ void CameraTango::close()
fisheyeRectifyMapX_ = cv::Mat();
fisheyeRectifyMapY_ = cv::Mat();
lastKnownGPS_ = GPS();
lastEnvSensors_.clear();
originOffset_ = Transform();
originUpdate_ = false;
}
@@ -545,6 +546,11 @@ void CameraTango::setGPS(const GPS & gps)
lastKnownGPS_ = gps;
}
void CameraTango::addEnvSensor(int type, float value)
{
lastEnvSensors_.insert(std::make_pair((EnvSensor::Type)type, EnvSensor((EnvSensor::Type)type, value)));
}
rtabmap::Transform CameraTango::tangoPoseToTransform(const TangoPoseData * tangoPose) const
{
UASSERT(tangoPose);
@@ -907,6 +913,12 @@ SensorData CameraTango::captureImage(CameraInfo * info)
{
LOGD("GPS too old (current time=%f, gps time = %f)", rgbStamp, lastKnownGPS_.stamp());
}
if(lastEnvSensors_.size())
{
data.setEnvSensors(lastEnvSensors_);
lastEnvSensors_.clear();
}
}
else
{

View File

@@ -92,6 +92,7 @@ public:
void setRawScanPublished(bool enabled) {rawScanPublished_ = enabled;}
void setScreenRotation(TangoSupportRotation colorCameraToDisplayRotation) {colorCameraToDisplayRotation_ = colorCameraToDisplayRotation;}
void setGPS(const GPS & gps);
void addEnvSensor(int type, float value);
void cloudReceived(const cv::Mat & cloud, double timestamp);
void rgbReceived(const cv::Mat & tangoImage, int type, double timestamp);
@@ -130,6 +131,7 @@ private:
cv::Mat fisheyeRectifyMapX_;
cv::Mat fisheyeRectifyMapY_;
GPS lastKnownGPS_;
EnvSensors lastEnvSensors_;
Transform originOffset_;
bool originUpdate_;
};

View File

@@ -2064,6 +2064,14 @@ void RTABMapApp::setGPS(const rtabmap::GPS & gps)
}
}
void RTABMapApp::addEnvSensor(int type, float value)
{
if(camera_)
{
camera_->addEnvSensor(type, value);
}
}
void RTABMapApp::resetMapping()
{
LOGW("Reset!");

View File

@@ -148,6 +148,7 @@ class RTABMapApp : public UEventsHandler {
void setBackgroundColor(float gray);
int setMappingParameter(const std::string & key, const std::string & value);
void setGPS(const rtabmap::GPS & gps);
void addEnvSensor(int type, float value);
void resetMapping();
void save(const std::string & databasePath);

View File

@@ -357,6 +357,15 @@ Java_com_introlab_rtabmap_RTABMapLib_setGPS(
bearing));
}
JNIEXPORT void JNICALL
Java_com_introlab_rtabmap_RTABMapLib_addEnvSensor(
JNIEnv*, jobject,
int type,
float value)
{
return app.addEnvSensor(type, value);
}
JNIEXPORT void JNICALL
Java_com_introlab_rtabmap_RTABMapLib_resetMapping(
JNIEnv*, jobject)