Probabilistic contact estimator based on logistic regression#78
Open
MichaelMarav wants to merge 15 commits into
Open
Probabilistic contact estimator based on logistic regression#78MichaelMarav wants to merge 15 commits into
MichaelMarav wants to merge 15 commits into
Conversation
mrsp
reviewed
Apr 22, 2026
| den += contact_estimators_.at(frame).getContactForce(); | ||
| if (params_.estimate_contact_status && !contacts_probability.has_value()) { | ||
| // Logistic regression: P = 1 / (1 + exp(-(beta * fz + beta0))) | ||
| double fz = contacts_force[frame].z(); |
Owner
There was a problem hiding this comment.
Try const double fz = R_foot_to_force * ft.at(frame).force;
| Eigen::Vector3d(-contacts_torque.at(frame).y() / z_force, | ||
| contacts_torque.at(frame).x() / z_force, 0.0); | ||
| if (!state.isPointFeet() && contacts_torque.count(frame) && state.contact_state_.contacts_probability.at(frame) > 0.0) { | ||
| double z_force = contacts_force.at(frame).z(); |
Owner
There was a problem hiding this comment.
Suggested change
| double z_force = contacts_force.at(frame).z(); | |
| const double fz = contacts_force.at(frame).z(); |
| } | ||
| } | ||
| } else if (contacts_probability) { | ||
| if (contacts_probability.has_value()) { |
Owner
There was a problem hiding this comment.
looks like we can simplify the flow logic even further now:
if (contacts_probability.has_value()) {
// use contact probs given
} else {
// estimate your own by default making estimate_contact_status redundant now
}
| // the user should provide the end-effector contact probabilities | ||
| "estimate_contact_status": true, | ||
| // Coefficients for logistic regression probability contact estimator | ||
| "beta": 0.33, |
Owner
There was a problem hiding this comment.
some "tuning rules" on how to determine these are needed here since we support too many robots now.
e.g.
"beta" is % of m*g
"beta0" is ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.