AllOuster sensorshavebeenevaluatedto beClass 1 laser products per 60825-1: 2014 (Ed. 3) and
operatein either the850nmor 865nm band.
Tousles capteursOuster répondentaux critères des produits laser de classe 1, selon la norme IEC60825-1: 2014 (3ème édition) et émettent dans le domaine de l’infrarouge, à une longueur d’onde
deXXXXXXXXX environ.
FDA21CFR1040 Notice: All Ouster sensors complywithFDA performance standardsfor laser productsexcept fordeviationspursuant to LaserNotice No. 56, dated January 19,2018.
Notice FDA 21CFR1040: Tous les capteurs Ouster sont conformes aux exigences de performances
établiesparlaFDA pour les produits laser,à l’exceptiondesécartsen application de l’avisnº56, daté
du19 janvier 2018.
YouruseofanyOustersensorissubjecttothe TermsofSalethat yousignedwith Ousteroryour
distributor/integrator. Includedinthese terms is theprohibitionon:
Removingor otherwise opening thesensorhousing
Inspectingthe internals of thesensor
Reverse-engineeringanypartofthe sensor
Permittingany thirdpartytodo any oftheforegoing
Operating the sensor without either the attached mount with which the sensor is shipped, or
attaching the sensor to a surface of appropriate thermal capacity runs the risk of having the
sensoroverheat under certain circumstances.
This product emits Class 1 invisible laser radiation. The entire window is considered to be the
laseraperture. WhileClass1 lasersare consideredtobe“eyesafe”,avoidprolongeddirectviewingof the laser and donot use optical instrumentstoview the laser.
Whenoperatedin an ambient temperature >40�°C, the metallic surfaces of the sensor may be
hot enough to potentially cause skin burn. Avoid skin contact with the sensor’s base, lid and
heatsinkwhen the sensor isoperatedunder these conditions.
PRECAUTIONS:
Tous les capteurs Ouster sont des unités hermétiquement scellées, qui ne peuvent être entretenuesou modifiées parl’utilisateur.
L’utilisationde commandes, de réglages, ou l’exécution de procédures autres que celles spécifiéesdans le présent documentpeuvententraîner des rayonnementslaser dangereux.
L’utilisationd’un capteur Ouster est soumise aux conditions de vente signées avecOusterou le
distributeur/intégrateur,incluantl’interdiction de:
Retirerou ouvrir dequelquefaçon le boîtier ducapteur
Analyserles composants internesdu capteur
Pratiquerla rétro-ingénieriedetoute ou partie ducapteur
Autoriserune tiercepersonneà mener les actionslistéesci-dessus
L’utilisationdu capteur sans sondissipateur thermique fourni lors de la livraison ou une utilisation qui ne maintiendrait pas un contact suffisant avec une surface aux propriétés thermiques
adéquates, présentent toutes deux un risque de surchauffe du capteur dans certaines circonstances.
Ce produit émet un rayonnement laser invisible de classe 1. L’ouverture de sortie du laser est
constituéepar la fenêtre ducapteurdans sa totalité. Même si les lasersde classe 1 ne sont pas
considéréscomme dangereux pourlesyeux, ne regardezpasdirectement le rayonnementlaser
defaçonprolongéeetn’utilisez pasd’instruments optiquespour observerle rayonnementlaser.
Lorsd’une utilisation à température ambiante supérieure à 40°C, la surface métallique du capteur peut présenter des risques de brûlures pour la peau. Dansces conditions, il est important
6
Page 7
d’évitertout contact avecla partie superieure, labaseou le dissipateur thermiqueducapteur.
EquipmentLabel: Notethattheequipment label,which includesmodeland serialnumberandnotice
thatthe unitis aClass 1LaserProduct,isaffixed tothe undersideof theSensorEnclosureBaseitself.
It is only visible after the attached mount withwhich the Sensor is shipped, is removed. Please refer
tolocation details in theMountingsection of the HardwareUser Manual.
L’étiquettedel’équipement,comprenantlemodèle,lenumérodesérie,etlaclassificationduproduit
laser (ici, classe 1), est apposée au dessous de la base du boîtier du capteur. Il n’estvisible qu’après
avoirretiré le diffuseur dechaleur aveclequel lecapteurest expédié. L’emplacement est décritavec
précisiondansleManuel d’UtilisateurHardware(HardwareUserManual), danslasection«Mounting»
ElectromagneticCompatibility: YourOustersensoris anFCC 47CfR15Subpart Bdevice. Thisdevice
complies with part 15 of the FCC Rules. Operation is subject to the following conditions: (1) This
devicemaynotcauseharmfulinterference,and(2) thisdevicemustacceptanyinterferencereceived,
includinginterference that maycause undesired operation.
“Ouster”,“OS0”,“OS1”, and “OS2” areallregisteredtrademarks of Ouster,Inc. They may not be used
withoutexpress permission fromOuster,Inc.
Ifyou haveany questions about theabovepoints, please contact[email protected].
1.2ProperAssembly,Maintenanceand SafeUse
AllOustersensorsmaybeeasilysetupbymountingtothebasetoamountingwiththecorrectmounting hole pattern and following the interconnection instructions delineated in the Mounting section
of the Hardware User Manual. Any mounting orientation is acceptable. Each sensor is shipped attachedtoa mount for test or normal use specified operating temperaturerange,but thesensor may
bemounted directly to anyappropriatemount with Thermal Capacity appropriateforthe application
of the user. Please contact Ouster for assistance with approving the use of user specific mounting
arrangements.
Any attempt to utilize the sensor outside the Environmental parameters delineated in the relevant
datasheet for yourOuster sensor mayresultin voiding ofthewarranty.
When power is applied, the sensor powers up and commences boot-up with the laser disabled. The
bootupsequenceisapproximately60sinduration,afterwhichtheinternalsensoropticssubassembly
commencesspinning,andthelaserisactivated,andtheunitoperatesinthedefault1024x10Hzmode.
Whenthe sensor is running, and the laserisoperating,a faint red flickeringlight may be seen behind
theoptical window. Note thattheallOuster sensors utilize eitheran850nm or 865 nm infraredlaser
thatisonlydimlydiscernabletothe nakedeye,whiletransmittingalasereye-safefundamental signal
in the respective IR band. Refer to the appropriate Hardware User Manual to determine the specific
wavelength of your sensor. While the sensor is fully Class 1 eye safe, Ouster strongly recommends
againstpeeringintotheopticalwindowatcloserangewhilethesensorisoperating. AllOustersensors
arehermetically sealed units, and are not user-serviceable. Any attempttounseal the enclosure has
thepotential to exposetheoperator tohazardouslaser radiation.
Ouster sensors are equipped with a multi-layer series of internal safety interlocks to ensure complianceto Class 1 LaserEyeSafe limits.
andresolutionsotherthan thedefault valuesof1024x10 Hzresolution. In allavailablecombinations,
the unit has been evaluated by an NRTLto remain within the classification of a Class 1 Laser Device
asper IEC 60825-1:2014 (Ed. 3).
1.2.1 Assemblagecorrect et utilisation sûre
TouslescapteursOusters’installentfacilementenfixantlabasesurunsupportpercédetrousconcordantsetensuivant lesinstructions d’interconnexiondécrites leManuel d’UtilisateurHardware (HardwareUserManual). Touteorientationdemontageestacceptable. Chaquecapteurestexpédiééquipé
d’un dissipateur de chaleur, utilisable en phase de test et en conditions normales. Néanmoins tout
autre support présentant une capacité thermique appropriée pour l’application de l’utilisateur peut
êtreutilisé. Veuillezcontacter Ouster dansle cas où unmontagespécifique à votreapplication serait
nécessaire.
Toutetentative d’utilisation du capteur en dehors des paramètresenvironnementauxdéfinis dans la
fichetechnique de votrecapteur Ouster peutentraînerl’annulationde la garantie.
Lorsquelecapteurestsous tension,celui-cidémarreetcommencesoninitialisationaveclelaserdésactivé. Letempsdedémarrageestd’environ60s,aprèsquoilesous-systèmeoptiqueentreenrotation
etlelaserestactivé, lecapteuropèrealorsdansson modepardéfautde1024x10Hz. Lorsquelecapteur est en marche et que le laser est active, on peut apercevoir une faible lumière rouge vacillante
derrièrela vitreteintée. Tous les capteurs Ouster utilisent des longueurs d’ondesinfra-rouge de 850
ou865nmàpeineperceptiblepourl’œilhumain,etlerayonnementlaserIRémisestsansdangerpour
les yeux. Lalongueur d’ondespécifique de votre capteur est disponible dans le Manuel d’Utilisateur
Hardware (Hardware User Manual). Cependant, bien que les rayonnements laser de classe 1 soient
sans danger dans des conditions raisonnablement prévisibles, Ouster recommande fortement de ne
pasregarderfixementlavitreteintéependantquelecapteurestenmarche. TouslescapteursOuster
sontdesunitéshermétiquement scellées,quine peuventpasêtreentretenues,modifiéesouréparées
parl’utilisateur. Toutetentatived’ouverturedu boîtier a pour risque d’exposerl’opérateuràun rayonnementlaser dangereux.
LescapteursOustersontéquipésd’unesérie dedispositifsdesécuritéàplusieursniveaux,defaçonà
assureren toutes circonstancesle respect des limitesd’irradiancecorrespondant aux rayonnements
lasersde classe 1, sansdangerpour les yeux.
L’interfaceutilisateurdu logicielducapteur peutêtreutilisée pour configurerle capteurselonun certainnombredecombinaisonsdevitessesdebalayageetderésolutionsautresquelesvaleursutilisées
pardéfaut, respectivementde1024 x 10 Hz.
8
Page 9
2ConnectingtoSensor
YourOustersensorrequiresacomputerwitha gigabitEthernetconnection anda24Vsupply. Optionally you may time synchronize the sensor through an external time source or through the computer
viaPTP.
2.1NetworkConfiguration
The sensor is designed to communicate with a host machine through a variety of different methods
sucha DHCP,IPv6/IPv4 link-local, and staticIP.
On most systems you should be able to connect the sensor into your network or directly to a host
machineand simple use the senorhostname to communicate withit.
Thesensor hostname is, os-991234567890.local,where991234567890 is the sensorserialnumber.
Formoredetailedguidanceon communicatingwiththe sensoronvarious operatingsystemsandnet-
worksettings please referencethe Networking Guide in the Appendix.
CommandsforsettinganddeletingastaticIPaddresscanbefoundintheHTTPAPIReferencesection.
Ousterdefines twocoordinateframes:
The Lidar Coordinate Frame follows the Right Hand Rule convention and is a point cloud-centric
frameof referencethat is the simplest frame in which to calculate and manipulate point clouds. The
X-axispoints backwards towardstheexternalconnector,which is an unintuitive orientation that was
deliberatelychosen tomeetthe following criteria:
dataframes split at thebackof the sensor i.e. theexternalconnector
dataframes start with the azimuthangleequal to 0°
TheSensor CoordinateFrame followstheRight Hand Ruleconventionandisa mechanical housingcentric frame of reference that follows robotics convention with X-axis pointing forward. Ousterprovideddriversandvisualizers representdatain the Sensor CoordinateFrame.
Note: All Ouster coordinate frames follow the Right Hand Rule, allowing for standard 3D transformationmatrix math to convertbetweenthem. For multi-sensor systemsthat require calibration, this
Linear Algebra-based approach can be convenient. However, customerswith single-sensor systems
mayfind it moreintuitiveto stayinthe Lidar CoordinateFrameand take arithmeticshortcuts.
3.1.1 Lidar Coordinate Frame
The Lidar Coordinate Frame is defined at the intersection of the lidar axis of rotation and the lidar
optical midplane (a plane parallel to Sensor Coordinate Frame XY plane and coincident with the 0°
elevationbeam angle of thesensor).
TheLidar CoordinateFrame axesare arrangedwith:
positiveX-axispointedat encoder angle 0°and the external connector
positiveY-axispointed towardsencoder angle 90°
positiveZ-axis pointedtowards the topof the sensor
TheLidar Coordinate Frameis marked in bothdiagrams below with XL,YL,and ZL.
encoder_count of the measurement block
range_mm value of the data blockof the i-th channel
Fromthe get_beam_intrinsics TCP command:
lidar_origin_to_beam_origin_mm value
beam_altitude_angles array
beam_azimuth_angles array
Thecorresponding 3D point canbecomputed by
r = range_mm
n = lidar_origin_to_beam_origin_mm
θ
encoder
θ
azimuth
= 2π ·(1 −
= −2π
ϕ = 2π
beam_altitude_angles[i]
encoder_count
90112
beam_azimuth_angles[i]
360
360
)
x = (r − n) cos(θ
= (
y
r−n
)
sin
(
encoder
θ
encoder
+ θ
+
azimuth
θ
azimuth
) cos(ϕ) + n cos(θ
)
cos
(ϕ) +
sin
n
(
encoder
θ
encoder
)
)
z = (r − n) sin(ϕ)
FiguresFig. 3.1and Fig.3.2 show,respectively,a top-down andside view of thesensor.
Figure3.1: Top-downview of LidarCoordinate Frame
12
Page 13
Figure3.2: Sideview ofLidar Coordinate Frame
3.1.3 SensorCoordinate Frame
The Sensor Coordinate Frame is defined at the center of the sensor housing on the bottom, with the
X-axispointedforward,Y-axispointedtotheleftandZ-axispointedtowardsthetopofthesensor. The
external connector is located in the negative x direction. The Sensor Coordinate Frame is marked in
thediagram below withXS,YS,ZS.
Figure3.3: Top-downviewof Sensor CoordinateFrame
13
Page 14
Figure3.4: Sideview ofSensor Coordinate Frame
3.1.4 Combining Lidar and SensorCoordinate Frame
The Lidar Coordinate Frame’s positive X-axis (0 encoder value) is opposite the Sensor Coordinate
Frame’s positive X-axis to center lidar data about the Sensor Coordinate Frame’s positive X-axis. A
single measurement frame starts at the Lidar Coordinate Frame’s 0° position and ends at the 360°
position. This is convenient when viewing a “range image” of the Ouster Sensor measurements, allowing the “range image” to be centered in the Sensor Coordinate Frame’s positive X-axis, which is
generallyforward facingin most robotic systems.
The Ouster Sensor scans in the clockwise direction when viewed from the top, which is a negative
rotationalvelocityaboutthe Z-axis. Thus, asencoderticksincreasesfrom0to90,111,theactual angle
aboutthe Z-axis intheLidar Coordinate Framewill decrease.
3.1.5 Lidar Intrinsic Beam Angles
The intrinsic beam angles for each beam may be queried with a TCP command get_beam_intrinsics
to provide an azimuth and elevation adjustmen offset to the each beam. Theazimuth adjustment is
referencedoff of the current encoder angle and the elevation adjustment is referenced from the XY
planein the Sensor and LidarCoordinate Frames.
3.1.6 LidarRange Data To SensorXYZ CoordinateFrame
Forapplicationsthatrequirecalibration againstaprecision mountoruse theIMUdataincombination
withthelidar data, the XYZ points should be adjusted to the SensorCoordinateFrame. Thisrequires
aZtranslation andarotationofthe X,Y,Zpointsaboutthe Z-axis. Theztranslationistheheight ofthe
lidaraperturestopabovethesensororigin, whichis variesdependingon thesensoryouhave,andthe
datamust berotated180°aroundthe Z-axis. This informationcan be queriedover TCPintheformof
ahomogeneous transformationmatrixin row-major ordering.
The table below lists all product lines’ distances of the aperture stop above the sensor origin for use
inthe z translation.
ProductLineLidar aperture stopabove sensor origin
OS036.180mm
OS136.180mm
OS274.296mm
3.1.7 IMU Data To SensorXYZ CoordinateFrame
TheIMUis slightly offsetin the Sensor Coordinate Frameforpractical reasons. The IMU origin in the
Sensor Coordinate Frame can be queried over TCP in the form of an homogeneous transformation
matrixin row-major ordering.
theirlidar packet formatwhich reduces their datarateswhich is notbackwardscompatible with prev2.0.0clients. Pleaserefer to the Lidar Packet Format Update section for more information on this
change.
Lidardata packetsconsist of16Measurement Blocksand vary insizerelativetothe numberofchannels in the sensor. The packet rate is dependent on the lidar mode. Words are 32 bits in length and
littleendian. By default, lidarUDPdata is forwarded toPort 7502.
Lidar frames are composed of 512, 1024, or 2048 measurement blocks, depending upon lidar mode
andarecompletely deterministic in number per frame and their monotonic order and position within
lidardata packets. Thisdeterminismallows forefficientlookup table-based decodinginclients.
EachMeasurement Block contains:
HeaderBlock [128 bits]
Timestamp [64bit unsigned int]-timestamp of the measurementinnanoseconds.
MeasurementID[16bitunsignedint]-asequentiallyincrementingmeasurementcounting
upfrom 0 to511,or 0 to1023, or 0 to2047 dependingonlidar_mode.
Frame ID [16 bit unsigned int] - index of the lidar scan. Incrementsevery time the sensor
completesa rotation, crossingthe zero point oftheencoder.
Encoder Count [32 bit unsigned int] - an azimuth angle as a raw encoder count, starting
from0withamaxvalueof90,111-incrementing44tickseveryazimuthanglein2048mode,
88ticksin1024mode,and176ticksin512mode. Note: theencodercountisredundantwith
theMeasurement ID and willbedeprecated in thefuture.
NChannel Data Blocks [96bits each]
Range [32 bit unsigned int - only 20 bits used] - range in millimeters, discretized to the
mentare reported.
Reflectivity [16 bit unsigned int] - sensor Signal Photons measurements are scaled based
on measured range and sensor sensitivity at that range, providing an indication of target
reflectivity.Calibrationofthismeasurementhasnotcurrentlybeenrigorouslyimplemented,
butthis will be updatedina future firmwarerelease.
or zero-padded data in its channels’ Data Blocks. Valid = 0xFFFFFFFF, Padded = 0x0. If the
Measurement Block Status is Padded (e.g. in the case of channel data being dropped or if the
Measurement Block is outside of the azimuth window), values within the Channel Data Blocks
willbe 0, butvalueswithin the Header Block remainvalid.
17
Page 18
3.2.2 LidarData PacketSize Calculation
The table below shows the lidar data packet size breakdown for all products. Since the size of the
measurementblockvariesproportionalthenumberofchannelsinasensors,allsensorswiththesame
numberof channels havethe same lidar packetdata structure and size.
ProductNumberof wordsin Mea-
surementBlock
OS1-16532123,392
OS0-32, OS1-32,
OS2-32
OS0-64, OS1-64,
OS2-64
OS0-128,OS1-
128,OS2-128
1014046,464
19778812,608
3891,55624,896
Size of single MeasurementBlock (Bytes)
Sizeoflidar
packet(Bytes)
3.3IMU Data
3.3.1 IMUData Format
IMU UDP Packets are 48 Bytes long and by default are sent to Port 7503 at 100 Hz. Values are little
endian.
EachIMU data block contains:
IMUDiagnosticTime[64bit unsignedint] -timestamp ofmonotonicsystemtime sinceboot in
nanoseconds.
AccelerometerReadTime [64 bitunsignedint] - timestamp foraccelerometer time relativeto
timestamp_mode in nanoseconds.
Gyroscope Read Time [64 bit unsigned int] - timestamp for gyroscope time relative to times-
tamp_mode in nanoseconds.
Accelerationin X-axis[32bit float] - accelerationin g.
Accelerationin Y-axis[32bit float] -accelerationin g.
Accelerationin Z-axis[32bitfloat] - acceleration ing.
AngularVelocityabout X-axis[32 bitfloat]- Angular velocity indegper sec.
AngularVelocityabout Y-axis[32bitfloat] - Angular velocityindeg per sec.
AngularVelocityabout Z-axis [32 bit float]-Angular velocity in degpersec.
18
Page 19
Note that the first timestamp (Words0,1)is fordiagnostics only and is rarelyused under normal operation.
Thesecond twotimestamps,(Words2,3)and(Words4,5),aresampled onthe sameclock asthelidar
data,so should be used formost applications.
Ousterprovidestimestampsforboththegyroandaccelerometerinordertogiveaccesstothelowest
levelinformation. Inmostapplications it is acceptable touse the averageof the twotimestamps.
3.4DataRates
The table below calculates the data of all products operating at the highest lidar modes, 2048x10 or
1024x20 and assuming a default azimuth window of 360°. Providing a custom azimuth window can
further lower data rate. See the Azimuth Window section for details on setting a custom azimuth
window.
Lidar packets account for >99% of data coming from the sensor. For most applications, a gigabit
Ethernetnetwork connection isrequiredfor reliableperformance.
Configuring the azimuth window is a feature to only turn on the UDP lidar data within a region of
interest. The region of interest is defined by a min bound and a max bound, both in millidegrees. As
areminder,angles in thisframe incrementcounter-clockwisewhen viewedfromthetop. Belowisthe
LidarCoordinate Framefroma top-down perspective:
0°towards theexternalconnector
90°a quarter turn counter-clockwisefromthe connector
180°opposite the connector
270°three quarter turns counter-clockwisefrom the connector
Configuringtheazimuthwindowlowerstheaverageoutputdatarateofthesensorbutdoesnotaffect
thepeak output datarate ofthesensor. Italsodoes not stopthe lasersfromfiring andthusdoes not
havean effecton power consumption orthermals.
21
Page 22
4.1.1 ExpectedSensorBehavior
The sensor will round the input azimuth window bounds tothe nearest Measurement Block IDs generating new ID-based bounds. The new bounds are used to mask Measurement Blocks in the lidar
data packets. Lidarpackets containing only masked Measurement Blocks are not output, and there
may partially masked Measurement Blocks in the two bookended lidar packets in each frame. The
Measurement Block Status field willindicatethe validor masked/paddedMeasurement Blocks in any
partiallymaskedlidar packets. (SeetheLidar Data section fordetailson the lidar data format.)
Thevisualizedoutput willcontain jaggededges causedbythestaggered,nonzeronatureofthebeam
azimuth angles. It is necessary to set more conservative (wider) bounds to push the jagged edges
beyondthe desired window. This can be determinedthrough trial and erroror calculated deterministicallywith knowledge of thequeryablebeam azimuth angles.
4.1.2 Azimuth WindowExamples
TheTCP APIGuidelists the command forsetting an azimuth window. Below areexamplesettings:
// defaults setting of 360° window:
set_config_param azimuth_window [0, 360000]
// this will also default to a 360° window
set_config_param azimuth_window [0, 0]
// Set a region of interest between 0° to 180°.
set_config_param azimuth_window [0, 180000]
// Set a region of interest between 270° to 90° with 180° field of view
set_config_param azimuth_window [270000, 90000]
// Set a region of interest 90° to 270° with 180° field of view
set_config_param azimuth_window [90000, 270000]
// Set a region of interest between 0° to 90° with 90° field of view
set_config_param azimuth_window [0, 90000]
// Set a region of interest 90° to 360° with 270° field of view
set_config_param azimuth_window [90000, 0]
4.2PhaseLock
Phaselocking allowsa sensorto consistentlypass throughaspecific angleat a specifictime on each
rotation. Phaselockingisusefulforsynchronizingasensorwithotherdevicesincludingcamera,radar,
andother lidar.
A sensor must first be time-synchronized from an external source and must be in either the
TIME_FROM_PTP_1588 or TIME_FROM_SYNC_PULSE_IN timestamp_mode beforeentering phaselock.
22
Page 23
4.2.1 Phase LockingReferenceFrame
Phase locking commands use angles defined in the Lidar Coordinate Frame in millidegrees. As a reminder, angles in this frame increment counter-clockwise when viewed from the top. Below is the
LidarCoordinate Framefroma top-down perspective:
0°towards theexternalconnector
90°a quarter turn counter-clockwisefromthe connector
180°opposite the connector
270°three quarter turns counter-clockwisefrom the connector
4.2.2 Phase Locking Commands
TheTCP APIGuidelists the twocommands needed to acheivephase lock.
Commandto enable or disablephaselock:
// by default, phase_lock_enable is false
set_config_param phase_lock_enable <true/false>
Commandto set the phaselockoffset angle in theLidar Coordinate Frame:
23
Page 24
// by default, phase_lock_offset value is 0
// <angle_in_millidegrees> is an int from [0, 360000]
set_config_param phase_lock_offset <angle_in_millidegrees>
Assumingthethreesensorsareproperlytimesynchronizedviaanexternalsource,thefollowingshows
the netcat console input commands and responses from configuring the sensors so that they point
forwardat the sametime:
Startingthe firmwarev2.0.0,thesensor canbecommanded inand outofa low-powerStandbyOperatingMode that can be usefulfor power,battery,or thermal-conscious applications of thesensor.
The TCPconfig paramoperating_mode has a default value of "NORMAL". Setting it to"STANDBY" puts the
sensorinto Standby OperatingModeupon reinitialization.
4.3.1 ExpectedSensor Behavior
Powerdraw in Standby mode 5W. The motor does not spin, and light is not visible from the window.
However,thesensor is on and listeningto commands. The sensorstatuswill be "STANDBY".
// set sensor into Standby mode and keep sensor in Standby mode upon power-up at next use
set_config_param operating_mode "STANDBY"
set_config_param
reinitialize
reinitialize
save_config_params
save_config_params
// set sensor into Standby mode but have sensor start in the default Running mode upon power-up at next use:
set_config_param operating_mode "STANDBY"
set_config_param
reinitialize
reinitialize
// command sensor back into Running mode and save config
set_config_param operating_mode "NORMAL"
set_config_param
reinitialize
reinitialize
save_config_params
save_config_params
Note: auto_start_flag is the deprecated parameter name where auto_start_flag 0 is equivalent to
operating_mode "STANDBY" and auto_start_flag 1 is equivalent to operating_mode "NORMAL". Please use
operating_mode wherever possibleinclient code.
Warning: Useof auto_start_flag in firmwareprior tov2.0.0hasunexpectedbehavior.
26
Page 27
4.4ColdStart
Startingin v2.0.0,thereissoftware-enabledcapabilityforpower-upfromlower temperaturesforGen
2sensors. Ifthesensor detects that its environmentaltemperature is low,it will attempt toself-heat
ina warmup state beforeentering anormaloperating state.
4.4.1 HardwareRequirements
Gen 1 sensors are not cold start-compatible on any firmware. While all sensors will attempt to start
at lower exhibit cold start behavior by going into the warmup state, only Gen 2 sensors are able to
successfullyexit the warmup stateintothe normal operatingstate.
4.4.2 Cold StartOperation
Thereisnothing fortheusertochange aboutthe sensorconfiguration touse thisfeature. Thesensor
willautomatically begin itswarmupprocess in the coldestpartsof its operatingtemperaturerange.
ProductLineMintemp specs
OS0
OS1
OS2
-40°Cmin operating temp
8mins to SENSOR_RUNNING
12mins to lasersattemp (full range)
28Wpeak power
-40°Cmin operating temp
8mins to SENSOR_RUNNING
12mins to lasersattemp (full range)
28Wpeak power
-5°Cmin operating temp
22mins to SENSOR_RUNNING
22mins to lasersattemp (full range)
30Wpeak power
27
Page 28
4.4.3 Indicationsand Alerts
In a cold start scenario, the sensor will have a short warmup phase; we’ve added in the additional
"WARMUP" status to indicatewhenthe sensor is warming up.
0x01000053WARMUP_ISSUEERRORSensorwarmupprocess has failed.
0x0100004FWARMUP_ISSUEWARNING Sensor warmup process is taking longer
than expected; please ensure sensor is
thermallyconstrained per requirements.
28
Page 29
5TimeSynchronization
5.1TimingOverview Diagram
Signalpath with MULTIPURPOSE_IOset asinput
Signalpath with MULTIPURPOSE_IOset asoutput
29
Page 30
5.2SensorTime Source
Alllidar and IMU data aretimestamped to a commontimer with 10 nanosecond precision.
Thecommon timer can be programmedto run off oneof three clock sources:
Aninternal clock derivedfroma high accuracy,lowdriftoscillator.
An opto-isolated digital input from the external connector for timing off an external hard-
waretrigger suchas a GPS.The polarity ofthis input signalis programmable. Forinstance,
bothaGPSPPSpulseanda30Hzframesyncfromanindustrialcameracansupplyatiming
signalto the sensor.
UsingtheIEEE 1588 Precision Time Protocol. PTP provides the convenienceof configuring
timingover a networkthat supports IEEE 1588withno additional hardwaresignals.
5.2.1 Setting Ouster Sensor Time Source
The source for measurement timestamps can be configured using the set_timestamp_mode TCP command. Theavailable modes aredescribed below:
30
Page 31
Table5.1: Timestamp Modes
CommandResponse
TIME_FROM_INTERNAL_OSCUsethe internal clock. Measurements are time stamped with ns
sincepower-on. Freerunning counterbased onthe sensor’sinternaloscillator. Counts secondsandnanoseconds sincesensorturn
on,reportedat ns resolution(botha second and nanosecond registerin everyUDPpacket), butminincrement is ontheorder of 10
ns.
TIME_FROM_SYNC_PULSE_INA free running counter synced to the SYNC_PULSE_IN input
countsseconds(# of pulses)and nanoseconds since sensor turn
on. Ifmultipurpose_io_mode is set to INPUT_NMEA_UART then the secondsregisterjumpstotimeextractedfromaNMEA$GPRMCmessage read on the multipurpose_io port. Reported at ns resolution
(bothasecond andnanosecondregisterineveryUDP packet),but
minincrement is on theorderof 10 ns.
TIME_FROM_PTP_1588Synchronize with an external PTP master. A monotonically in-
creasing counter that will begin counting seconds and nanoseconds since startup. As soon as a 1588 sync event happens, the
timewillbeupdatedtosecondsandnanosecondssince1970. The
counter must always count forward in time. If another 1588 sync
event happens the counter will either jump forward to match the
newtime, or slow itselfdown. It is reported atnsresolution (there
is both a second and nanosecond register in every UDP packet),
butthe minimum increment varies.
If configuring the sensor to synchronize time from an external sync pulse, the pulse polarity can be
specifiedasdescribed in the TCPAPI Guide. Pulse-in frequency is assumed to be 1 Hz. Forexample,
the below commands will set the sensor to expect an active low pulse and configure the seconds
timetampto be pulse countsincesensor startup:
Ifdesired toconfigure themultipurpose-io port ofthesensor toacceptan externalNMEA UARTmessage,themultipurpose_io_mode parametermustbesettoINPUT_NMEA_UART asdescribedinExternalTrig-
ger Clock Source. Once a valid UART message is recievedby the sensor, the seconds timetamp will
snap to the latest timestamp recieved. The expected NMEA UART message is configurable as described in TCP API Guide. For example, the belowcommands will set the sensor to accept an NMEA
UARTmessage that isactive high with a baud rate of 115200 bits per second, add 27 additional leap
seconds,and accept messages evenwith a valid characternot set:
Additionally, the sensor can be configured to output a SYNC_PULSE_OUT signal from a variety of
sources. See example commands in theTCP API section. Pulses willalwaysbe evenlyspaced.
Thiscan be enabled throughthemultipurpose_io_mode configuration parameter.
ConfigurationResponse
Donot output a SYNC_PULSE_OUTsignal.
OFF
Reconfigures the MULTIPURPOSE_IOport as an input.
INPUT_NMEA_UART
See Setting Ouster Sensor Time Source for more information.
Output a SYNC_PULSE_OUT signal synchronized with
OUTPUT_FROM_INTERNAL_OSC
theinternal clock.
Output a SYNC_PULSE_OUT signal synchronized with
OUTPUT_FROM_SYNC_PULSE_IN
aSYNC_PULSE_INprovidedto theunit.
Output a SYNC_PULSE_OUT signal synchronized with
OUTPUT_FROM_PTP_1588
anexternal PTP IEEE1588master.
Outputa SYNC_PULSE_OUTsignal with a userdefined
OUTPUT_FROM_ENCODER_ANGLE
ratein an integernumber of degrees.
Whenthesensor’smultipurpose_io_mode is set to OUTPUT_FROM_INTERNAL_OSC, OUTPUT_FROM_SYNC_PULSE_IN,
orOUTPUT_FROM_PTP_1588,then sync_pulse_out_frequency (Hz) parameter can be used to define the outputrate. It defaults to 1 Hz. It should be greater than 0 Hz and maximum sync_pulse_out_frequency is
limitedby the criterionbelow.
When the sensor is set to OUTPUT_FROM_ENCODER_ANGLE, then the sync_pulse_out_angle (deg) parameter
canbe used todefine the output pulse rate. This allows the user to output a SYNC_PULSE_OUTsignal when the encoder passes a specified angle, or multiple of the angle, indexed from 0 crossing,
in degrees. It should be an integer between 0 and 360 degrees, inclusive. However, the minimum
sync_pulse_out_angle is also limited bythecriterion below.
Inall modes, the output pulsewidth is defined by sync_pulse_out_pulse_width (ms).
Note: Ifsync_pulse_out_pulse_width x sync_pulse_out_frequency is closeto 1second, theoutput pulses
will not function (will not return to 0). For example, at 10 Hz rotation and a 10 ms pulse width, the
limitationon the number of pulsesper rotation is 9.
32
Page 33
EXAMPLECOMMANDS:Hereareexamplecommandsandtheireffectonoutputpulsewhenlidar_mode
is1024x10, and assuming sync_pulse_out_pulse_width is10 ms.
Theoutputpulsefrequencyis 50 Hz. Each pulse is 10
mswide.
Theoutputpulse frequency is10Hz, since thesensor
is in 10 Hz mode (10 rotations / sec) and the angle is
setto 360º, a full rotation. Each pulseis 10ms wide.
is in 10 Hz mode (10 rotations / sec) and the angle is
setto 45º. Each full rotationwill have8 pulses. Each
pulseis 10 ms wide.
5.3NMEAMessageFormat
TheOusterSensor expectsa standardNMEA $GPRMC UARTmessage. Data (called a sentence) is a
simpleASCIIstringstarting with a‘$’characterandending with areturn character. Fields of thesentenceareseparatedwitha‘,’character,andthelastfield(achecksum)is separatedby a‘*’ character.
The max character length of a standard message is 80 characters; however, the Ouster Sensor can
supportnon-standardmessages up to85characters (seeExample 2 below).
TheOusterSensorwilldelivertimeintheUDPpacketbycalculatingsecondssince00:00:00Thursday,
1 January 1970. nmea_leap_seconds by default is 0, meaning this calculation will not take intoaccount
anyleap seconds. If nmea_leap_seconds is0 then the reportedtimeis Unix Epoch time. AsofFebruary,
2019CoordinatedUniversalTime (UTC)lagsbehindInternationalAtomicTime(TAI)byanoffsetof37
33
Page 34
seconds(10secondsfromthe initial UTC offset when UTCwas introduced in 1972 + 27 leap seconds
announced in the intervening years). Therefore, setting nmea_leap_seconds to 37 in February of 2019
wouldmake the timestampsmatch the TAIstandard.
nmea_in_polarity bydefaultis ACTIVE_HIGH. This means that a UART start bit will occur directly after a
fallingedge. If using RS-232,the UART signalmaybe inverted(wherea start bit occursdirectly after
arising edge). In thiscase,nmea_in_polarity should be settoACTIVE_LOW.
13.39MagneticVariation
EMagneticcardinal reference
A[Optional]A=autonomous,D=differential,E=Estimated,N=notvalid, S=Simulator
*60Thechecksum data, alwaysbegins with *
6InputsandInterfaces
35
Page 36
6.1WebInterface
Thesensor homepage can be access by typing in thesensor’saddress (IPv4, IPv6, or hostname)in a
webbrowser. Fromhere you canseeinformation about the sensor,access documentation, and reset
sensorsettings.
Figure6.1:The sensorhomepage, accessedthrough its IPv4link-local address
Dashboard: Containsbasic informationaboutthesensor. Youcanupdatefirmwareonthispage. See
Updating Firmware formoredetails.
Diagnostic: Contains diagnostic alert and error information about the sensor for troubleshooting
purposes. Fora listofpossible alerts and errors,see Alerts and Errors.
Documentation: Contains the HTTP and TCP API guides that are compatible the version of the
firmware on the sensor. See www.ouster.com for latest hardware and software user manuals and
datasheets.
Dashboard: Current page that lists some basic sensor information, and allows sensor firmware
upgrade.
Diagnostics: Diagnostic information and system journal that can be downloaded and included
whencontacting Ouster forservice.
Documentation: SensorTCP andHTTP APIGuide
Reset Configuration: Sensor factoryconfigurationthat can be reset to if desired. This will erase
anycustom configurationthatyou set on thesensorpreviously.
7.2Networking
Manyinitialproblemswiththesensorareassociatedwithit notproperlybeingassigned anIPaddress
bya network switchor DHCP server on a client computer. Check your networkingsettings,the steps
inConnecting to Sensor,and thatallwires arefirmlyconnectedif yoususpectthis problem. Note that
if the sensor is not connected via gigabit Ethernet, it will stop sending data and will output an error
code if it fails to achieve a 1000 Mb/s+ full duplex link. Please see the Networking Guide for detailed
guidanceon network setup.
7.3get_alerts
Tocheck forhardware errors,use the get_alerts TCPcommand.
If the watchdog is triggered, an alert code will be appended to the end of the response of the TCP
Thefull list of possible alertsanderror messages can befoundin Alerts and Errors in the Appendix.
Thealertsreported havethe followingformat:
{
"category": "Category of the alert: e.g. OVERTEMP, UDP_TRANSMISSION",
"level": "Level of alert: e.g. NOTICE, WARNING, ERROR",
"realtime": "The timestamp of the alert in nanoseconds",
"active": "Whether the alert is active or not: <true/false>",
"msg": "A description of the alert",
"cursor": "The sequential number of the alert, starting from 0 counting up",
(continuesonnextpage)
38
Page 39
(continuedfrompreviouspage)
"id": "The hexadecimal identification code of the alert: e.g. 0x01000017",
"msg_verbose": "Any additional verbose description that the alert may present"
}
Example showing active and logged forced temperature sensor failures occuring at timestamps
1569712873477772800, 1569712879991844096, 1569712884968876544 (nanoseconds). The first
loggederror then resolvesitself at 1569713260229536000. The example hasbeen JSON formatted:
{
"active": [
{
"category": "OVERTEMP",
"level": "ERROR",
"realtime": "1569712879991844096",
"active": true,
"msg": "Unit internal temperature out of bounds; please ensure proper heat sinking.",
"cursor": 1,
"id": "0x01000001",
"msg_verbose": ""
},
{
"category": "OVERTEMP",
"level": "ERROR",
"realtime": "1569712884968876544",
"active": true,
"msg": "Unit internal temperature out of bounds; please ensure proper heat sinking.",
"cursor": 2,
"id": "0x01000002",
"msg_verbose": ""
}
],
"next_cursor": 4,
"log": [
{
"category": "OVERTEMP",
"level": "ERROR",
"realtime": "1569712873477772800",
"active": true,
"msg": "Unit internal temperature out of bounds; please ensure proper heat sinking.",
"cursor": 0,
"id": "0x01000000",
"msg_verbose": ""
},
{
"category": "OVERTEMP",
"level": "ERROR",
"realtime": "1569712879991844096",
"active": true,
"msg": "Unit internal temperature out of bounds; please ensure proper heat sinking.",
"cursor": 1,
"id": "0x01000001",
"msg_verbose": ""
},
(continuesonnextpage)
39
Page 40
(continuedfrompreviouspage)
{
"category": "OVERTEMP",
"level": "ERROR",
"realtime": "1569712884968876544",
"active": true,
"msg": "Unit internal temperature out of bounds; please ensure proper heat sinking.",
"cursor":2 ,
"id": "0x01000002",
"msg_verbose": ""
},
{
"category": "OVERTEMP",
"level": "ERROR",
"realtime": "1569713260229536000",
"active": false,
"msg": "Unit internal temperature out of bounds; please ensure proper heat sinking.",
"cursor": 3,
"id": "0x01000000",
"msg_verbose": ""
}
]
}
7.4UsingLatestFirmware
Upgradingtothelatestfirmwarecanoftenresolveissuesfoundinearlierfirmware. Thelatestfirmware
isalwaysfoundat www.ouster.com/resources. OurSupportteamisbestsuitedtobe abletohelpyou
ifyou are runningthelatest firmware.
40
Page 41
8HTTP APIReference
HTTPAPI developerreferenceguide. Thisdocumentsthe interfaceforHTTPAPIandisaccessible via
addr (string) – Current global orprivate IPv4address.
link_local (string) – Link-local IPv4 address.
override (string) – StaticIP override value, thisshould matchaddr. This valuewill be null when
unsetand operating in DHCP orlink-local modes.
StatusCodes
200OK –No error
8.3.3 GET /api/v1/system/network/ipv4/override
GET 192.0.2.123/api/v1/system/network/ipv4/override
Getthe current IPv4 staticIPaddress override.
GET /api/v1/system/network/ipv4/override HTTP/1.1
Host: 192.0.2.123
HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
null
→
ResponseJSONObject
string –Static IP overridevalue,this should matchaddr. This valuewill be null when unset and
operatingin DHCP mode.
StatusCodes
200OK –No error
43
Page 44
8.3.4 PUT /api/v1/system/network/ipv4/override
PUT 192.0.2.123/api/v1/system/network/ipv4/override
Overridethe default dynamicbehaviorand set astaticIP address.
Note: The sensor will reset the networkconfiguration aftera short sub second delay (to allow
The sensor needs to be reachable either by link-local or dynamic DHCP configuration or by an
existingstatic IP overridefromthe host reconfiguringthesensor.
Warning:If an unreachable network address is set, the sensor will become unreachable.
Tools such as avahi-browse, dns-sd, or mDNS browser can help with finding a sensor on a
network.
Static IP override should only be used in special use cases. The link-local configuration is
recommendedwhere possible.
PUT /api/v1/system/network/ipv4/override HTTP/1.1
Content-Type: application/json
Host: 192.0.2.123
"192.0.2.100/24"
→
RequestJSONObject
string – Static IP override valuewith subnetmask
ResponseJSONObject
string – Static IP override valuethat systemwillset aftera shortdelay.
Deletethe static IP overridevalue and returntodynamic configuration.
Note: The sensor will reset the networkconfiguration aftera short sub second delay (to allow
Gettheoperatingsystemtimestatus. Thesevaluesrelatetothesensoroperatingsystemclocks,
andnot clocks relatedto hardwaretimestampdata from the lidarsensor.
tracking (object) – Operating system timesynchronization tracking status. See chronyctrack-
ingdocumentation for moreinformation.
StatusCodes
200OK –No error
(continuedfrompreviouspage)
Systemtracking fields ofinterest:
→
Rms_offset Long-termaverageoftheoffset value.
System_time_offset Time delta (in seconds) between estimate of the operating system time and the
currenttrue time.
Last_offset Estimatedlocaloffseton thelast clockupdate.
Ref_time_utc UTCTime atwhich thelast measurementfromthe referencesourcewas processed.
Remote_host This is either ptp if the system is synchronizing to a PTP time source or the address of a
remoteNTPserver thesystem has selectedif thesensor isconnected to theInternet.
48
Page 49
8.4.3 GET/api/v1/time/ptp
GET 192.0.2.123/api/v1/time/ptp
Getthe status of the PTP time synchronization daemon.
Note: See the IEEE 1588-2008 standard for more details on the standard management mes-
current_data_set (object) – Result of thePMC GET CURRENT_DATA_SET command.
parent_data_set (object) – Result of thePMC GET PARENT_DATA_SET command.
port_data_set (object) – Result of thePMC GET PORT_DATA_SET command.
time_properties_data_set (object) – Result of thePMC GET TIME_PROPERTIES_DATA_SET command.
time_status_np (object) – Result of the PMC GET TIME_STATUS_NP command. This is a linuxptp
non-portablecommand.
StatusCodes
200OK –No error
(continuedfrompreviouspage)
Fieldsof interest:
→
Current_data_set.offset_from_master Offset from master time source in nanoseconds as calculated
duringthe last update from master.
Parent_data_set.grandmaster_identity Thisshouldmatchthe local grandmasterclock. If thisdisplays
the sensor’sclock identity (derivedfrom Ethernet hardware address) then this indicates the sensor
isnot properly synchronizedto a grandmaster.
Parent_data_set Variousinformationaboutthe selected masterclock.
Port_data_set.port_state This value will be SLAVE when a remote master clock is selected. See par-
ent_data_set forselected masterclock.
Port_data_set Local sensor PTP configuration values. Grandmaster clock needs to match these for
propertime synchronization.
Time_properties_data_set PTPpropertiesas givenby master clock.
Time_status_np.gm_identity Selectedgrandmasterclock identity.
Time_status_np.gm_present True when grandmaster has been detected. This may stay true even if
grandmaster goes off-line. Use port_data_set.port_state to determine up-to-date synchronization
status. When thisis false then the localclock isselected.
Time_status_np.ingress_time Indicates when last PTP message was received. Units are in nanosec-
Formoreinformationon these parametersrefer tothe get_time_info TCPcommand.
52
Page 53
9TCPAPI
9.1QueryingSensorInfoand Intrinsic Calibration
Thesensor can be queried andconfigured using a simpleplaintextprotocol overTCP onport7501.
Anexamplesession usingtheunix netcatutilityisshownbelow. Note: “xxx”referstothesensorserial
number. The hostname of thesensorcan look like “os-xxx”or“os1-xxx”.
beam altitude and azimuth
offsets,indegrees. Lengthof
arraysisequal tothenumber
of channels in sensor. Also
returnsdistancebetween
lidar origin and beam origin
in mm, to be used for point
cloudcalculations.
get_imu_intrinsicsReturnsJSON-formatted
IMU transformation matrix
needed to transform to the
SensorCoordinate Frame.
of this array is equal to the
number of channels of the
sensor.
pixels_per_column: Numberof
channelsof the sensor.
column_window:Indexof
measurementblocksthat
are active.Default is [0,
lidar_mode-1], e.g. [0,1023].
If there is azimuth window
set, this parameter will reflectwhichmeasurement
blocks of data are within the
regionof interest.
Note:This command only
works when the sensor is in
“RUNNING”status.
9.2QueryingActiveorStaged Parameters
Sensor configurations and operating modes can also be queried over TCP. Below is the command
format:
→
get_config_param active <parameter> will return the current activeconfiguration parameter values.
get_config_param staged <parameter> willreturntheparametervaluesthatwilltakeplaceafterissuingareinitial-
ize command or after sensor reset.
59
Page 60
Warning: The command get_config_txt is deprecated in favorof get_config_param active, which
providesthe same response. get_config_txt will be removedin a future firmware.
Anexample session using the unixnetcat utility is shownbelow:
the sensor sends UDP traffic.
Note: udp_ip is the deprecated
parameter name whose value
will always be the same as
udp_dest.
udp_port_lidarReturnsthe portnumber of lidar
UDPdata packets.
udp_port_imuReturns the port number of IMU
UDPdata packets.
lidar_modeReturns a string indicating the
horizontal resolution and rotationfrequency [Hz].
timestamp_modeReturns the method used to
timestampmeasurements.
nmea_in_polarityReturns the polarity of NMEA
UARTinputmessages. See Time
Synchronization section in sensor user manual for NMEA use
case. Use ACTIVE_HIGH if UARTis
activehigh,idle low,andstartbit
isaftera fallingedge.
"" (default)
7502 (default)
7503 (default)
Oneof512x10, 1024x10, 2048x10, 512x20,
or1024x20
OneofTIME_FROM_INTERNAL_OSC,
TIME_FROM_PTP_1588,or
TIME_FROM_SYNC_PULSE_IN
Either ACTIVE_HIGH (default) or AC-
TIVE_LOW
nmea_ignore_valid_charReturns 0 if NMEA UART input
$GPRMCmessagesshouldbeignored if valid character is not
set,and 1 if messages should be
usedfortime syncingregardless
ofthe valid character.
60
Either0 (default)or1
continueson next page
Page 61
Table 9.2– continued from previouspage
get_config_paramCommand DescriptionResponse
nmea_baud_rateReturns BAUD_9600 (default) or
BAUD_115200 for the expected
baudratethe sensor is attempting to decode for NMEA UART
input$GPRMC messages.
nmea_leap_secondsReturns the number of leap
seconds that will be added to
the UDP timestamp when calculating seconds since 00:00:00
Thursday, 1 January 1970. For
Unix Epoch time, this should be
setto 0.
operating_modeReturnstheoperatingmodethat
the sensor is in."NORMAL" is
default value."STANDBY" is a
lowpower(5W)operating mode.
Note: auto_start_flag isthe deprecated parameter name where
multipurpose_io_modeReturnsthe configuredmodeof the
MULTIPURPOSE_IO pin. See Time
Synchronization section in sensor
user manual for a detailed descriptionof each option.
sync_pulse_out_polarityReturnsthepolarityof
SYNC_PULSE_OUToutput,if
sensor is using this for time synchronization.
sync_pulse_out_frequencyReturnstheoutput
SYNC_PULSE_OUTpulserate
inHz.
sync_pulse_out_angleReturns the angle in terms of de-
grees that the sensor traverses
between each SYNC_PULSE_OUT
pulse. E.g. a value of 180 means a
syncpulseissentoutevery180° for
a total of two pulses per revolution
and angular frequency of 20 Hz if
thesensoris1024x10Hzlidarmode.
set_config_param <parameter> <value> willset newvalues forconfigurationparameters,whichwill take
effectafter issuing the reinitialize commandor after sensor reset.
reinitialize will reinitialize the sensor so the staged values of the parameterswill take effect imme-
diately.
save_config_params will write new values of active parameters into a configuration file, so they will
persistafter sensor reset. In order to permanently change a parameter in the configuration file, first
use set_config_param to update the parameter in a staging area, then use reinitialize to make that
parameteractive. Onlyafterthe parameterismadeactivewill save_config_params capture ittopersist
afterreset.
Warning: The commandwrite_config_txt willbe deprecated in a futurefirmware. The command
save_config_params provides the sameresponse.
set_udp_dest_auto will automatically determinethesender’sIP addressat the time the command was
sent, and set it as the destination of UDP traffic. Thistakes effect after issuing a reinitialize command. Usingthis command has thesameeffectas usingset_config_param udp_dest <ip address>.
Anexample session using the unixnetcat utility is shownbelow:
udp_dest <destination>Set the <destination> to which the sen-
sor sends UDP traffic.On boot, the
sensor will not output data until this is
set.If the IP address is not known,
this can also be accomplished with
the set_udp_dest_auto command (details
above).The sensor supports unicast,
IPv4 broadcast (255.255.255.255), IPv4
multicast(239.x.x.x), and IPv6 multicast
(ff02::01) addresses.Note: udp_ip is
the deprecated parameter name. Howeverduringthedeprecationphase,either
udp_ip orudp_dest maybeused. Whenei-
therone isupdated,the otherparameter
valuewill be updatedto matchupon settingthe parameter value.
udp_port_lidar <port>Set the <port> on udp_dest to which lidar
datawill be sent (7502, default).
udp_port_imu <port>Set the <port> on udp_dest to which IMU
datawill be sent (7503, default).
lidar_mode <mode>Set the horizontal resolution and rota-
tion rate of the sensor.Valid modes
are 512x10, 1024x10, 2048x10, 512x20, and
1024x20. The effective range of the sen-
sor is increased by 15-20% for every
halvingofthenumberofpointsgathered
e.g.512x10 has 15-20% longer range
than512x20.
Set the polarity of SYNC_PULSE_IN
input,whichcontrolspolarityofSYNC_PULSE_INpin
whentimestamp_modeissetin
TIME_FROM_SYNC_PULSE_IN.
64
set_config_param on suc-
cess,error: otherwise
set_config_param on suc-
cess,error: otherwise
continueson next page
Page 65
Table 9.4– continued from previouspage
set_config_paramCommandDescriptionResponse
nmea_in_polarity <1/0>Set the polarity of NMEA UART input
$GPRMC messages. SeeTime Synchronization section in sensor user manual
for NMEA use case. Use ACTIVE_HIGH if
UARTisactivehigh,idlelow,andstartbit
isaftera fallingedge.
nmea_ignore_valid_char <1/
0>
Set0 ifNMEAUARTinput$GPRMC messages should be ignored if valid characterisnotset,and1 ifmessagesshouldbe
used for time syncing regardless of the
validcharacter.
nmea_baud_rate<ratein
baud/s>
Set BAUD_9600 (default) or BAUD_115200 for
the expected baud rate the sensor is attempting to decode for NMEA UART input$GPRMC messages.
nmea_leap_seconds <s>Set an integer number of leap seconds
that will be added to the UDP timestamp when calculating seconds since
00:00:00 Thursday, 1 January 1970. For
UnixEpoch time, this should beset to 0.
multipurpose_io_mode <mode>Configure the mode of the MULTIPUR-
Set "NORMAL" to put the sensor into a
normal operating mode or "STANDBY" to
put the sensor into a low power (5W)
operating mode where motor does not
spin and lasers do not fire.Note:
auto_start_flag <1/0> is the deprecated
parameternamewhereauto_start_flag 0
isequivalenttooperating_mode "STANDBY"
and auto_start_flag 1 is equivalent to
operating_mode "NORMAL". However, dur-
ingthe deprecationphase, eitheroperat-
ing_mode or auto_start_flag maybe used.
Wheneitheroneisupdated,theotherparameter value will be updated to match
uponsetting the parametervalue.
Sets the visible region of interest of the
sensor in millidegrees. Only data from
the within the specified azimuth window
[0,360000] (defaults to
an azimuth window of
360°)
boundsis sent.
phase_lock_enable<true/
false>
Sets whether phase locking is enabled.
See Software User Manual for more de-
set_config_param on suc-
cess,error: otherwise
tailson using phase lock.
phase_lock_offset <angle in
millideg>
Sets the angle in the Lidar Coordinate
Frame that sensors are locked to in mil-
set_config_param on suc-
cess,error: otherwise
lidegreesifphaselockingisenabled. Angleis traversedat the top ofthe second.
Table9.5: Setting Sync
set_config_paramCommandDescriptionResponse
sync_pulse_out_polarity <1/0>Setthepolarityof
SYNC_PULSE_OUToutput,
set_config_param on success,
error: otherwise
if sensor is set as the master
sensor used for time synchronization.
sync_pulse_out_frequency<rate
in Hz>
Set output SYNC_PULSE_OUT
rate. Valid inputs are integers
set_config_param on success,
error: otherwise
>0 Hz, but also limited by the
criteria described in the Time
Synchronization section of the
SoftwareUser Manual.
sync_pulse_out_angle <angle in
deg>
Set output SYNC_PULSE_OUT
rate defined by rotation angle.
E.g.a value of 180 means a
sync pulse is sent out every
180° for a total of two pulses
per revolution and angular frequency of 20 Hz if the sensor
is1024x10 Hz lidarmode. Valid
inputs are integers between 0
and 360 inclusive but also limitedby the criteriadescribed in
the Time Synchronization sectionof Software User Manual.
66
set_config_param on success,
error: otherwise
continueson next page
Page 67
Table 9.5– continued from previouspage
set_config_paramCommandDescriptionResponse
sync_pulse_out_pulse_width
<width in ms>
Set output SYNC_PULSE_OUT
pulse width in ms, in 1 ms in-
set_config_param on success,
error: otherwise
crements. Valid inputs are integers greater than 0 ms, but
also limited by the criteria described in the Time Synchronization section of Software
UserManual.
pps_in_polarity changed to sync_pulse_in_polarity
pps_out_mode changed to multipurpose_io_mode
pps_out_polarity changed to sync_pulse_out_polarity
pps_rate changed to sync_pulse_out_frequency
pps_angle changed to sync_pulse_out_angle
pps_pulse_width changed to sync_pulse_out_pulse_width
Newconfiguration parameters:
nmea_in_polarity
nmea_ignore_valid_char
nmea_baud_rate
nmea_leap_seconds
Configurationparametersoption changes:
timestamp_mode
TIME_FROM_PPS changed to TIME_FROM_SYNC_PULSE_IN
multipurpose_io_mode(formerly pps_out_mode)
OUTPUT_PPS_OFF changed to OFF
OUTPUT_FROM_PPS_IN_SYNCED changed to OUTPUT_FROM_SYNC_PULSE_IN
sync_pulse_in_polarity was corrected tomatch parameter naming.
sync_pulse_out_polarity was corrected tomatch parameter naming.
→
Version v1.13.0
Date
Description
AddTCPcommand set_udp_dest_auto
TCPcommandget_alerts, includesmore descriptive errorsfortroubleshooting
PacketStatus now calledAzimuth DataBlock Status and is calculateddifferently
Packetswith bad CRC are now dropped upstream and replaced with 0 padded packets toensure all
packetsaresent for eachframe.
Returnformatof TCPcommandget_time_info updated
Removedreferencetowindow_rejection_enable
→
Version v2.0.0
Date 2020-11-20
70
Page 71
Added
Removed
AddTCPcommandget_lidar_data_format.
Addin azimuth_window documentation.
Addin commands phase_lock_enable andphase_lock_offset and their documentation.
Addin verbose responsesto parameter validationfor TCPcommands.
Addincommandsave_config_params infavorofthe deprecatedcommandwrite_config_txt,
whichwill be deleted infuturefirmware.
Add in command get_config_paramactive in favor of the deprecated command
get_config_txt,which will be deletedinfuture firmware.
Addin new STANDBY and WARMUPstatuses.
Add in parameter operating_mode in favor of the deprecated parameter auto_start_flag,
whichwill be deleted infuturefirmware.
Addinparameterudp_dest infavorofthedeprecatedparameterudp_ip,whichwillbedeleted
infuture firmware. Thisis tobeconsistent withtheset_udp_dest_auto parameterandto be
reflectthat valid values canbehostnames in addition toip addresses.
Addin HTTP GET api/v1/diagnostic/dump endpoint.
RemovedeprecatedTCPcommand set_udp_ip.
Changed
TCP command get_beam_intrinsics now returns: 1) lidar_origin_to_beam_origin_mm, distance between the lidar origin and the beam origin in millimeters; and 2) beam altitude
andazimuth angle arrayswith padded zeros removed.
azimuth_window parameter nowinterms of millidegreesandimplemented CCW.
71
Page 72
11AlertsandErrors
Thesensor providesalertsand errormessages that areaccesible through theDiagnosticstab on the
sensorhomepage or via theget_alerts TCP command.
11.1Tableof AllAlerts and Errors
All possible alerts and errors that the sensor can provide are listed below. Where appropriate, the
messagefrom the sensor aimstohelp the user diagnoseand fix the issue themselves.
Table11.1: Alertsand Errorsinv2.0.0
IDCategoryLevelAlertMessage
0x00000000 UNKNOWNERRORAn unknown error has occurred; please contact
guidefor heat sinkingrequirements.
0x0100000C INTERNAL_COMMWARNING Unit hasexperiencedan internal COMM warning.
0x0100000D INTERNAL_COMMWARNING Unithas experienced an internalCOMM warning.
0x0100000E SHOT_LIMITINGNOTICETemperature is high enough where shot limiting
may be engaged; please see user guide for heat
sinkingrequirements.
0x0100000F SHOT_LIMITINGWARNING Shot limiting mode is active. Laser power is par-
toerror state.
0x01000041 INTERNAL_COMMWARNING Unit has experienced an internal COMM warning:
somemeasurements mayhavebeen skipped.
0x01000042 INTERNAL_COMMERRORUnit has experienced an internal COMM error;
please contact Ouster at https://ouster.com/
tech-support.
0x01000043 INTERNAL_FWERRORUnithas experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x01000044 INTERNAL_FWERRORUnithas experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x01000045 INTERNAL_FWERRORUnithas experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x01000046 INTERNAL_FWERRORUnit has experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x01000047 INTERNAL_FWERRORUnit has experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x01000048 INTERNAL_FWERRORUnithas experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x01000049 INTERNAL_FWERRORUnit has experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x0100004A STARTUPERRORUnit has experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x0100004B STARTUPERRORUnit has experienced a startup error; please con-
tactOuster at https://ouster.com/tech-support.
0x0100004C INTERNAL_FAULTERRORInternal fault detected; unit going to error stop
state.
0x0100004D INTERNAL_FAULTERRORInternal fault detected; unit going to error stop
state.
0x0100004E WARMUP_ISSUEWARNING Sensor warmup process is taking longer than ex-
pected; please ensure sensor is thermally con-
strainedper requirements.
0x0100004F WARMUP_ISSUEWARNING Sensor warmup process is taking longer than ex-
pected; please ensure sensor is thermally con-
strainedper requirements.
0x01000050 MOTOR_CONTROLWARNING The phase lock offset error has exceeded the
threshold.
76
continueson next page
Page 77
Table 11.1 – continuedfrom previous page
IDCategoryLevelAlertMessage
0x01000051 MOTOR_CONTROLERRORThe phase lock control failed to achieve a lock
multiple times; please contact Ouster at https://
ouster.com/tech-support.
0x01000052 CONFIG_INVALIDERRORConfiguration value isinvalidor out ofbounds.
0x01000053 WARMUP_ISSUEERRORSensorwarmupprocess has failed.
0x01000054 INTERNAL_FAULTNOTICEUnexpectedhardware configuration detected.
0x01000055 UDP_TRANSMISSIONWARNING Unit has experienced a packet drop rate above
normal threshold. Please check that the network
has at least 1000 Mbps connection.Common
causes of this notice may be 100 or 10 Mbps net-
workconnections.
0x01000056 INTERNAL_FAULTERRORInternalfaultdetected;unit will restarttoattempt
recovery.
0x01000057 OVERTEMPWARNING Warning: sensortemperature is too high; sensor
couldhave degradedrange performance.
0x01000058 OVERTEMPERRORWarning: sensortemperatureis too high; unit go-
recovery.
0x0100005A INTERNAL_FAULTWARNING Unit has experienced an internal COMM warning:
somemeasurements mayhavebeen skipped.
0x0100005B INTERNAL_FAULTWARNING Unit has experienced an internal COMM warning:
somemeasurements mayhavebeen skipped.
0x0100005C INTERNAL_FAULTWARNING Unit has experienced an internal COMM warning:
somemeasurements mayhavebeen skipped.
0x0100005D INTERNAL_FAULTWARNING Internal fault detected; unit going to error stop
state.
0x0100005E INTERNAL_FAULTWARNING Unit has experienced an overcurrent event; unit
willrestart to attemptrecovery.
0x0100005F IO_CONNECTIONWARNING Unit has stopped receiving SYNC_PULSE_IN sig-
nalsandisconfiguredtoexpectthem. Checkelec-
tricalinputs to sensor.
0x01000060 IO_CONNECTIONWARNING UnithasstoppedreceivingNMEAmessagesatthe
MULTIPURPOSE_IO port and is configured to ex-
pectthem. Check electrical inputstosensor.
0x01000061 INTERNAL_COMMERRORUnit has experienced an internal COMM error;
please contact Ouster at https://ouster.com/
tech-support.
77
Page 78
12LidarPacketFormatUpdate
Starting infirmwarev2.0.0,all sensors with the same number ofchannelshavethe same data structureandsamemaximumdatarate. Priortov2.0.0,allsensors,regardlessoftheirnumberofchannels,
hadthe same data rate.
If you have either a Gen 1 OS1-16 or Gen 1 OS1-32, upon upgrading to firmware v2.0.0,you will see a
dropin data rate. Pleaserefer tothe diagram below fora visualization of lidarpacket structure.
Priorto to v2.0.0,all sensors, regardlessof number of channels, had a fixed number of datablocksin
their lidar packets. In v2.0.0,the number of data blocks in a sensor’s Measurement Block is equal to
thenumber ofchannels ithas. Customerswith Gen1OS1-16 orGen 1OS1-32willsee a75% and50%
respectivedrop indatarate due tounused data blocks beingomittedfrom the sensoroutput.
78
Page 79
Thesecustomerswill also see a change in theoutput of theTCP command get_beam_intrinsics. Previously,thebeam_azimuth_angles and beam_altitude_angles outputarray was paddedwith zeros sothat
theywere alwaysof length64,regardless ofthe number ofchannelsin that sensor. Now,thepadded
zerosaredroppedso thatthe lengthsof botharraysare equaltonumber ofchannel inthe sensore.g.
all32-channel sensorswill havebeam_azimuth_angles and beam_altitude_angles outputarrays oflength
32on v2.0.0and beyond.
columns_per_packet: Numberof Measurement Blockscontained in a singlelidarpacket. In v2.0.0
andearlier, this is16.
pixel_shift_by_row: Offset in terms of pixel count. Can be used to destagger image. Varies by
lidarmode. Length of thisarrayis equal tothenumber of channels ofthesensor.
pixels_per_column: Numberof channels of thesensor.
column_window: Indices of active columns of data in the sensor. These bounds will change when
acustom azimuth windowisused.
Pleaserefer to Data Rates section to compare maxdatarates and the Lidar Data PacketSize Calcu-
lation table to comparelidarpacket sizes ofallsensors on firmwarev2.0.0.
79
Page 80
13CrosstalkMitigationTutorial
Sensor 3
270°
Sensor 2
90°
Sensor 1
180°
90°
0°180°
270°
270°
Sensor 1
90°
Sensor 2
0°
180°
270°
90°
Sensor 1
l
d
Sensor 2
XZ
Y
Inter-sensorcrosstalk occurswhen twosensorsare operatingclose together andtheyinterpret each
other’slaser pulses astheirown. Mitigating crosstalk betweentwo sensorsis a two stepprocess:
1) Phaselockthetwo sensors
2) Setazimuthwindowon eachsensorsothattheydon’t senddata whenthey arepointingateach
other
13.1Two Sensor Example
In this example below, we are trying to mitigate inter-sensor crosstalk between Sensor 1 and Sensor
2 on the car. Bothof their connectors are facing towards the back of the car. TheLidar Coordinate
Frameis printed ontheback of the vehicleforreference.
Firstand foremost, placing a physical barrier between the two sensors is the best option to mitigate
cross talk in this example and most scenarios. If this is not possible, we can use the phase locking
feature to eliminate the problem. Crosstalk only occurs when one sensor shines its lasers into the
window of another sensor. The goal of phase locking is to force the sensors to point at each other
simultaneously so that crosstalk occurs when sensors aren’t generating important data about the
environment.
1a) Time synchronize the two sensors via an external source. Seethe Time Synchronization section
formore detailsontime synchronizing sensorswithan external GPS orviaPTP.
1b)Phaselockboth sensorssuch thattheypoint directlyat each otherat thesametime. In thiscase,
wewantSensor1tobepointingat90°atthesametimethatSensor2ispointingat270°. Theexample
netcatconsole output wouldlooklike below:
Wewantto setazimuth windowof size 282° for thetwo sensors, so that they do not send data in the
78° where they would point at each other. Sensor1’s azimuth window is the 282° centered around 270°.
Sensor2’sregionof interestisthe 282°centered around 90°.
2
θ1= θ2= 360
◦
− 2 · arctan
d
l
81
= 360◦− 78◦=
1000
// Sensor 1's azimuth window starts at 129° and follows the CCW direction to end at 51°
Thelatest driver resourcesfor all Oustersensors are foundat www.ouster.com/resources
14.1OpenSourceDrivers
Ourlatest open sourcedriversinclude:
ouster_client - an example C++client for Oustersensors
ouster_viz - a basic visualizerforOuster sensors
ouster_ros - a driver containingexampleROS nodes forpublishingpoint cloud messages
14.2OusterStudio
Thelatest Ouster Studiovisualizercan be used torecord and playback.pcaprecordings.
83
Page 84
15PTPQuickstartGuide
There are many configurations fora PTP network, this quick start guide aims to cover the basics by
using Ubuntu 18.04 as an example. It provides configuration settings for a commercial PTP grandmasterclock and also provides directions on setting up a Linux computer (Ubuntu 18.04)to function
asa PTP grandmaster.
Commandline Linux knowledge (e.g.,package management, commandlinefamiliarity,etc.).
Ethernetinterfaces that support hardwaretimestamping.
Ubuntu18.04 is assumedforthis tutorial, butanymodern distribution should suffice.
Knowledgeof systemdserviceconfigurationand management.
Familiaritywith Linux permissions.
15.2PhysicalNetworkSetup
Ensure the Ouster sensor is connected to the PTP master clock with at most one network switch.
IdeallythesensorshouldbeconnecteddirectlytothePTPgrandmaster. Alternatively,asimplelayer-2
gigabitEthernetswitchwillsuffice. Multipleswitchesarenot recommendedandwilladdunnecessary
jitter.
15.2.1 ThirdPartyGrandmaster Clock
A dedicated grandmaster clock should be used for the highest absolute accuracy often with a GPS
receiver.
Itmust be configured withthefollowing parameterswhich match thelinuxptp client defaults:
Transport: UDP IPv4
DelayMechanism: E2E
SyncMode: Two-Step
AnnounceInterval: 1 - sent every2 seconds
SyncInterval: 0 - sent every1 second
DelayRequest Interval: 0 -sentevery 1 second
84
Page 85
Formore settings, review the port_data_set field returned from the sensor’sHTTP system/time/ptp interface.
The focus is on configuring the Linux PTP service to serve a common clock to all the downstream
OusterOS1 sensors usingtheLinux system timefromthe Ubuntu host machine.
Optionally,agrandmasterclock can beaddedto discipline the systemtime of the Linuxhost.
15.4InstallingNecessary Packages
Severalpackagesareneeded for PTPfunctionality and verification:
linuxptp - Linux PTP packagewith the followingcomponents:
ptp4l daemon to manage hardwareand participate as aPTPnode
phc2sys to synchronize the Ethernet controller’s hardware clock to the Linux system clock
orshared memory region
pmc to query the PTPnodes on the network.
chrony - A NTP and PTP time synchronization daemon. It can be configured to listen to both
NTPtime sources viathe Internet andaPTP masterclock such as oneprovided a GPSwith PTP
support. Thiswillvalidate the time configurationmakes sense givenmultiple time sources.
ethtool - A tool toquery the hardware anddriver capabilities of agivenEthernet interface.
$ sudo apt update
...
Reading package lists... Done
Building dependency tree
Reading state information... Done
$ sudo apt install linuxptp chrony ethtool
Reading package lists... Done
(continuesonnextpage)
86
Page 87
(continuedfrompreviouspage)
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
chrony ethtool linuxptp
0 upgraded, 3 newly installed, 0 to remove and 29 not upgraded.
Need to get 430 kB of archives.
After this operation, 1,319 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 ethtool amd64 1:4.15-0ubuntu1 [114 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 linuxptp amd64 1.8-1 [112 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 chrony amd64 3.2-4ubuntu4.2 [203 kB]
Fetched 430 kB in 1s (495 kB/s)
Selecting previously unselected package ethtool.
(Reading database ... 117835 files and directories currently installed.)
Preparing to unpack .../ethtool_1%3a4.15-0ubuntu1_amd64.deb ...
Unpacking ethtool (1:4.15-0ubuntu1) ...
Selecting previously unselected package linuxptp.
Preparing to unpack .../linuxptp_1.8-1_amd64.deb ...
Unpacking linuxptp (1.8-1) ...
Selecting previously unselected package chrony.
Preparing to unpack .../chrony_3.2-4ubuntu4.2_amd64.deb ...
Unpacking chrony (3.2-4ubuntu4.2) ...
Setting up linuxptp (1.8-1) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Setting up chrony (3.2-4ubuntu4.2) ...
Processing triggers for systemd (237-3ubuntu10.13) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up ethtool (1:4.15-0ubuntu1) ...
15.5EthernetHardwareTimestamp Verification
Identifythe ethernet interfacetobe used onthe client (Linux) machine, e.g.,eno1. Run the eth-
toolutility and query thisnetworkinterface forsupportedcapabilities.
Modify/etc/linuxptp/ptp4l.conf and append the following,replacingeno1 and eno2 with the appropriateinterface names:
boundary_clock_jbod 1
[eno1]
[eno2]
Thedefault systemdservicefile forUbuntu 18.04 attemptsto use theeth0 address on thecommand
line. Override systemd service file so that the configuration file is used instead of hard coded in the
servicefile.
Createa systemddrop-in directory tooverride the systemservicefile:
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.756] port 1: INITIALIZING to LISTENING on INITIALIZE
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.756] driver changed our HWTSTAMP options
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.756] tx_type1 not 1
(continuesonnextpage)
88
Page 89
(continuedfrompreviouspage)
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.756] rx_filter 1 not 12
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.756] port 2: INITIALIZING to LISTENING on INITIALIZE
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.757] port 0: INITIALIZING to LISTENING on INITIALIZE
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.757] port 1: link up
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.757] port 2: link down
Mar 13 14:38:57 leadlizard ptp4l[25783]: [590188.757] port 2: LISTENING to FAULTY on FAULT_DETECTED (FT_
,→UNSPECIFIED)
Mar 13 14:38:58 leadlizard ptp4l[25783]: [590189.360] port 1: new foreign master 001747.fffe.700038-1
Theabovesystemctl status ptp4l console output shows systemdcorrectlyread the override file createdearlier beforestartingseveral secondsafterthe restart command.
Thelogoutputshowsthatagrandmasterclockhasbeendiscoveredonport1(eno1)andport2(eno2)is
currentlydisconnectedand in thefaulty stateas expected. Inthe testnetworkaTrimbleThunderbolt
PTPGM100 Grandmaster Clockis attached on eno1.
Replace the default value with a lower clock class (higher priority) and restart linuxptp. Edit /etc/
linuxptp/ptp4l.conf and comment out the defaultclockClass value and insert a linesetting it 128.
#clockClass248
clockClass128
Restartptp4l so the configurationchangetakes effect.
$ sudo systemctl restart ptp4l
Thiswillconfigureptp4l to advertise a master clock on eno2 as a clock that will win the BMCA for an
OusterOS1 sensor.
However, the ptp4l service is only advertising the Ethernet controller’s PTP hardware clock, not the
Linuxsystem time asisoftenexpected.
15.6.3 Configuring phc2sys toSynchronize the System Timeto thePTP Clock
To synchronize the Linux system time to the the PTP hardware clock the phc2sys utility needs to be
run. Thefollowing configuration will tell phc2sys to take the Linux CLOCK_REALTIME and write that time
tothe PTP hardwareclock in the Ethernet controllerforeno2. These interfaces arethenconnected to
PTPslavessuchas Ouster OS1 sensors.
Createa systemddrop-in directory tooverride the systemservicefile:
Note: Ifmultiple interfaces need to be synchronized from CLOCK_REALTIME then multipe instances of
thephc2sys service need to berun as it only acceptsa single slave(i.e. -c) argument.
Restartthe phc2sys service so the changetakes effect:
15.6.4 ConfiguringChrony to Set SystemClock UsingPTP
AnupstreamPTPgrandmasterclock(e.g.,aGPSdisciplinedPTPclock)canbeusedtosetthesystem
time if precise absolute time is neededforsensor data. Chrony is a Linux time service that can read
from NTP and PTP and set the Linux system time using the most accurate source available. With a
properfunctioningPTPgrandmasterthePTPtimesourcewillbeselectedandtheerrorfromthepublic
timeserverscan bereviewed.
The following phc2shm service will synchronize the time from eno1 (wherethe external grandmaster
isattached) to the systemclock.
Createa file named/etc/systemd/system/phc2shm.service with the followingcontents:
Notethatthe Reference ID matchestheptp refidfromthe chrony.conffileandthatthesourcesoutput
shows the ptp reference id as selected (signified by the * state in the second column). Additionally,
theNTP time sources showa small relativeerrorto the highaccuracyPTP time source.
Inthis case the PTPgrandmasteris properlyfunctioning.
Ifthis error is large,chronywill select theNTPtime sources and mark thePTPtime source as invalid.
This typically signifies that something is mis-configured with the PTPgrandmasterupstream of this
deviceor the linuxptp configuration.
92
Page 93
15.7VerifyingOperation
If the PTP grandmaster was just setup and configured, it’srecommended topowercyclethe sensor.
The sensor will then jump to the correct time instead of slowly easing in the time adjustment which
willtake time ifthegrandmaster initially setthesensor to the wrongtime.
15.7.1 HTTP API
Thesensor can be queried forthe state ofitslocal PTP service throughthe HTTP system/time/ptp.
JSONresponse fields tocheck:
parent_data_set.grandmaster_identity should list the identity ofthe local grandmaster
port_data_set.port_state should be SLAVE
15.7.2 LinuxPTPPMC Tool
The sensor will respond to PTP management messages. The linuxptp pmc (see man pmc) utility can be
usedto query all PTPdevices on the localnetwork.
Onthe Linux host forthe pmc utility tocommunicatewith then run thefollowing command:
Thisguide will help you understandhowto quickly get connectedto your sensor to start doing great
thingswith it. Whentrying toconnect tothe sensor forthefirsttime thereare somebasics thatneed
toto be achievedfor successful communicationbetween the host machineand the sensor.
Weneed to ensure that the sensor receivesanIPaddressfrom the host machine so that we can talk
to it. This can be achieved with a few different methods such as DHCP, link-local, static IP. We also
needto ensure thatthesensor and the host machineare talking on thesamesubnet.
Once the sensor receives an IP address and is on the correct subnet we can talk to it using its hostname,os-991234567890.local, where 991234567890 isthesensor serial number.
Ifsomeof this terminologyisnewtoyou don’tfret,wehavedefined some of it for you. Hereis some
basicterminology thatwillhelp youdigestthe stepsandbe morefamiliarwith networkingin general.
IPv4Address Thisis the address that can be used to communicate with devices on a network. The
formatofanIPv4addressisasetoffouroctets,xxx.xxx.xxx.xxx withxxx beingintherange0-255.
Forexample,yourhostmachineEthernetportmayhaveanaddressof192.0.2.1 andyoursensor
mayhaveanaddress of 192.0.2.130.
DHCP(Dynamic Host Configuration Protocol)Server This is a server that may run on your host
machine,switch, orrouterwhich willservean IPv4addressto adevice that isconnectedto it. It
willensure that each deviceconnected will havea unique IPv4 addresson the network.
Link-localIPv4 Address These are the addresses that areself-assignedbetween the host machine
and a device connected to it in the absence of a DHCP server. They are only valid within the
networksegment that the host is connected to. The addresses lie within theblock169.254.0.0/
16 (169.254.0.0 - 169.254.255.255).
SubnetMask Thisdefines which bits of the IPv4 address are the network prefix and which are the
hostidentifiers. See the tablebelowfor an example.
Binary FormDecimal-dotnotation
IPaddress
Subnetmask
Networkprefix
Hostidentifier
Note: Subnetmask can beabbreviatewith thenumber of bitsthatapply to thenetworkprefix.
E.g. /24for 255.255.255.0or /16 for255.255.0.0.
deviceratherthanlettingthehostmachineself-assignorusingaDHCPserver. Forexample,you
may want to specify the host machine IPv4 address to be 192.0.2.100/24 and the sensor to be
192.0.2.200.
Hostname This is the more human readable name that comes with your sensor. The sensor’s host-
nameis os-991234567890.local, where 991234567890 isthe sensor serial number.
Note: The .local portion of the hostname denotes the local domain used in combination with
multicastDNS(mDNS).Itisemployedwhenusingthesensorinalocalnetworkenvironmentwith
supportingoperating systemservices. This means whenthe sensor isdirectly connectedto the
host machine or if the host machine and sensor are on thesame network connected through a
routeror switch. If you aretrying to connecttothe sensoronanother domain withasupporting
DHCP and DNS server configuration you should replace the .local with the domain the sensor
is on. For example, if the sensor is connected to a network with domain ouster-domain.com the
sensorwill be reachable onos-991234567890.ouster-domain.com.
16.2Windows
ThefollowingstepshavebeentestedonWindows10. Thesensor’shostnameisos-991234567890.local,
where991234567890 is the sensorserialnumber.
16.2.1 Connecting the Sensor
1. Connectthesensorto an availableEthernet port on your hostmachineor router.
2. Thesensor will automatically obtain an IPaddresseither through link-local or DHCP (if preconfigured)depending on yournetworkconfiguration.
Note:It can take up to 60 seconds to obtain an IP address from the initial power-up of the
sensor.
16.2.2 The Sensor Homepage
1. Typeos-991234567890.local in the address barofyour browsertoview the sensorhomepage
Note: Ifyou are unable to load the sensor homepage, followthe steps in Determining the IPv4
Address of the Sensor to verifyyour sensor is onthenetwork and hasavalid IPv4 address.
96
Page 97
16.2.3 Determiningthe IPv4Address ofthe Sensor
1. Openacommandprompt on the hostmachineby pressing Win+Xand then A
2. Usethepingcommand to determinetheIPv4 address of thesensor
Command
ping -4 [sensor_hostname]
Example
C:\WINDOWS\system32>ping -4 os-991234567890.local
Note:If this command hangs you may need to go back and configure you interface to
link-localin the section Connecting the Sensor
Response
Pinging os-991234567890.local [169.254.0.123] with 32 bytes of data:
Reply from 169.254.0.123: bytes=32 time<1ms TTL=64
Reply from 169.254.0.123: bytes=32 time<1ms TTL=64
Reply from 169.254.0.123: bytes=32 time<1ms TTL=64
Reply from 169.254.0.123: bytes=32 time<1ms TTL=64
Ping statistics for 169.254.0.123:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Note: Inthisexample,yoursensorIPv4 addressis determinedto be169.254.0.123. If your
sensorIPv4 address is oftheform 169.254.x.x itisconnected via link-local.
3. You can also browsefor the sensor IPv4 addressusingdns-sd and the sensor hostname. Learn
moreabout this in Finding a Sensor with mDNS Service Discovery
Note: Inthisexample,yoursensorIPv4 addressis determinedto be169.254.0.123. If your
sensorIPv4 address is oftheform 169.254.x.x itisconnected via link-local.
97
Page 98
16.2.4 Determiningthe IPv4 Address of the Interface
1. Openacommandprompt by pressingWin+Xand thenA
2. ViewtheIPv4 address of yourinterfaces
Command
netsh interface ip show config
Example
C:\WINDOWS\system32>netsh interface ip show config
Response
Configuration for interface "Local Area Connection"
DHCP enabled:Yes
IP Address:169.254.0.1
Subnet Prefix:169.254.0.0/16 (mask 255.255.0.0)
InterfaceMetric:25
DNS servers configured through DHCP: None
Register with which suffix:Primary only
WINS servers configured through DHCP: None
Configuration for interface "Loopback Pseudo-Interface 1"
DHCP enabled:No
IP Address:127.0.0.1
Subnet Prefix:127.0.0.0/8 (mask 255.0.0.0)
InterfaceMetric:75
Statically Configured DNS Servers:None
Register with which suffix:Primary only
Statically Configured WINS Servers:None
Inthis example, your sensorisplugged into interface“LocalArea Connection”
YourhostIPv4addresswillbeon theline thatstartswith IPAddress: Inthiscase itis
169.254.0.1
Note: IfyourinterfaceIPv4addressisoftheform169.254.x.x,itisconnectedvialink-local
to the sensor. Thismeans that Windows self-assigned an IP address in the absence of a
DHCPserver.
16.2.5 Setting the Host Interfaceto DHCP
Usethis to set your interfaceto automatically obtain an IPaddressvia DHCP.This is useful for architecturesthat need tobe more plug andplay.
Setyour interfaceto DHCP
Command
98
Page 99
netsh interface ip set address ["Network Interface Name"] dhcp
Example withinterfacename "Local Area Connection"
C:\WINDOWS\system32>netsh interface ip set address "Local Area Connection" dhcp
Response blank
16.2.6 Settingthe Host Interfaceto Static IP
Usethis toset yourinterfacetobeassigned astaticIPv4 address. Thisis usefulforcontrollingtheIP
addressthat the sensor willbesending data to.
Setyour interfaceto static
Command
netsh interface ip set address name="Network Interface Name" static [IP address] [Subnet Mask]
,→[Gateway]
Example withinterfacename “Local AreaConnection” and IPv4 address192.0.2.1/24.
C:\WINDOWS\system32>netsh interface ip set address name="Local Area Connection" static
,→192.0.2.1/24
Note: The/24 is shorthand forSubnetMask = 255.255.255.0
Response blank
16.2.7 Finding a Sensor with mDNSService Discovery