In order to decrease our cycle time, we should only check each sensor value one time in each cycle, instead of multiple.
To do it we should save the sensor value in a variable and make sure we are updating it when we need.
For example, create a variable for odometry pose, update it in the "operate()" function and then use this variable instead of reading from the sensors.
In order to decrease our cycle time, we should only check each sensor value one time in each cycle, instead of multiple.
To do it we should save the sensor value in a variable and make sure we are updating it when we need. For example, create a variable for odometry pose, update it in the "operate()" function and then use this variable instead of reading from the sensors.