Skip to content
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
7 changes: 7 additions & 0 deletions docs/docs_src/read_the_docs/9_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ Smaller fixes are not listed here; see the [commit history](https://github.com/l

## 2026

### October 2026: Remove the holistic yaw factor (PR #56)

* **`addUnaryYawAbsoluteMeasurement()` is again the classic yaw factor.** It constrains the yaw of the sensor frame in the world
frame and ignores the fixed frame of the measurement. The holistic variant through the fixed-frame alignment and
`addUnaryYawAbsoluteClassicMeasurement()` are removed. A yaw in a tilted fixed frame has no clear meaning. For an orientation
measurement in a fixed frame, use `addUnaryHeadingAbsoluteMeasurement()`.

### October 2026: Heading factor (PR #55)

* **New `addUnaryHeadingAbsoluteMeasurement()`** (holistic interface). It takes the measured orientation of the sensor frame and
Expand Down
3 changes: 0 additions & 3 deletions holistic_fusion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ if(BUILD_TESTING)
add_executable(yaw_factor_test tests/test_yaw_factor.cpp)
target_link_libraries(yaw_factor_test PRIVATE holistic_fusion)
add_test(NAME yaw_factor_test COMMAND yaw_factor_test)
add_executable(holistic_yaw_expression_test tests/test_holistic_yaw_expression.cpp)
target_link_libraries(holistic_yaw_expression_test PRIVATE holistic_fusion)
add_test(NAME holistic_yaw_expression_test COMMAND holistic_yaw_expression_test)
add_executable(heading_expression_test tests/test_heading_expression.cpp)
target_link_libraries(heading_expression_test PRIVATE holistic_fusion)
add_test(NAME heading_expression_test COMMAND heading_expression_test)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ class HolisticFusionClassic : virtual public HolisticFusion {
//// Absolute Measurements
void addUnaryRollAbsoluteMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& roll_F_S) override;
void addUnaryPitchAbsoluteMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& pitch_F_S) override;
// Constrains the yaw of the sensor frame in the world frame, independent of the measurement's fixed frame. The
// holistic addUnaryYawAbsoluteMeasurement() goes through the fixed-frame alignment.
void addUnaryYawAbsoluteClassicMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& yaw_W_S);
// Constrains the yaw of the sensor frame in the world frame, independent of the measurement's fixed frame
void addUnaryYawAbsoluteMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& yaw_W_S) override;

/// Binary Measurements
void addBinaryPose3Measurement(const BinaryMeasurementXD<Eigen::Isometry3d, 6>& F_T_F_S) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@ class HolisticFusionHolistic : virtual public HolisticFusion {
void addUnaryPose3AbsoluteMeasurement(const UnaryMeasurementXDAbsolute<Eigen::Isometry3d, 6>& R_T_R_S,
const bool addToOnlineSmootherFlag = true) override;
void addUnaryPosition3AbsoluteMeasurement(UnaryMeasurementXDAbsolute<Eigen::Vector3d, 3>& R_t_R_S) override;
// In a fixed frame other than the world frame, the yaw goes through the alignment keyframe of that frame. Only a position or pose
// measurement of the same frame creates that keyframe, so add it first. The yaw measurement is skipped with a warning while the frame
// has no keyframe.
// TODO: Add a joint yaw and position measurement, which creates the keyframe itself.
void addUnaryYawAbsoluteMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& R_yaw_R_S) override;
// Constrains the rotation about the z-axis of the world between the estimated and the measured orientation R_M_S of the sensor frame
// in its fixed frame M. Unlike the yaw, it is defined for every attitude and leaves roll and pitch to the other measurements. Same
// fixed-frame keyframe requirement as the yaw.
// in its fixed frame M. Unlike the yaw, it is defined for every attitude and leaves roll and pitch to the other measurements.
// In a fixed frame other than the world frame, the heading goes through the alignment keyframe of that frame. Only a position or pose
// measurement of the same frame creates that keyframe, so add it first. The heading measurement is skipped with a warning while the
// frame has no keyframe.
void addUnaryHeadingAbsoluteMeasurement(const UnaryMeasurementXDAbsolute<Eigen::Matrix3d, 1>& R_M_S);
void addUnaryVelocity3AbsoluteMeasurement(UnaryMeasurementXDAbsolute<Eigen::Vector3d, 3>& R_v_R_S) override;
//// Local Measurements: Fully Local
Expand Down
2 changes: 1 addition & 1 deletion holistic_fusion/src/lib/HolisticFusionClassic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ HolisticFusionClassic::HolisticFusionClassic() {
}

// Unary ----------------------------
void HolisticFusionClassic::addUnaryYawAbsoluteClassicMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& yaw_W_frame) {
void HolisticFusionClassic::addUnaryYawAbsoluteMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& yaw_W_frame) {
// Only take actions if graph has been initialized
if (!initedGraphFlag_) {
return;
Expand Down
41 changes: 0 additions & 41 deletions holistic_fusion/src/lib/HolisticFusionHolistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Please see the LICENSE file that has been included as part of this package.
#include "holistic_fusion/factors/gmsf_expression/GmsfUnaryExpressionAbsoluteHeading.h"
#include "holistic_fusion/factors/gmsf_expression/GmsfUnaryExpressionAbsolutePose3.h"
#include "holistic_fusion/factors/gmsf_expression/GmsfUnaryExpressionAbsolutePosition3.h"
#include "holistic_fusion/factors/gmsf_expression/GmsfUnaryExpressionAbsoluteYaw.h"
/// Local
#include "holistic_fusion/factors/gmsf_expression/GmsfUnaryExpressionLocalVelocity3.h"

Expand Down Expand Up @@ -124,46 +123,6 @@ void HolisticFusionHolistic::addUnaryPosition3AbsoluteMeasurement(
}
}

void HolisticFusionHolistic::addUnaryYawAbsoluteMeasurement(const UnaryMeasurementXDAbsolute<double, 1>& fixedFrame_yaw_fixedFrame_sensorFrame) {
// Valid measurement received
if (!validFirstMeasurementReceivedFlag_) {
validFirstMeasurementReceivedFlag_ = true;
}

// Only take actions if graph has been initialized
if (!initedGraphFlag_) {
return;
}

// Check for covariance violation
bool covarianceViolatedFlag = isCovarianceViolated_<1>(fixedFrame_yaw_fixedFrame_sensorFrame.unaryMeasurementNoiseDensity(),
fixedFrame_yaw_fixedFrame_sensorFrame.covarianceViolationThreshold());
if (checkAndPrintCovarianceViolation_(fixedFrame_yaw_fixedFrame_sensorFrame.measurementName(), covarianceViolatedFlag)) {
return;
}

if (!hasAlignmentKeyframeForMeasurementWithoutPosition_(fixedFrame_yaw_fixedFrame_sensorFrame)) {
return;
}

// Create GMSF expression
auto gmsfUnaryExpressionYawPtr = std::make_shared<GmsfUnaryExpressionAbsoluteYaw>(
std::make_shared<UnaryMeasurementXDAbsolute<double, 1>>(fixedFrame_yaw_fixedFrame_sensorFrame), staticTransformsPtr_->getImuFrame(),
staticTransformsPtr_->rv_T_frame1_frame2(staticTransformsPtr_->getImuFrame(),
fixedFrame_yaw_fixedFrame_sensorFrame.sensorFrameName()),
graphConfigPtr_->createReferenceAlignmentKeyframeEveryNSeconds_);

// Add factor to graph
graphMgrPtr_->addUnaryHolisticFactor<GmsfUnaryExpressionAbsoluteYaw>(gmsfUnaryExpressionYawPtr);

// Optimize ---------------------------------------------------------------
{
// Mutex for optimizeGraph Flag
const std::lock_guard<std::mutex> optimizeGraphLock(optimizeGraphMutex_);
optimizeGraphFlag_ = true;
}
}

void HolisticFusionHolistic::addUnaryHeadingAbsoluteMeasurement(
const UnaryMeasurementXDAbsolute<Eigen::Matrix3d, 1>& R_M_S) {
// Valid measurement received
Expand Down
107 changes: 0 additions & 107 deletions holistic_fusion/tests/test_holistic_yaw_expression.cpp

This file was deleted.

Loading