Skip to content

Commit 4909497

Browse files
MiladShafieeS-Dafarra
authored andcommitted
remove some small bug
1 parent 5c5cf88 commit 4909497

4 files changed

Lines changed: 26 additions & 1 deletion

File tree

src/WalkingModule/app/robots/iCubGazeboV2_5/dcm_walking/step_adaptation/robotControl.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ joint_velocity_cut_frequency 10.0
3737

3838
use_wrench_filter 0
3939
wrench_cut_frequency 10.0
40+
41+
# if true a good joint traking is considered mandatory
42+
good_tracking_required (true, true, true,
43+
true, true, true, true,
44+
true, true, true, true,
45+
true, true, true, true, true, true,
46+
true, true, true, true, true, true)

src/WalkingModule/app/robots/iCubGenova04/dcm_walking/step_adaptation/robotControl.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,10 @@ joint_velocity_cut_frequency 10.0
3434

3535
use_wrench_filter 0
3636
wrench_cut_frequency 10.0
37+
38+
# if true a good joint traking is considered mandatory
39+
good_tracking_required (true, true, true,
40+
true, true, true, true,
41+
true, true, true, true,
42+
true, true, true, true, true, true,
43+
true, true, true, true, true, true)

src/WalkingModule/include/WalkingControllers/WalkingModule/Module.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ namespace WalkingControllers
133133

134134
bool m_firstStep; /**< True if this is the first step. */
135135
bool m_useStepAdaptation; /**< True if the step adaptation is used. */
136+
bool m_useStepAdaptationConfigurationFileValue; /**< True if the step adaptation is used. */
136137

137138
bool m_useMPC; /**< True if the MPC controller is used. */
138139
bool m_useQPIK; /**< True if the QP-IK is used. */

src/WalkingModule/src/Module.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ bool WalkingModule::configure(yarp::os::ResourceFinder& rf)
145145

146146
m_pushRecoveryActiveIndex=0;
147147
m_useStepAdaptation = rf.check("use_step_adaptation", yarp::os::Value(false)).asBool();
148+
m_useStepAdaptationConfigurationFileValue = rf.check("use_step_adaptation", yarp::os::Value(false)).asBool();
149+
148150
m_impactTimeNominal = 0;
149151
m_impactTimeAdjusted = 0;
150152

@@ -636,7 +638,7 @@ bool WalkingModule::updateModule()
636638
{
637639
m_useStepAdaptation=false;
638640
}
639-
else if(desiredUnicyclePosition != nullptr && m_newTrajectoryMergeCounter == 2)
641+
else if(desiredUnicyclePosition != nullptr && m_newTrajectoryMergeCounter == 2 && m_useStepAdaptationConfigurationFileValue)
640642
{
641643
m_useStepAdaptation=true;
642644
}
@@ -1510,12 +1512,20 @@ bool WalkingModule::startWalking()
15101512

15111513
}
15121514

1515+
15131516
if (!m_robotControlHelper->loadCustomInteractionMode())
15141517
{
15151518
yError() << "[WalkingModule::startWalking] Unable to set the intraction mode of the joints";
15161519
return false;
15171520
}
15181521

1522+
1523+
if (!m_robotControlHelper->setImpedanceControlGain())
1524+
{
1525+
yError() << "[WalkingModule::startWalking] Unable to set the set Impedance Control gains of the joints";
1526+
return false;
1527+
}
1528+
15191529
// before running the controller the retargeting client goes in approaching phase this
15201530
// guarantees a smooth transition
15211531
m_retargetingClient->setPhase(RetargetingClient::Phase::approacing);

0 commit comments

Comments
 (0)