Export: fixed calibration not exported if camera name is not set. For multi-camera, added index suffix to yaml.

This commit is contained in:
matlabbe
2021-04-09 16:20:08 -04:00
parent b92f55be43
commit f4207979ad
3 changed files with 15 additions and 4 deletions

View File

@@ -366,7 +366,11 @@ bool CameraModel::load(const std::string & directory, const std::string & camera
bool CameraModel::save(const std::string & directory) const
{
std::string filePath = directory+"/"+name_+".yaml";
if(name_.empty())
{
UWARN("Camera name is empty, will use general \"camera\" as name.");
}
std::string filePath = directory+"/"+(name_.empty()?"camera":name_)+".yaml";
if(!filePath.empty() && (!K_.empty() || !D_.empty() || !R_.empty() || !P_.empty()))
{
UINFO("Saving calibration to file \"%s\"", filePath.c_str());

View File

@@ -354,7 +354,7 @@ void OccupancyGrid::createLocalMap(
}
else
{
UWARN("Cannot create local map, scan is empty (node=%d).", node.id());
UWARN("Cannot create local map, scan is empty (node=%d, %s=false).", node.id(), Parameters::kGridFromDepth().c_str());
}
}
else