Merge pull request #1425 from borglab/fixes

release/4.3a0
Frank Dellaert 2023-01-28 16:24:21 -08:00 committed by GitHub
commit f09546f134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 17 deletions

View File

@ -51,11 +51,10 @@ function(print_build_options_for_target target_name_)
# print_padded(GTSAM_COMPILE_DEFINITIONS_PRIVATE)
print_padded(GTSAM_COMPILE_DEFINITIONS_PUBLIC)
foreach(build_type ${GTSAM_CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${build_type}" build_type_toupper)
string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type_toupper)
# print_padded(GTSAM_COMPILE_OPTIONS_PRIVATE_${build_type_toupper})
print_padded(GTSAM_COMPILE_OPTIONS_PUBLIC_${build_type_toupper})
# print_padded(GTSAM_COMPILE_DEFINITIONS_PRIVATE_${build_type_toupper})
print_padded(GTSAM_COMPILE_DEFINITIONS_PUBLIC_${build_type_toupper})
endforeach()
endfunction()

View File

@ -7,10 +7,6 @@ if (GTSAM_WITH_TBB)
if(TBB_FOUND)
set(GTSAM_USE_TBB 1) # This will go into config.h
# if ((${TBB_VERSION} VERSION_GREATER "2021.1") OR (${TBB_VERSION} VERSION_EQUAL "2021.1"))
# message(FATAL_ERROR "TBB version greater than 2021.1 (oneTBB API) is not yet supported. Use an older version instead.")
# endif()
if ((${TBB_VERSION_MAJOR} GREATER 2020) OR (${TBB_VERSION_MAJOR} EQUAL 2020))
set(TBB_GREATER_EQUAL_2020 1)
else()

View File

@ -210,7 +210,7 @@ Values InitializePose3::computeOrientationsGradient(
const Key& key = key_R.first;
if (key != initialize::kAnchorKey) {
const Rot3& R = key_R.second;
if(setRefFrame)
if (setRefFrame)
estimateRot.insert(key, Rref.compose(R.inverse()));
else
estimateRot.insert(key, R.inverse());

View File

@ -234,8 +234,11 @@ int main(int argc, char** argv) {
}
}
countK = 0;
for (const auto& [key, point] : result.extract<Point2>())
for (const auto& key_point : result.extract<Point2>()) {
auto key = key_point.first;
const Point2 point = key_point.second;
os2 << key << "\t" << point.x() << "\t" << point.y() << "\t1" << endl;
}
if (smart) {
for(size_t jj: ids) {
Point2 landmark = smartFactors[jj]->triangulate(result);
@ -256,8 +259,11 @@ int main(int argc, char** argv) {
// Write result to file
Values result = isam.calculateEstimate();
ofstream os("rangeResult.txt");
for (const auto& [key, pose] : result.extract<Pose2>())
for (const auto& key_pose : result.extract<Pose2>()) {
auto key = key_pose.first;
const Pose2 pose = key_pose.second;
os << key << "\t" << pose.x() << "\t" << pose.y() << "\t" << pose.theta() << endl;
}
exit(0);
}

View File

@ -202,11 +202,17 @@ int main(int argc, char** argv) {
// Write result to file
Values result = isam.calculateEstimate();
ofstream os2("rangeResultLM.txt");
for (const auto& [key, point] : result.extract<Point2>())
for (const auto& key_point : result.extract<Point2>()) {
auto key = key_point.first;
const Point2 point = key_point.second;
os2 << key << "\t" << point.x() << "\t" << point.y() << "\t1" << endl;
}
ofstream os("rangeResult.txt");
for (const auto& [key, pose] : result.extract<Pose2>())
for (const auto& key_pose : result.extract<Pose2>()) {
auto key = key_pose.first;
const Pose2 pose = key_pose.second;
os << key << "\t" << pose.x() << "\t" << pose.y() << "\t" << pose.theta() << endl;
}
exit(0);
}