Skip to content

Commit

Permalink
yarpToWBI block had defined 23 inputs instead of ROBOT_DOF
Browse files Browse the repository at this point in the history
  • Loading branch information
jeljaik committed Jan 27, 2015
1 parent abf3f3d commit 9db1ec3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
%WBC ASW
clear all
setenv('YARP_ROBOT_NAME','icubGazeboSim');
ROBOT_DOF=25;
localName='simulink';
robotName='icubGazeboSim';
Ts=0.010;

% Controller period
Ts = 0.01;
Expand Down
66 changes: 33 additions & 33 deletions libraries/WBCLibrary.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Library {
ModifiedByFormat "%<Auto>"
LastModifiedBy "jorhabib"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Fri Jan 23 16:46:23 2015"
RTWModifiedTimeStamp 343932383
ModelVersionFormat "1.%<AutoIncrement:229>"
LastModifiedDate "Tue Jan 27 17:19:55 2015"
RTWModifiedTimeStamp 344279995
ModelVersionFormat "1.%<AutoIncrement:230>"
ConfigurationManager "none"
SampleTimeColors off
SampleTimeAnnotations off
Expand Down Expand Up @@ -91,13 +91,13 @@ Library {
Type "Handle"
Dimension 1
Simulink.ConfigSet {
$ObjectID 7
$ObjectID 6
Version "1.12.0"
Array {
Type "Handle"
Dimension 9
Simulink.SolverCC {
$ObjectID 8
$ObjectID 7
Version "1.12.0"
StartTime "0.0"
StopTime "10.0"
Expand Down Expand Up @@ -132,7 +132,7 @@ Library {
InsertRTBMode "Whenever possible"
}
Simulink.DataIOCC {
$ObjectID 9
$ObjectID 8
Version "1.12.0"
Decimation "1"
ExternalInput "[t, u]"
Expand Down Expand Up @@ -164,7 +164,7 @@ Library {
Refine "1"
}
Simulink.OptimizationCC {
$ObjectID 10
$ObjectID 9
Version "1.12.0"
Array {
Type "Cell"
Expand Down Expand Up @@ -220,7 +220,7 @@ Library {
UseIntDivNetSlope off
}
Simulink.DebuggingCC {
$ObjectID 11
$ObjectID 10
Version "1.12.0"
RTPrefix "error"
ConsistencyChecking "none"
Expand Down Expand Up @@ -308,7 +308,7 @@ Library {
SFUnconditionalTransitionShadowingDiag "warning"
}
Simulink.HardwareCC {
$ObjectID 12
$ObjectID 11
Version "1.12.0"
ProdBitPerChar 8
ProdBitPerShort 16
Expand Down Expand Up @@ -345,7 +345,7 @@ Library {
ProdEqTarget on
}
Simulink.ModelReferenceCC {
$ObjectID 13
$ObjectID 12
Version "1.12.0"
UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
CheckModelReferenceTargetMessage "error"
Expand All @@ -360,7 +360,7 @@ Library {
SupportModelReferenceSimTargetCustomCode off
}
Simulink.SFSimCC {
$ObjectID 14
$ObjectID 13
Version "1.12.0"
SFSimEnableDebug on
SFSimOverflowDetection on
Expand All @@ -375,7 +375,7 @@ Library {
}
Simulink.RTWCC {
$BackupClass "Simulink.RTWCC"
$ObjectID 15
$ObjectID 14
Version "1.12.0"
Array {
Type "Cell"
Expand Down Expand Up @@ -444,7 +444,7 @@ Library {
Type "Handle"
Dimension 2
Simulink.CodeAppCC {
$ObjectID 16
$ObjectID 15
Version "1.12.0"
Array {
Type "Cell"
Expand Down Expand Up @@ -509,7 +509,7 @@ Library {
}
Simulink.GRTTargetCC {
$BackupClass "Simulink.TargetCC"
$ObjectID 17
$ObjectID 16
Version "1.12.0"
Array {
Type "Cell"
Expand Down Expand Up @@ -588,7 +588,7 @@ Library {
}
}
hdlcoderui.hdlcc {
$ObjectID 18
$ObjectID 17
Version "1.12.0"
Description "HDL Coder custom configuration component"
Name "HDL Coder"
Expand Down Expand Up @@ -829,7 +829,7 @@ Library {
MaskIconUnits "autoscale"
System {
Name "Utilities"
Location [1382, 59, 2662, 759]
Location [1424, 87, 2704, 787]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
Expand Down Expand Up @@ -1377,7 +1377,7 @@ Library {
MaskIconUnits "autoscale"
System {
Name "WBI to yarp"
Location [1382, 59, 2662, 759]
Location [1424, 87, 2704, 787]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
Expand Down Expand Up @@ -1405,7 +1405,7 @@ Library {
Ports [1, 1]
Position [85, 26, 125, 64]
ZOrder -2
InputPortWidth "23"
InputPortWidth "ROBOT_DOF"
Indices "[1 2 3]"
}
Block {
Expand All @@ -1415,7 +1415,7 @@ Library {
Ports [1, 1]
Position [110, 86, 150, 124]
ZOrder -3
InputPortWidth "23"
InputPortWidth "ROBOT_DOF"
Indices "[4 5 6 7]"
}
Block {
Expand All @@ -1425,7 +1425,7 @@ Library {
Ports [1, 1]
Position [110, 151, 150, 189]
ZOrder -4
InputPortWidth "23"
InputPortWidth "ROBOT_DOF"
Indices "[8 9 10 11]"
}
Block {
Expand All @@ -1435,7 +1435,7 @@ Library {
Ports [1, 1]
Position [110, 216, 150, 254]
ZOrder -5
InputPortWidth "23"
InputPortWidth "ROBOT_DOF"
Indices "[12 13 14 15 16 17]"
}
Block {
Expand All @@ -1445,7 +1445,7 @@ Library {
Ports [1, 1]
Position [110, 286, 150, 324]
ZOrder -6
InputPortWidth "23"
InputPortWidth "ROBOT_DOF"
Indices "[18 19 20 21 22 23]"
}
Block {
Expand Down Expand Up @@ -2444,7 +2444,7 @@ Library {
MaskIconUnits "autoscale"
System {
Name "yarp to WBI"
Location [1382, 59, 2662, 759]
Location [1424, 87, 2704, 787]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
Expand Down Expand Up @@ -12630,7 +12630,7 @@ Library {
Ports [0, 5]
Position [25, 116, 95, 184]
ZOrder -5
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/Utilities/yarp read"
SourceType ""
from "['/' robotName '/left_arm/analog:o/torques']"
Expand All @@ -12646,7 +12646,7 @@ Library {
Ports [0, 5]
Position [25, 201, 95, 269]
ZOrder -5
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/Utilities/yarp read"
SourceType ""
from "['/' robotName '/right_arm/analog:o/torques']"
Expand All @@ -12662,7 +12662,7 @@ Library {
Ports [0, 6]
Position [25, 286, 95, 354]
ZOrder -5
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/Utilities/yarp read"
SourceType ""
from "['/' robotName '/left_leg/analog:o/torques']"
Expand All @@ -12678,7 +12678,7 @@ Library {
Ports [0, 6]
Position [25, 371, 95, 439]
ZOrder -5
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/Utilities/yarp read"
SourceType ""
from "['/' robotName '/right_leg/analog:o/torques']"
Expand All @@ -12694,7 +12694,7 @@ Library {
Ports [0, 3]
Position [25, 26, 95, 94]
ZOrder -5
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/Utilities/yarp read"
SourceType ""
from "['/' robotName '/torso/analog:o/torques']"
Expand Down Expand Up @@ -15201,7 +15201,7 @@ Library {
ZOrder 41
BackgroundColor "[0.732000, 0.463600, 0.000000]"
ShowName off
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/wholeBodyStates/Joint Velocities"
SourceType "Joint Velocities"
robotName "robotName"
Expand All @@ -15215,7 +15215,7 @@ Library {
Position [65, 93, 140, 137]
ZOrder -1
BackgroundColor "[0.047000, 0.909000, 0.803000]"
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/wholeBodyModel/Jacobians/Left Foot Jacobian"
SourceType "Left Foot Jacobian"
robotName "robotName"
Expand All @@ -15240,7 +15240,7 @@ Library {
Position [70, 28, 140, 72]
ZOrder -2
BackgroundColor "[0.000000, 1.000000, 0.533000]"
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/wholeBodyModel/Jacobians/Right Foot Jacobian"
SourceType "Right Foot Jacobian"
robotName "robotName"
Expand All @@ -15254,7 +15254,7 @@ Library {
Position [180, 68, 290, 112]
ZOrder -14
BackgroundColor "[0.753334, 1.000000, 0.112472]"
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/Utilities/baseVelocity"
SourceType "baseVelocity"
}
Expand Down Expand Up @@ -15372,7 +15372,7 @@ Library {
Position [20, 63, 90, 107]
ZOrder 1
BackgroundColor "[0.375000, 0.187500, 0.000000]"
LibraryVersion "1.228"
LibraryVersion "1.229"
SourceBlock "WBCLibrary/wholeBodyStates/Joint Angles"
SourceType "Joint Angles"
robotName "robotName"
Expand Down

2 comments on commit 9db1ec3

@francesco-romano
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeljaik the problem is that the dimensions are hardcoded! We have the assumption of robot parts.
So the change 23 -> ROBOT_DOF is quite useless. IMHO.

@jeljaik
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I had misread that issue, but still nor is it the right approach to just change the block to 23 inputs/outputs just because a controller (last ones made by @DanielePucci) decided to control just 23DOF. For this reason I'm reverting the block to how it was originally, and a local solution should be made for those particular controllers that wanna use a different number of DOF. Pushed changes in 9665fbd and 7067810

Please sign in to comment.