-
Notifications
You must be signed in to change notification settings - Fork 116
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
[RST-4390] Allow variables to be held constant during optimization #243
Conversation
233b5ca
to
696c086
Compare
|
||
bool Point3DFixedLandmark::holdConstant() const | ||
{ | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svwilliams Just curious, I wonder if this is the only difference wrt Point3DLandmark
, why Point3DFixedLandmark
wasn't simply implemented as:
class Point3DFixedLandmark : public Point3DLandmark
{
public:
FUSE_VARIABLE_DEFINITIONS(Point3DFixedLandmark);
bool holdConstant() const
{
return true;
}
};
and the corresponding code for the serialization and pluginlib in the cpp file. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I think just an accident of history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ceres Solver allows you to mark variables as constant. Ceres will not alter the values of those variables during the optimization. In fact, it actually removes those variables from the linear optimization problem when solving for the best variable values. Add support for constant variables to fuse as follows: