Skip to content

Commit 2f85f15

Browse files
committed
remove some small bug
1 parent 922bc18 commit 2f85f15

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
@@ -142,6 +142,8 @@ bool WalkingModule::configure(yarp::os::ResourceFinder& rf)
142142

143143
m_pushRecoveryActiveIndex=0;
144144
m_useStepAdaptation = rf.check("use_step_adaptation", yarp::os::Value(false)).asBool();
145+
m_useStepAdaptationConfigurationFileValue = rf.check("use_step_adaptation", yarp::os::Value(false)).asBool();
146+
145147
m_impactTimeNominal = 0;
146148
m_impactTimeAdjusted = 0;
147149

@@ -633,7 +635,7 @@ bool WalkingModule::updateModule()
633635
{
634636
m_useStepAdaptation=false;
635637
}
636-
else if(desiredUnicyclePosition != nullptr && m_newTrajectoryMergeCounter == 2)
638+
else if(desiredUnicyclePosition != nullptr && m_newTrajectoryMergeCounter == 2 && m_useStepAdaptationConfigurationFileValue)
637639
{
638640
m_useStepAdaptation=true;
639641
}
@@ -1507,12 +1509,20 @@ bool WalkingModule::startWalking()
15071509

15081510
}
15091511

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

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

0 commit comments

Comments
 (0)