Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2 fixes #1425

Merged
merged 5 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions cmake/GtsamPrinting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
# 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()
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})

endfunction()
4 changes: 0 additions & 4 deletions cmake/HandleTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions gtsam/slam/InitializePose3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ Values InitializePose3::computeOrientationsGradient(
// Return correct rotations
const Rot3& Rref = inverseRot.at(initialize::kAnchorKey); // This will be set to the identity as so far we included no prior
Values estimateRot;
for (const auto& key_R : inverseRot) {
for (const auto& key_R : inverseRot) {
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());
Expand Down
10 changes: 8 additions & 2 deletions gtsam_unstable/examples/SmartRangeExample_plaza1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

10 changes: 8 additions & 2 deletions gtsam_unstable/examples/SmartRangeExample_plaza2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}