-
Notifications
You must be signed in to change notification settings - Fork 9
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
Init base pose from datastore #12
Conversation
…s initial pose in other MCC::Initial
fb72c16
to
fbba0ee
Compare
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.
Thank you for the PR! Some small comments.
I believe this feature should be included in the mc_rtc controller definition itself, as it will be needed not only for MCC, but you can merge it for quick development for now.
bool exitWhenLimbSwingFinished_ = false; | ||
|
||
//! Option to save the last pose in datastore for the other motion | ||
bool saveLastBasePose_ = false; |
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.
This variable defined in ConfigMotionState seems to be unused.
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.
Fixed in da202a4
{ | ||
exitWhenLimbSwingFinished_ = static_cast<bool>(config_("configs")("exitWhenLimbSwingFinished")); | ||
} | ||
if(config_.has("configs") && config_("configs").has("saveLastBasePose")) |
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.
This variable defined in ConfigMotionState seems to be unused.
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.
Fixed in da202a4
@@ -89,6 +89,9 @@ struct MultiContactController : public mc_control::fsm::Controller | |||
//! Whether to enable manager update | |||
bool enableManagerUpdate_ = false; | |||
|
|||
//! Whether to save last base pose when stopping this controller |
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.
Please comment here that the basePose
configuration allows you to set the initial value and the saveLastBasePose
configuration allows you to save the base pose (if you have a better place to do it, that's fine too).
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.
I added the comment for constructor, reset, and stop functions in da202a4
When I start MCC after finishing another controller, the initial pose of the robot can be different from the one assumed in pre-defined motion in MCC. In addition, when I change a controller from MCC to other controllers and go back to MCC, the pose of the base can be modified by other controllers though the actual robot is in the same position.
To solve this initialization problem, I add option to save last pose of the base in datastore and overwrite pose of the base link in reset function. It also can be defined from yaml file as basePose, which is loaded when instantiating MCC.