Skip to content

Commit

Permalink
Update comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurooka committed Apr 13, 2024
1 parent 4a89827 commit 36a13da
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
17 changes: 10 additions & 7 deletions include/MultiContactController/MultiContactController.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ struct MultiContactController : public mc_control::fsm::Controller
public:
/** \brief Constructor.
basePose in configuration allows users to set the initial pose of the robot.
It will be registered on datastore in this function and reflected in the reset function.
If the pose is stored in the "basePose" key of the controller configuration, the pose will be registered in the
"MCC::ResetBasePose" key of the datastore and applied to the baselink poses of the control and real robots in the
reset function.
*/
MultiContactController(mc_rbdyn::RobotModulePtr rm, double dt, const mc_rtc::Configuration & _config);

/** \brief Reset a controller.
This method is called when starting the controller.
When MCC::ResetBasePose is in datastore, the posW of both control and real robots
are overwritten by it in this function.
If the pose is registered in the "MCC::ResetBasePose" key of the datastore, the pose will be applied to the
baselink poses of the control and real robots in the reset function.
*/
void reset(const mc_control::ControllerResetData & resetData) override;

Expand All @@ -50,9 +52,10 @@ struct MultiContactController : public mc_control::fsm::Controller
/** \brief Stop a controller.
This method is called when stopping the controller.
When saveLastBasePose is enabled in the configuration,
the poseW of control robot will be saved in datastore at the end of this function
to use it for initialization of the following controller.
If the "saveLastBasePose" key in the controller configuration is true, the baselink pose of the current control
robot is registered in the "MCC::ResetBasePose" key of the datastore. This is intended to be used in subsequent
controller initializations.
*/
void stop() override;

Expand Down
8 changes: 5 additions & 3 deletions src/LimbManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,11 @@ void LimbManager::update()
currentContactCommand_ = getContactCommand(ctl().t());
if(currentContactCommand_ && currentContactCommand_->constraint->type() != "Empty" && requireTouchDownPoseUpdate_)
{
// In contact transitions for arms, the type of currentContactCommand_ become Empty while closing the
// gripper. Since Empty command does not have vertices for wrench distribution, we exclude it to apply
// updateGlobalVertices to vertices in Grasp command following on Empty command.
// \todo In order to correctly update global vertices when transitioning from an EmptyContact with no vertices for
// wrench distribution to, for example, a GraspContact with vertices for wrench distribution, the condition here is
// skipped for EmptyContact and requireTouchDownPoseUpdate_ is retained. The current implementation works well for
// contact transitions where the hand grasps the environment (i.e., EmptyContact -> GraspContact), but it does not
// work well to perform other contact transitions in the future (e.g., SurfaceContact -> GraspContact).
currentContactCommand_->constraint->updateGlobalVertices(targetPose_);
requireTouchDownPoseUpdate_ = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/PostureManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void PostureManager::update()
PostureMap nominalPosture = getNominalPosture(ctl().t());
postureTask_->target(nominalPosture); // this function will do nothing if nominalPosture is empty

// TODO: update postureTask_->refVel and postureTask_->refAcc
// \todo update postureTask_->refVel and postureTask_->refAcc
}

void PostureManager::stop()
Expand Down

0 comments on commit 36a13da

Please sign in to comment.