Warning!Thisrepositorycontainsreseachmaterialandthereforeisunderactivedevelopment.Infuturereleases,masterbranchmaybreakcompatibilitywitholderversionsofWBC.Ifyouareinterestedinretrievingastableversionofthisrepo,forktherepositoryorrefertothefollowingreleases:
WBCv2.5WBCv2.0WBCv1.5WBCv1.0OverviewTherepositorycontainsSimulink-basedwhole-bodycontrollersdevelopedtocontroltheiCubhumanoidrobot.ItcanbeimaginedasastartingpointandasupportrepositoryforauserthatintendstodevelopanewSimulinkcontroller(notnecessarilyfortheiCubrobot)inwithintheframeworkoftherobotologyorganization.Itisworthnotingthat:
Thecontrollersstoredinthisrepositoryareanoverviewofthepossibilecontrolframeworksthatcanbeimplementedusingtherobotologysoftwareinfrastructure.Also,therepositorycontainsalibraryofconfigurationandutilityMatlabfunctionstodesignsimulationswithGazebosimulatorandontherealrobotiCub.Withthedependencymatlab-whole-body-simulatorinstalled,youcanalsodesignsimulationswithafullMATLAB/Simulinksimulatorandrobotvisualizer,accessiblethroughtheSimulinkLibraryBrowserentryMatlabWhole-bodySimulator(refertothisREADME).
Therobotdynamicsandkinematicsiscomputedrun-timebymeansofWBToolbox,aSimulinklibrarythatwrapsiDyntree.FormoreinformationoniDyntreelibrary,seealsothisREADME.
TheSimulinkmodelsimplementdifferentcontrolstrategiesbothforfixed-baseandforfloating-baserobots.Theyspacefrommomentum-basedtorquecontroltoinverse-kinematics-basedpositioncontrol.Havealookatthecontrollersfolderformoredetails.
DependenciesThisrepositorydependsuponthefollowingSoftware:
CMake,atleastversion3.5.Matlab/Simulink,defaultversionR2019b.WB-Toolboxandblockfactory.matlab-whole-body-simulator,atleastversion2.0.0.GazeboSimulator,defaultversion9.0.gazebo-yarp-plugins.icub-gazebo,icub-gazebo-wholebodyandicub-modelstoaccessiCubmodels.whole-body-estimators(Optional,forusingwholeBodyDynamicsdevice).YARPandicub-main.InstallationandusageTherepositoryisusuallytestedanddevelopedonUbuntuandmacOSoperatingsystems.SomefunctionalitiesmaynotworkproperlyonWindows.
Itissuggestedtoinstallwhole-body-controllersandmostofitsdependencies(namely,YARP,icub-main,whole-body-estimators,icub-gazebo,icub-gazebo-wholebody,icub-models,gazebo-yarp-plugins,matlab-whole-body-simulator,blockfactoryandWB-Toolboxandtheirdependencies)usingtherobotology-superbuild(enableROBOTOLOGY_ENABLE_DYNAMICSoption).Warning:thesuperbuildcandownloadandcompiletherepositoryalsowithouthavingMatlab,SimulinkandGazeboinstalledinthePC,butthefunctionalitiesoftherepowillbeconsiderablyreduced!Toaccessallthefeaturesoftherepo,installallthedependencies.Also,inthesuperbuildyouhavetoenabletheROBOTOLOGY_USES_GAZEBOandROBOTOLOGY_USES_MATLABoptions.
Otherwise,afterinstallingallthedependencies,clonetherepositoryonyourpcbyrunningonaterminalgitclonehttps://github.com/robotology/whole-body-controllers,ordownloadtherepository.Then(onUbuntu),openaterminalfromthefolderwhereyoudownloadedwhole-body-controllersandrun:
mkdirbuildcdbuildccmake..intheGUIthatitwillopen,settheCMAKE_PREFIX_PATHasyourdesiredinstallationfolder.Then,runmakeinstall.
SettheenvironmentalvariableYARP_ROBOT_NAMEinyour.bashrcfile(orequivalent)tobethenameoftherobotyouwanttocontrol.Listofsupportedrobotnames:
RobotNamesAssociatedURDFModeliCubGenova02model.urdfiCubGenova04model.urdfiCubGazeboV2_5model.urdficubGazeboSimmodel.urdfIMPORTANT!tousetheWBCSimulinkcontrollers,itisrequiredtoaddtheinstalled+wbcand+wbc/simulinkfolders(copiedfrom+wbc)totheMatlabpath.TherearetwopossiblewaystoaddthefoldertotheMatlabpath:
1a.manuallyandpermanentlyaddtheparentfolderoftheinstalled+wbc(${CMAKE_INSTALL_PREFIX}/mex),anditssub-folder+wbc/simulinktotheMatlabpath;
1b.runonlyoncethestartup_WBC.mscript,whichisinstalledinyour${BUILD}folder.Inthiscase,pathisnotpermanentlyaddedtoMatlab,anditisrequiredtoalwaysstartMatlabfromthefolderwhereyourpathdef.mfileis(usually~/Documents/MATLAB).TofacilitatethereachingoftheWBCworkingfolderfromthefoldercontainingthepathdef.m,agoToWholeBodyController.mscriptcanbeautomaticallycreatedinthatfolder.RunittojumptotheWBCfolder.ForfurtherinformationontheinstallationprocedureseealsotheWBToolboxdocumentation.WARNING:iftherepositoryisinstalledthroughtherobotology-superbuild,DONOTrunthestartup_WBC.mfilebutinsteadrunthestartup_robotology_superbuildfilethatcomesalongwithrobotology-superbuildinstallation.
Note:touseanyfunctioninsidethepackagematlab-wbc/+wbc,addthewbcprefixtothefunctionnamewhenthefunctionisinvoked,i.e.[outputs]=wbc.myFunction(inputs).MoreinformationonpackagescanbefoundintheMatlabdocumentation.Thefolder${CMAKE_INSTALL_PREFIX}/mexhavingbeenalreadyaddedtotheMatlabpath,therearenootherrequirementsforusingthesimulationlibraryfrommatla-whole-body-simulator.
Therearesomefunctionalitiesofthereposuchastheautomaticgenerationofc++codefromSimulinkthatrequiretoenablenot-defaultcmakeoptions.Checktheavailableoptionsbyrunningccmake.inyourbuilddirectory.
TroubleshootingPleaserefertotheWBToolboxtroubleshootingdocumentation.
Relevantfoldersoftherepoconfig:acollectionofscriptstocorrectlyconfigurethisrepo.[README]
controllers:Simulinkwhole-bodypositionandtorquecontrollersforbalancingofhumanoidrobots.[README]
doc:guidelinesonhowtocreate/useSimulinkmodelsforcontrol.[README]
library:alibraryoffunctions/scriptsusedbythecontrollers.[README]
utilities:Simulinkmodelsfordebuggingsensorsontherealrobot.[README]
Availablecontrollersfixed-base-joints-torque-controlfloating-base-balancing-position-controlfloating-base-balancing-torque-controlfloating-base-balancing-torque-control-with-simulatorfloating-base-jerk-controlMatlabfunctionslibrarymatlabWBClibraryAdditionalfeaturesAutomaticgenerationofc++codefromSimulinkThereisthepossibilitytogeneratec++codefromtheSimulinkmodelsusingSimulinkcoder(availableonlyforthefloating-base-balancing-torque-control).Therepositiorythatcontainsthegeneratedc++codeisnamedautogenerated-whole-body-controllers.Documentationonhowtogeneratethecodeisavailableintherepositorywiki.
StaticGUIforSimulinkWhenusedforcontrollingrealplatforms,heavySimulinkmodelsmayviolatetheuser-definedsimulationtimestep,seealsothisissue.Itseemsasourceofdelayistherun-timeupdateoftheSimulinkinterface.Forthisreason,astaticGUIforrunningthemodelshasbeendeveloped.IfyouwanttorunSimulinkwiththestaticGUI,runthestartModelWithStaticGuiscript.
HomepositionsforyarpmotorguiTherepocontainsasetofpredefinedhomepositionstobeusedwiththeyarpmotorgui.Bydefault,iftherepoisinstalledthroughrobotology-superbuild,thehomepositionsareinstalledintherobotology-superbuild/build/installdirectory.OtherwiseaddthepathtothehomePositionsfoldertotheYARP_DATA_DIRSenvironmentalvariableinyour.bashrcfile.Thecommandtousethehomepositionswiththeyarpmotorguiisyarpmotorgui--frommyHomePosFileName.ini.
WheredoIfindlegacymaterials?Officiallegacyrepositoriesare:mex-wholebodymodelandWBI-Toolbox-controllers.Note:theselegacyreposcontainundocumented/outdatedcode,andduplicatedornottestedmatlabfunctions.Theyalsocontainoriginalcodethathasbeentestedontherobotinthepastandthenneverusedagain,orcodethatwillbeportedinthemainrepositoryinthefuture.
exploitfrictioncontrollerwalkingcontrollerseesawcontrollerautomaticgaintuningandautomaticgaintuning-matlabelasticjointscontrolwalkmancontrolandwalkmancontrol-matlabjoint-spacecontrolandcentroidaltransformationstand-upcontrol4contactsYoucanalsofindotherlegacycontrollers/simultorsinthisrepositorywhole-body-controllersinspecificcommits:
simulink-balancing-simulator@c217f051.CitingthisworkIfyouareusingthiscodeforyourresearchactivityandyou'rewillingtociteit,youmayaddthefollowingreferencestoyourbibliography:
@INPROCEEDINGS{Nava_etal2016,author={G.NavaandF.RomanoandF.NoriandD.Pucci},booktitle={2016IEEE/RSJInternationalConferenceonIntelligentRobotsandSystems(IROS)},title={Stabilityanalysisanddesignofmomentum-basedcontrollersforhumanoidrobots},year={2016},pages={680-687},doi={10.1109/IROS.2016.7759126},month={Oct},}@article{Nori_etal2015,author="Nori,F.andTraversaro,S.andEljaik,J.andRomano,F.andDelPrete,A.andPucci,D.",title="iCubwhole-bodycontrolthroughforceregulationonrigidnon-coplanarcontacts",year="2015",journal="Frontiersin{R}oboticsand{A}{I}",volume="1",}MantainersGabrieleNava(@gabrielenava)
评论