-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-3545 - add sensor process #177
RSDK-3545 - add sensor process #177
Conversation
sensorprocess/sensorprocess.go
Outdated
func incrementLogCount(params Params, t time.Time) { | ||
_, ok := params.LogFailures[t] | ||
if !ok { | ||
params.LogFailures[t] = 1 | ||
return | ||
} | ||
params.LogFailures[t]++ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think when we log the failures, it will not always be up to date because there is no lock right now. I thought about adding a lock, but think it would cause performance issues and that given the aggregation of failures it is not as crucial to get the exact number of failures at that instant logged. Thoughts?
} | ||
|
||
buf := new(bytes.Buffer) | ||
err = pointcloud.ToPCD(reading, buf, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err = pointcloud.ToPCD(reading, buf, 0) | |
err = pointcloud.ToPCD(reading, buf, pointcloud.PCDBinary) |
PR moved to: #185 |
Ticket
SensorProcess
polls the lidar to get the next sensor reading and adds it to the mapBuilder by callingaddSensorReading
in a loop and exits if the context provided is canceled. It also starts the background log processaddSensorReading
checks if the metadata from the GRPC call has a timestamp, if it does it callsaddSensorReadingFromReplaySensor
otherwise It callsaddSensorReadingFromLiveReadings
addSensorReadingFromReplaySensor
continuously callscartofacade.AddSensorReading
until it can acquire lock, and increments the failure count of this time stamp each time it failsaddSensorReadingFromLiveReadings
callscartofacade.AddSensorReading
once, and skips the reading if it cannot acquire the lock, and increments the failure count of this time stamp onceQuestions: