Beruflich Dokumente
Kultur Dokumente
More NextBlog
AsctecPelicanBasics
jueves,6dejuniode2013
BasicWiFicommunicationsetuppart1
ThispostadressessthestepsneededtosetupthecommunicationbetweentheHighLevelProcessor
(HLP)ofthequadrotorandagroundstation(suchasalaptop,computer)throughaWiFiconnection
(betweenthegroundstationandtheAtomboard)andaserialconnection(betweentheAtomboardand
theHLP).Itisbasedontheofficialasctec_mav_frameworkROSTutorialbutshowssomeadditional
problemsaddressedintheconfiguration.
Itisseparatedintwoparts:thefirstonedealswithmorehardwarerelatedissues,whilethesecond
oneismorerelatedtothesoftwareconfiguration.
IasumethatyouhavetheAsctecQuadrotorPelicanrunningwithUbuntu10.04,havealready
installedROS(thiswasdoneusingROSFuerte,butshouldworkwithotherversions),haveinstalled
theasctec_mav_frameworkpackageandhaveaWiFiconnectionwithWPA2.Ontheotherside,I
asumeyouwillbeusingacomputerwithUbuntuandROSasagroundstation(thiswastestedusing
Ubuntu12.04andROSFuerte),andhaveinstalledtheasctec_mav_frameworkonthiscomputer
also.
TheideaistobeabletoinitializethequadrotorwithoutusingtheLVDSscreen(soitisreadytofly),
forthistheSecureShell(SSH)protocolavailableinUbuntuisused.SSHallowsyoutologintothe
quadrotorandstarttheasctec_mav_frameworkROSpackageusingtheterminalfromyour
groundstation.Thiswayyourquadwillbeabletoreceivecommandsandstart/stopexecutionwithout
theneedofamouse,keyboardorscreen.
AtomboardHLPConnection
ThefirststepistochecktheconnectionbetweentheAtomboardandtheHLP.Thisshouldbedone
usingthecablewitha"loop"ontheHLPside.
ThisshouldconnectoneoftheserialportsoftheAtomboard(/dev/ttyUSB0or/dev/ttyUSB1,I
suggestthefirstone,butincaseyouneedtousethe/dev/ttyUSB1remembertochangethe
configurationparametersaccordingly).
Archivodelblog
2013(3)
julio(2)
junio(1)
BasicWiFicommunicationsetup
part1
Datospersonales
Pino
Vertodomiperfil
WiFiSetup
ItisneededthatthequadrotorconnectsautomaticallytotheWiFiatstartup.Forthis,anewnetwork
managerissuggested:WPASupplicant.
ToinstallWPAsupplicantinyourquadrotor:
Thenuninstallothernetworksmanagers(forexampleWICDorNetworkManager):
ThenextstepistoconfigureittoconnecttoyourWiFinetwork.Runthisonaterminal(assumingyour
wirelessnetworkiscalledmy_wifi_network,thisisknownasSSID,andthepasswordis
my_password):
Thiswillshowinthesameterminalsomethinglikethis:
network={
ssid="my_wifi_network"
#psk="my_password"
psk=5dd3c4758a980d50d133d0cd43dc6a0460211f397925522d74e9e3b622420304
}
Now,youshouldcreateafiletostorethisconfigurationinformation(forexamplein
/etc/wpa_supplicant/wpa_supplicant.conf).Onewaytodothisisinanewterminalrun:
Thiswillopengedit,whereyoucanpastethenetworkinformationdirectlyandsavechanges.
Thenextstepistoopenthe/etc/network/interfacesfileandeditthewlan0section. Openit
usinganyeditor,forexample:
Andmodifythewlan0sectionsoitlookslikethis:
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
post-up /sbin/iwconfig wlan0 power off
ThewpaconflineloadsthefilecreatedinthelaststepwiththeWiFiconfiguration.Thepostupline
disablespowermanagementpermanently,thisisdonetoavoidhighlatencies.Youcancheckthe
powermanagementstatususingthecommand:
SerialPortsAccessandGrub
IncaseyouareusingUbuntu12.04,youneedtorunthefollowingcommandinordertousetheserial
portswithoutrootpermissions(thisaddstheusertothedialoutgroup):
Tospeedupbootandremovesomei8042relatedmessagesaddthefollowinglineinthefile
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="i8042.noaux=1"
Andupdategrub:
sudo update-grub
ConfigureStaticIP
ToallowthequadrotorandthegroundstationtoeasilylocateeachotherwhileusingSSHitis
convenienttogivebothastaticIPandgivebothmachinesnames.TogivestaticIPsthereareatleast
twomethods:
1.Usingtherouterconfiguration:
YoucanconfigureyourroutertogiveanIPbasedontheMACaddressofthedeviceconnected.Here
isanexampleofhowtodothis:http://resource.dlink.com/connect/masteringstaticipaddresses/
2.Settingupeachmachine:
Insomecasestherouterdoesn'tsupportstaticIPsbyMAC,oryoudon'thaveaccesstothem.Inthis
sectionIwillexplainhowIsetupeachmachinetoaskforastaticIPaddress.
2.1Settingupthegroundstation:
AssumingyouareusingUbuntu12.04.Youcanclickonthewirelessiconandchooseedit
connections.
Thenselectthe"wireless"tab,chooseyourconnectionandclickEdit.
Thenyoushouldchecktheoption"Connectautomatically"andthengototheIPv4Settingstab.
Choose"Manual"asMethod.OntheAddressessection,clickAdd.Ifyouareonyourprivate
network,youcanusuallychooseasaddresstheip192.168.*.*(forexample192.168.1.52).The
netmaskusuallyis255.255.255.0,andthegateway192.168.*.1.Don'tforgettheDNSserveraddress.
Afterthisreconnecttoyourwirelessnetwork.
Tocheckthateverythingworkedfine,youcanrunthecommandifconfigonaterminal,this
shouldprinttheconnectioninformationintheterminal.Checkthewlan0sectionandtheipnextto
inetaddr.
2.2Settingupthequadconnection
BasedontheinstructionsgivenheretosetupastaticIP,youshouldagainmodifythe
/etc/network/interfacesfilesoitlookslikethis:
auto wlan0
iface wlan0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1, 192.168.0.2
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
post-up /sbin/iwconfig wlan0 power off
Noticenowthestaticvalueinsteadofdhcpandtheotherparametersadded(address,netmask,
etc.).
Nowyoushouldreboot,andafterloggingyoushouldrunthecommandifconfigandchecktheIP
iscorrectlyset.
Thecheckdiskerror
Weareconfiguringourquadsoitisabletobootandconnecttotheinternetautomatically,butyou
mayencounterthefollowingproblem.
IfyouturnofftheAtomboardanddisconnectanypowersourcefromit(eitherbatteryoralternative
powersources),youmayfindthatthenexttimeyouturnitonityouencountersomethingalongthe
linesof:
This(Ibelieve)iscausedbeforethelastmounttimeisstoredbuttheinternaldateisresetwhenthere
isnopowersource,soitregistersthelastmounttimeasinthefutureandforcestocheckthediskfor
errors.
Toavoidthis,Ifollowedtheinstructionsfoundhere.Youmusteditthe/etc/e2fsck.conffileand
addthefollowing:
[problems]
# Superblock last mount time is in the future (PR_0_FUTURE_SB_LAST_MOUNT).
0x000031 = {
preen_ok = true
preen_nomessage = true
}
# Superblock last write time is in the future (PR_0_FUTURE_SB_LAST_WRITE).
0x000032 = {
preen_ok = true
preen_nomessage = true
}
Thistellse2fsckthattheproblemcanbeautofixedwithoutmentioningit.
ThenextpartshowshowtosetupSSHcommunicationandconfigureROStoworkonboth
machines.
PublicadoporPinoen22:05
Recomendar esto en Google
Etiquetas:asctec,basic,communication,pelican,quadrotor,wifi
1comentario:
JooAntnioAmarante 31deenerode2014,9:36
Hi,
MygrouphavejustacquiredtheAscTecPelican,andIamworkingwithit.Isetupanadhoc
connectionbetweenthePelicanandmycomputer.Itactuallyworksfine,butIalwayshaveto
createanewconnectionwhenIshutdownthesystem.Iamworkingonit,andthereseems
tobeasolution.Anyway,Iwaswonderingifwecouldstayincontacttohelpeachother,and
maybeworkonmoretutorials!Thanksinadvance,JooAntnio
Responder
Introduce tu comentario...
Comentarcomo:
Publicar
AhmedKhalifa(Google)
Salir
Vistaprevia
Entradamsreciente
Avisarme
Pginaprincipal
Suscribirsea:Enviarcomentarios(Atom)
PlantillaAwesomeInc..ConlatecnologadeBlogger.