配色: 字号:
Gazebo機器人仿真學習探索筆記(五)環境模型
2016-10-21 | 阅:  转:  |  分享 
  
Gazebo機器人仿真學習探索筆記(五)環境模型

環境模型構建可以通過向其中添加模型實現,待之後補充,比較有趣的是建築物模型,

可以編輯多層樓層和房間,加入樓梯,窗戶和牆壁等,具體可以參考附錄,等有空再補充。



附錄:官方文檔

Buildingaworld

Thistutorialdescribestheprocessofcreatingaworldwithbothstaticanddynamicobjects.

Terminology

World:Thetermusedtodescribeacollectionofrobotsandobjects(suchasbuildings,tables,andlights),andglobalparametersincludingthesky,ambientlight,andphysicsproperties.

Static:Entitiesmarkedasstatic(thosehavingthetrueelementinSDF),areobjectswhichonlyhavecollisiongeometry.Allobjectswhicharenotmeanttomoveshouldbemarkedasstatic,whichisaperformanceenhancement.

Dynamic:Entitiesmarkedasdynamic(eithermissingtheelementorsettingfalseinSDF),areobjectswhichhavebothinertiaandacollisiongeometry.

Setup

MakesureGazeboisinstalled.

Createaworkingdirectoryforthistutorial:

$mkdir~/build_world_tutorial;cd~/build_world_tutorial

Startupgazebo,andyoushouldseeaworldwithjustagroundplane.

$gazebo



AddingObjects

GazeboprovidestwomechanismsforaddingobjectstoGazebo.

Thefirstisasetofsimpleshapes,locatedabovetherenderwindow.



Thesecondisviathemodeldatabase,whichisaccessiblebyselectingtheInserttabintheupperleftcorner.



AddingSimpleShapes

Boxes,spheres,andcylindersmaybeaddedtotheworldbyclickingontheappropriateiconabovetherenderwindow.Eachshapeisofunitsize:

Box:1x1x1meter

Sphere:1meterdiameter

Cylinder:1meterdiameter,1meterlength

Selecttheboxicon,andthenmoveyourmouseontotherenderwindow.Youwillseeaboxthatmoveswithyourmouse.Leftclickwhenyouarehappywiththepositionofthebox.

Repeatthesameprocedureforthesphereandcylinder.Youshouldendwithaworldsimilartothis:



AddingModelfromtheModelDatabase

Gazebo''smodeldatabaseisarepositoryofalltypesofmodelsincludingrobots,tables,andbuilding.

SelecttheInserttabintheupperlefthandcornertoaccessthemodeldatabase.

Thelistofmodelsaredividedintosectionsaccordingtotherecurrentlocation.EachsectionislabeledwithapathorURI.Selectinganobjectlocatedonaremoteserverwillcausethemodeltobedownloadedandstoredin~/.gazebo/models.

Tryaddingvariousmodelstotheworld.Bepatientwhendownloadingmodels,assomemaybelarge.

Youshouldendupwithsomethingsimilartothefollowing,dependingonthemodelsyoudecidedtoadd:



PositionModels

Theposeofeachmodelmaybealteredthroughthetranslateandrotatetools:



Translation

Thetranslatetoolsallowsyoutomovetheobjectalongthex,y,andzaxes.Selectthistoolnowandclickontheobjectyouwanttomove.Athreeaxesvisualmarkerwillappearovertheobject,whichallowsyoutomovetheobjectinx,y,andzdirections.

Youcanalsojustclickontheobjectitselfanddragittomoveonthex-yplane.Youmaycontrolwhichaxistheobjectmovesalongbypressingandholdingthex,y,orzkeywhiledraggingtheobject.

Trymovingtheobjectsaroundnowintoadifferentconfiguration.

Rotation

Therotatetoolallowsyoutoorientamodelaroundthex,y,andzaxes.Selectthistoolnowandclickontheobjectyouwanttomove.Threering-shapedvisualmarkerwillappearovertheobject,whichallowsyoutorotatetheobjectaroundthex,y,andzaxes.

Tryrotatingtheobjectsintoadifferentconfiguration.

Scale

Thescaletoolallowsyoutoresizeamodelinthex,y,andzdirections.Currentlythescaletoolonlyworkswithsimpleshapes,i.e.box,cylinderandsphere.Selectthistoolnowandclickonasimpleshape.Athreeaxesvisualmarkerwillappearovertheobject,whichallowsyoutoscalethex,y,andzdimensionsoftheobject.

Tryscalingthesimpleshapesintodifferentsizes.

DeleteModels

ModelmayalsobedeletedbyselectingthemandthehittingtheDeletekey,orbyright-clickingonamodelandselectingDelete.

Trydeletingafewmodels.

SavingaWorld.

OnceyouarehappywithaworlditcanbesavethroughtheFilemenu.

SelecttheFilemenunow,andchooseSaveAs.

Apop-upwillappearaskingyoutoenteranewfilename.Entermy_world.sdfandclickokay.

LoadingaWorld

Asavedworldmaybeloadedonthecommandline:

gazebomy_world.sdf

Thefilenamemustbeinthecurrentworkingdirectory,oryoumustspecifythecompletepath.

Next

Next:Modifyingaworldtutorial



Modifyingaworld

Thistutorialdescribeshowtomodifyglobalpropertiesincludingsceneandphysicsproperties.

Startgazebo:

$gazebo

SceneProperties

IntheWorldtab,selectthesceneitem.Alistofscenepropertieswillbedisplayedinthelistboxbelow.Clickthetriangletoexpandtheproperties.



Thesepropertiesallowyoutochangetheambientlight.Note:ThebackgroundcolorwillnotchangeiftheSkyisenabled.

PhysicsProperties

IntheWorldtab,selectthephysicsitem.Alistofphysicspropertieswillbedisplayedinthelistboxbelow.

Theenablephysicscheck-boxcanbeusedtodisablephysicswhileallowingpluginsandsensorstocontinuerunning.

TherealtimeupdaterateparameterspecifiesinHzthenumberofphysicsupdatesthatwillbeattemptedpersecond.Ifthisnumberissettozero,itwillrunasfastasitcan.Notethattheproductofrealtimeupdaterateandmaxstepsizerepresentsthetargetrealtimefactor,orratioofsimulationtimetoreal-time.

Themaxstepsizespecifiesthetimedurationinsecondsofeachphysicsupdatestep.

Inthegravityblock:

Thex,yandzparameterssettheglobalgravityvectorcomponentsinm/s^2.

Inthesolverblock:

TheiterationsparameterspecifiesthenumberofiterationstouseforiterativeLCPsolvers(usedbyODEandbullet).

TheSORparameterstandsforsuccessiveover-relaxation,whichcanbeusedtotrytospeedtheconvergenceoftheiterativemethod.

Theconstraintsblockcontainsseveralparametersrelatedtosolvingconstraints:

TheCFMandERPparametersstandsforConstraintForceMixingandErrorReductionParameterandareusedbyODEandbullet.TheCFMandERPparameterscanberelatedtolinearstiffnessanddampingcoefficients.Themaxvelocityandsurfacelayerparametersareusedtoresolvecontactswithasplitimpulsemethod.Anycontactswiththatpenetratedeeperthanadepthspecifiedbysurfacelayerandhaveanormalvelocitylessthanmaxvelocitywillnotbounce.

Seethesdfphysicsdocumentationforadescriptionoftheseparameters.



Next

Next:HowtouseDEMsinGazebo



DigitalElevationModels

Overview

ADigitalElevationModel(DEM)isa3Drepresentationofaterrain''ssurfacethatdoesnotincludeanyobjectslikebuildingsorvegetation.DEMsarefrequentlycreatedbyusingacombinationofsensors,suchasLIDAR,radar,orcameras.Theterrainelevationsforgroundpositionsaresampledatregularly-spacedhorizontalintervals.WikipediaisagoodresourceforgettingmoredetailsaboutDEMs.

ThetermDEMisjustagenericdenomination,notaspecificformat.Infact,theDEMscanberepresentedasagridofelevations(raster)orasavector-basedtriangularirregularnetwork(TIN).Currently,GazeboonlysupportsrasterdatainthesupportedformatsavailableinGDAL.

ThemainmotivationtosupportDEMsinGazeboistobeabletosimulatearealisticterrain.Rescueoragricultureapplicationsmightbeinterestedintestingtheirrobotbehaviorsusingasimulatedterrainthatmatchestherealworld.

BringDEMsupporttoGazebo

InordertoworkwithDEMfilesyoushouldinstallGDALlibraries.

$sudoapt-getinstallgdal-binlibgdal-devlibgdal1hpython-gdal

DEMfileandthedefinitionintoSDFformat

Thereareseveralorganizationsthatprovideelevationdata.Asanexample,let''sdownloadaDEMfileofMountSt.Helensbeforeorafteritseruptionbackinthe''80s.ThesefilesareinpublicdomainandaredistributedbyUSGS.

Unzipthefileandrenameitmtsthelens.demasfollows:

cd~/Downloads

wgethttps://bitbucket.org/osrf/gazebo_tutorials/raw/default/dem/files/mtsthelens_before.zip

unzip~/Downloads/mtsthelens_before.zip-d/tmp

mv/tmp/30.1.1.1282760.dem/tmp/mtsthelens.dem

Usually,DEMfileshavebigresolutionsandGazebocannothandleit,soit''sagoodideatoadjusttheresolutionofyourDEM.Thenextcommandwillscaletheterrainto129x129andwillcopyintotheGazebomedia/dem/directory.

$mkdir-p/tmp/media/dem/

$gdalwarp-ts129129/tmp/mtsthelens.dem/tmp/media/dem/mtsthelens_129.dem

ADEMfileinGazeboisloadedinthesamewaythatyouloadaheightmapimage.GazeboautomaticallydetectsifthefileisaplainimageoraDEMfile.Createthefilevolcano.worldandcopythenextcontent.Savethefileanywhereyouwant,forexample,in/tmp.











model://sun







true









file://media/dem/mtsthelens_129.dem

15015050

000

















file://media/materials/textures/dirt_diffusespecular.png

file://media/materials/textures/flat_normal.png

1





file://media/materials/textures/grass_diffusespecular.png

file://media/materials/textures/flat_normal.png

1





file://media/materials/textures/fungus_diffusespecular.png

file://media/materials/textures/flat_normal.png

1





2

5





4

5



file://media/dem/mtsthelens_129.dem

15015050

000



















TheelementinthecodeabovetellsGazebowhethertoloadtheDEMwiththeoriginaldimensions(whenisnotpresent)ortoscaleit(whenispresent).IncaseyouprefertoscaletheDEM,theelementtellsGazebothesizeinmetersthattheterrainwillhaveinthesimulation.Ifyouwanttomaintainthecorrectaspectratio,besuretoproperlycalculatethewidth,heightandelevation(whichisthethirdnumberin).Inourexample,theDEMwillbescaledtoasquareof150x150metersandamaxelevationof50meters.

LaunchGazebowiththeworldcontainingyourDEMfileandyoushouldseethevolcano.Inourcase,thefileisinthe/tmpdirectory.

#Besureofsourcinggazebosetup.shinyourowninstallationpath

$source/usr/share/gazebo/setup.sh

$GAZEBO_RESOURCE_PATH="$GAZEBO_RESOURCE_PATH:/tmp"gazebo/tmp/volcano.world



HowdoIgetaDEMfileofmyregionofinterest?

Next,wearegoingtodescribeonemethodforobtainingaDEMfileofaspecificregionofinterest.

GlobalLandCoverFacilitymaintainsahigh-resolutiondigitaltopographicdatabaseofEarth.GotoitsSearchandPreviewtoolandyouwillseesomethingsimilartotheimagebelow.Everyterrainpatchhasauniquepathandrowthatyoushouldknowbeforeusingthetool.We''lluseQGIStodiscoverthepath/rowofourregionofinterest.



QGISisacross-platformopensourcegeographicinformationsystemprogramthatprovidesdataviewing,editing,andanalysiscapabilities.DownloadQGISfollowingtheinstructionsdetailedontheQGISwebsite.

OpenupQGIS,clickontheleftcolumniconlabeledWMS/WMTSlayer,clickonAdddefaultservers,selectLizardtechserver,andthen,presstheconnectbutton.SelecttheMODISvalueandpressAdd.Closethepop-upwindow.Thenextstepistoaddanotherlayerwithallthedifferentpatchesavailable.Downloadthisshapefileanddecompressitinanyfolder.GobacktoQGISandpressAddVectorLayer(leftcolumnicon).PressBrowse,andselectyourpreviouslyuncompressedwrs2descending.shpfile.PressOpeninthewindowthatopens.Now,you''llseebothlayersonthemainwindow.Let''schangethetransparencyofthewrs2descendinglayertobeabletoseebothlayersatthesametime.Doubleclickonwrs2_descendinglayer,andthen,modifyitstransparencyvaluetosomethingaround85%.



Usethescrollandleftbuttontonavigatetoyourregionofinterest.ThenclickontheiconlabeledIdentifyFeaturesonthetopbar.Clickonyourregionofinterestandalltheterrainpatchesaroundtheareawillbehighlighted.Anewpopupwindowwillshowthepath/rowvaluesforeachhighlightedpatch.IntheimagebelowyoucanseethepathandrowoftheDEMpatchcontainingLasPalmas,oneoftheheavenlyplacesoftheCanaryIslands,Spain.



GobacktoyourbrowserwiththeGLCFsearchtoolandwritethepath/rowvaluesinthecolumnslabeledStartPathandStartRow.ThenclickinSubmitQuery;pressPreviewandDownloadtoseeyourresults.ChooseyourterrainfileandpressDownload.Finally,selectyourfilewithextension.gz,anddecompressitinyourfavoritefolder.GlobalLandCoverFacilityfilesareinGeoTiffformat,oneofthemostcommonformatofDEMfilesavailable.

PreparingDEMdataforuseinGazebo

DEMdataisusuallycreatedatveryhighresolution.UsegdalwarptoreducetheresolutionoftheterraintoamoremanageablesizebeforeusingitinGazebo.

$gdalwarp-ts

DEMdataoftencontain"holes"or"void"areas.ThesesectionscorrespondtoareaswheredatacouldnotbecollectedwhiletheDEMwascreated.Inthecaseofadata"hole",theholewillbeassignedtheminimumormaximumvalueofthedatatypethatisusedinthatDEM.

Alwaystrytodownload"finished"versionsofDEMdatasets,wheretheholeshavebeenfilled.IfyourDEMterraincontainsholes(alsoknownasNODATAvalues),trytomanuallyrepairitusinggdaltools,suchasgdal_fillnodata.py.

WorkingwithmultipleDEMsinGazebo

AlthoughGazebodoesnotdirectlysupportmultipleDEMs,GDALhasasetofutilitiesformergingasetofDEMsintoasingleone.ThefirststepistodownloadthesetofDEMsthatyouwanttomerge.Notethatthepatchescanevenoverlapwithoneanother;GDALwillmergethemseamlessly.AssumingthatyourcurrentdirectorycontainsasetofGeotifffilesreadytobemerged,runthenextcommand.

$gdal_merge.py.tif-odem_merged.tif

Now,youcanjustusedem_merged.tifinyourworldfileandGazebowillloadtheterrainwithallthepatchesmerged.InthenextscreenshotyoucanseetheresultofmergingfourterrainpatchessurroundingtheCanaryIslands.



Populationofmodels

Overview

ThistutorialdemonstrateshowyoucancreateapopulationofmodelsbyusingtheSDFtag.Apopulationconsistsofacollectionofidenticalmodels.

Addingapopulationofmodelsisamatterofspecifyingthefollowingparameters:

Model(e.g.:table,coke_can).

Numberofobjectstobepartofthepopulation.

ShapeanddimensionsoftheContainerwithinwhichtheobjectswillbearranged(e.g.:box,cylinder).

Thepositionandorientationofthepopulation''scontainer.

Distributionoftheobjectswithinthecontainer(e.g.:random,grid).

Forreference,checktheSDFspecificationforacompletespecificationofthetaganditsparameters.

Creatinganobjectpopulation

Quickstart

Let''sstartbycreatingadirectoryforthistutorial:

mkdir~/tutorial_model_population

cd~/tutorial_model_population

Downloadthisfile:can_population.worldintothecurrentdirectory.Youcanusethiscommand:

wgethttp://bitbucket.org/osrf/gazebo_tutorials/raw/default/model_population/files/can_population.world

Youshouldgetthisworldfile:













model://sun









model://ground_plane













true

model://coke_can





000000



220.01



10



random











Startgazebo:

gazebocan_population.world

Youshouldseeapopulationofsodacansrandomlylocatedaroundtheworld''sorigin.Thecansarearrangedwithinaboxcontainerofsize2x2x0.01meters.

Theworldexplained

Let''sgofurtherandunderstandthedifferentelementsofthecan_population.world.







true

model://coke_can





Inthissnippetwecanseehowtospecifyapopulationelementbyusingthetag.Everypopulationshouldhaveauniquename,andthisisspecifiedbythenameattribute.Withinthepopulationtag,youcanseehowtoselectamodelbyusingthetag.Eachelementofthepopulationwillbeinsertedintothesimulationwithauniquenamethatwillbecreatedbyappendingtothemodelnamethesuffix_clone_i,whereiistheithelementofthepopulation.YoucanseethelistofmodelsspawnedintheGazeboscenehere:



Themostcommontypeofpopulationconsistsofinanimateobjectssuchastrees,rocks,andbuildings.Werecommendyouusethetagforstaticmodels,andexcludemobileentities,suchasrobots,whichoftenrequiremorepreciseplacementandarefewerinnumber.

000000



220.01



Theaboveblockofcodespecifiestheregioninwhichtheobjectswillbeplaced.Inthiscase,alltheobjectsarespawnedwithina3Dboundingboxwithsides2x2x0.01m,centeredat(0,0,0)withorientation(0,0,0).Asanalternativeto,aregionisalsoallowedbyspecifyingitsradiusandlength.(CheckouttheSDFspecificationforafulldescriptionoftheparameters.)Theelementsetsthereferenceframeofthepopulation''sregion.

10

Aboveyoucanseehowthenumberofmodelsinthepopulationisdetermined.Anypositivenumberisallowed,buttakeintoconsiderationthatthehigherthenumber,themoreimpactedtheperformancemaybe.



random



Theelementsetshowtheobjectsareplacedwithintheregion.

Distributiontypes

random:Modelsplacedatrandom.Notethattheobjectsmightcollidewithoneanother.

uniform:Modelsplacedinapseudo-2Dgridpattern.WeuseK-Meanstoapproximatethesolutionandlocatethenumberofspecifiedobjectsinsidetheregion.

grid:Modelsevenlyplacedina2Dgridpattern.Thisdistributionalsorequiresthatyouspecifythenumberofrows,columns,anddistancebetweeneachelement.Notethattheelementisignoredinthisdistribution.Thenumberofobjectsinsertedintothesimulationwillbeequaltothenumberofrowsmultipliedbythenumberofcolumns.

linear-x:Modelsevenlyplacedinarowalongtheglobalx-axis.

linear-y:Modelsevenlyplacedinarowalongtheglobaly-axis.

linear-z:Modelsevenlyplacedinarowalongtheglobalz-axis.

Foramoreadvancedexampleyoucancheckthepopulation.worldworldfiledeployedwithGazebo.

Andofcourse,youcantestitbytyping:

gazeboworlds/population.world



BuildingEditor

ThistutorialdescribestheprocessofcreatingabuildingusingtheBuildingEditor.

Overview

OpentheBuildingEditor

MakesureGazeboisinstalled.

Startupgazebo.

$gazebo

OntheEditmenu,gotoBuildingEditor,orhitCtrl+Btoopentheeditor.



Graphicaluserinterface

Theeditoriscowww.sm136.commposedofthefollowing3areas:

ThePalette,whereyoucanchoosefeaturesandmaterialsforyourbuilding.

The2DView,whereyoucanimportafloorplantotraceover(optional)andinsertwalls,windows,doorsandstairs.

The3DView,whereyoucanseeapreviewofyourbuilding.Itisalsowhereyoucanassigncolorsandtexturestodifferentpartsofyourbuilding.



Importafloorplan

Youmaycreateascenefromscratch,oruseanexistingimageasatemplatetotraceover.Thisimagecanbe,forexample,a2Dlaserscanofabuilding.

Clickheretogetanexamplefloorplan,thenproceedasfollows:

ClickontheImportbutton.TheImportImagedialogwillcomeup.

Step1:ChoosetheimageyoupreviouslysavedonyourcomputerandclickNext.



Step2:Tomakesurethewallsyoutraceovertheimagecomeupinthecorrectscale,youmustsettheimage''sresolutioninpixelspermeter(px/m).Ifweknewtheresolution,wecoulddirectlytypeitinthedialogandclickOk.Inthisexamplewedon''tknowtheresolution,butweknowthereal-worlddistancebetweentwopointsintheimage(forexample,thetopwallof7.5m),sowecanusethattocalculatetheresolution:

a.Click/releaseononeendofthewall.Asyoumovethemouse,anorangelinewillappearasshownbelow.

b.Click/releaseattheendofthewalltocompletetheline.

c.Nowtypethedistanceinmetersinthedialog(7.5minthiscase).Theresolutionwillbeautomaticallycalculatedforyoubasedonthelineyoudrew.

d.YoucanthenclickOk.



Theimagewillappearonthe2DViewproperlyscaled.

Tip:Onceyou''veaddedmorelevels,youcanimportafloorplanforeachbyrepeatingthesameprocess.

Addfeatures

Addwalls

Traceallwallsonthefloorplanasfollows.Keepinmindthatwewillattachwindowsanddoorstothewallslater,sohereyoucandrawthewallsoverthem.Don''tworrytoomuchifthewallsarenotperfect,wewilleditthemlater.

OnthePawww.shanxiwang.netlette,clickonWall.

Onthe2DView,click/releaseanywheretostartthewall.Asyoumovethemouse,thewall''slengthisdisplayed.

Clickagaintoendthecurrentwallandstartanadjacentwall.

Double-clicktofinishawallwithoutstartinganewone.

Tip:Youcanright-clickorpressEsctocanceldrawingthecurrentwallsegment.

Tip:Bydefault,wallssnapto15°and0.25mincrementsandalsototheendpointsofexistingwalls.Tooverridethis,holdShiftwhiledrawing.



Addwindowsanddoors

Note:Currently,windowsanddoorsaresimpleholesinthewall.

Let''sinsertwindowsanddoorsatthelocationsshownonthefloorplan.

OnthePalette,clickonWindoworDoor.

Asyoumovethemouseinthe2Dview,thefeaturetobeinsertedmoveswithit,asdoesitscounterpartinthe3DView.

Tip:Windowsanddoorsautomaticallysnaptowallsasyouhoveroverthem.Thedistancestotheendsofthewallaredisplayedasyoumove.

Clickonthedesiredpositiontoplacethefeature.



Tip:Itmightbedifficulttoseewherethefeaturesareonyourfloorplanafterthewallshavebeendrawnontopofit.Tomakeiteasier,atthetopofthe2DView,youcanchoosetovieworhidethefloorplanorfeaturesforthecurrentlevel.Youcanalsousehotkeystotogglevisibility,FforfloorplanandGforfeatures.



Addstairs

Therearenostaircasesonthisfloorplan,butwewillinsertoneanyways.

OnthePalette,clickonStairs.

Asyoumovethemouseinthe2Dview,thestaircasetobeinsertedmoveswithit,asdoesitscounterpartinthe3DView.

Chooseapositionforyourstaircaseandclicktoplaceit.



Addlevels

We''reprettymuchdonewithLevel1.Let''saddanotherleveltoourbuildingsoourstaircaseendsupsomewhere.

Atthetopofthe2DView,clickon+toaddalevel.Alternatively,right-clickthe2DViewandchooseAddalevel.

Whenanewlevelisadded,afloorisautomaticallyinserted.Iftherearestairsonthelevelbelow,aholeabovethestairswillbecutoutfromthefloorwhenthebuildingissaved.

Note:Currently,allfloorsarerectangular.

Tip:Beforeaddingalevel,makesureyouhavewallsonthecurrentleveltobuildontopof.

Tip:Currently,allthewallsfromthelevelbelowarecopiedtothenewlevel,withdefaultmaterials.Nootherfeaturesarecopied.Youcanmanuallydeletethewallsyoudon''twant.



Edityourbuilding

Note:Becarefulwheneditingyourbuilding;theeditorcurrentlyhasnooptiontoundoyouractions.

Tip:Allmeasurementsareinmeters.

Changelevels

Sinceweaddedalevel,wewerebroughttothenewlevelinthe2Dview.YoucangobacktoLevel1bychoosingitfromthedrop-downlistatthetopofthe2DView.

Tip:Thelevelcurrentlyselectedinthe2DViewwillappearassemi-transparentinthe3DViewandalllevelsbelowitwillappearopaque.Levelsabovewillbehidden-butkeepinmindtheyarestillpartofyourbuilding!

Wecanalsoeditsomelevelconfigurationsifwewant.

Double-clickthe2DViewtoopenaninspectorwithlevelconfigurationoptions.Alternatively,right-clickandchooseOpenLevelInspector.

Youmayhaveaddedlevelsthatyoudon''twant,orperhapsmadeamessinthecurrentlevelandwouldliketostartitover.

Todeletethecurrentlevel,eitherpressthe-buttonatthetopofthe2DView,orright-clickandchooseDeleteLevel.



Editwalls

Wedrewalotofwallsearlier,butmaybetheydidn''tturnoutexactlythewaywewanted.

Inthe2DView,clickonthewalltobeedited.

a.Translatethewallbydraggingittoanewposition.

b.Resizeorrotatethewallbydraggingoneofitsendpoints.

Tip:Bydefault,wallssnapto15°and0.25mincrements.Tooverridethis,holdShiftwhiledrawing.

Double-clickawallinthe2DViewtoopenaninspectorwithconfigurationoptions.Alternatively,right-clickandchooseOpenWallInspector.EditsomefieldsandpressApplytopreviewthechanges.

Todeleteawall,eitherpresstheDeletekeywhileitisselected,orright-clickthewallinthe2DViewandchooseDelete.

Tip:Editingawalltakesattachedwallsintoaccount.

Tip:Deletingawalldeletesalldoorsandwindowsattachedtoit.



Editwindowsanddoors

Nowlet''splayaroundwithwindowsanddoors.Aswedidforthewalls,wecanmanipulatewindowsanddoorsmorepreciselyinafewdifferentways.

Inthe2DView,clickonthefeaturetobeedited.

a.Translatethefeaturebydraggingittoanewposition.Rememberthatwindowsanddoorsautomaticallysnaptowallsanditdoesn''tmakemuchsensetohavethemdetachedfromanywalls,astheyrepresentholesinawall.

b.Rotatethefeaturebydraggingitsrotationhandle.Currently,aslongastheyareattachedtoawall,theirorientationdoesn''tmakeadifference.

c.Resizethefeature''swidthbydraggingoneoftheendpoints.

Double-clickafeatureinthe2DViewtoopenaninspectorwithconfigurationoptions.Alternatively,right-clickandchooseOpenWindow/DoorInspector.

Todeleteafeature,eitherpresstheDeletekeywhileitisselected,orright-clickitinthe2DViewandchooseDelete.



Editstairs

Finally,let''seditthestaircaseweinsertedearlier.Sinceitisnotonthefloorplan,wecangetcreativeandresizeitaswewant.

Inthe2DView,clickonthestaircasetoselectit.

a.Translatethestaircasebydraggingittoanewposition.

b.Rotatethestaircaseinmultiplesof90°bydraggingitsrotationhandle.

c.Resizethestaircasebydraggingoneoftheendnodes.

Double-clickthestaircaseinthe2DViewtoopenaninspectorwithconfigurationoptions.Alternatively,right-clickandchooseOpenStairsInspector.

Todeletethestaircase,eitherpresstheDeletekeywhileitisselected,orright-clickandchooseDelete.

Tip:Inthe2DView,staircasesarevisibleonboththestartandendlevels.



Addcolorsandtextures

Nowthateverythingisproperlyplacedandsized,youcanassigncolorsandtexturestowalls,floorsandstaircases.Rememberthatwindowsanddoorsareonlyholesonthewallandthereforecannothavematerials.

Tip:Thedefaultcoloriswhiteandthedefaulttextureisnone.

Therearetwowaystoaddcolorsandtexturestoyourbuilding:

FromInspectors

Youcanaddcolorandtexturetowalls,stairsandfloorsfromtheWallInspector,StairsInspectorandLevelInspectorrespectively.Simplyopentheinspector,selectyourmaterialsandpressApply.



FromthePalette

ColorsandtexturescanbechosenfromthePaletteandassignedtoitemsonyourbuildingbyclickingontheminthe3DView.

ClickonacolorortextureinthePalette.

Asyoumoveyourmouseinthe3DView,hoveredfeatureswillbehighlighteddisplayingapreviewoftheselectedmaterial.

Clickingonthehighlightedfeatureassignstheselectedmaterialtoit.Youcanclickonasmanyfeaturesasyou''dlike.

Whenyou''redonewiththeselectedmaterial,eitherright-clickthe3Dview,orclickoutsideanyfeaturestoleavethematerialmode.



NewinGazebo5.1:Tochooseacustomcolor,clickonMoreonthePalette.Adialogopenswhereyoucanspecifycustomcolors.



Tip:Eachfeaturecanhaveonlyonecolorandonetexture.Thesamematerialisassignedtoallfacesofthefeature.

Note:Currently,itisnotpossibletoassigncustomtexturesontheBuildingEditor.

Savingyourbuilding

Savingwillcreateadirectory,SDFandconfigfilesforyourbuilding.

Beforesaving,giveyourbuildinganameonthePalette.



Onthetopmenu,chooseFile,thenSaveAs(orhitCtrl+S).Adialogwillcomeupwhereyoucanchoosethelocationforyourmodel.

Tip:UnderAdvancedOptionsyoucansetsomemeta-dataforyourbuilding.



Exit

Note:OnceyouexittheBuildingEditor,yourbuildingwillnolongerbeeditable.

Whenyou''redonecreatingyourbuildingandyou''vesavedit,gotoFileandthenExitBuildingEditor.

Yourbuildingwillshowupinthemainwindow.Inthefuture,youcanfindthebuildinginyourInserttab.









献花(0)
+1
(本文系网络学习天...首藏)