- Initializes internal buffers and Serial Port.
- Stops scans and motor.
- Returns the success of the operation.
- Starts the motor of the lidar.
- Waits 2 seconds for its speed to stabilize.
- Starts Express Scans (see the RPLidar A1&A2 Communication protocol note).
- Returns true in case of success for both the motor start and scan start operations.
- Stops current Scan.
- Stops the motor of the lidar(tries rp_values::NUMBER_PWM_TRIES times as we do not have any information on the success).
- Returns true in case of success for both the motor stop and scan stop operations.
- Closes file descriptor for the used serial port.
- Returns the success of the file close operation.