[−][src]Struct rplidar_drv::RplidarDevice
Rplidar device driver
Methods
impl<T: ?Sized> RplidarDevice<T> where
T: Read + Write,
[src]
T: Read + Write,
pub fn new(channel: Channel<RplidarHostProtocol, T>) -> RplidarDevice<T>
[src]
Construct a new RplidarDevice with channel
Example
let mut serial_port = serialport::open(serial_port_name)?; let channel = Channel::new(RplidarHostProtocol::new(), serial_port); let rplidar_device = RplidarDevice::new(channel);
pub fn with_stream(stream: Box<T>) -> RplidarDevice<T>
[src]
Construct a new RplidarDevice with stream
Example
let mut serial_port = serialport::open(serial_port_name)?; let rplidar_device = RplidarDevice::with_stream(serial_port);
pub fn get_device_info(&mut self) -> Result<RplidarResponseDeviceInfo>
[src]
get device info of the RPLIDAR
pub fn get_device_info_with_timeout(
&mut self,
timeout: Duration
) -> Result<RplidarResponseDeviceInfo>
[src]
&mut self,
timeout: Duration
) -> Result<RplidarResponseDeviceInfo>
get device info of the RPLIDAR with timeout
pub fn stop(&mut self) -> Result<()>
[src]
Stop lidar
pub fn core_reset(&mut self) -> Result<()>
[src]
Reset RPLIDAR core
pub fn set_motor_pwm(&mut self, pwm: u16) -> Result<()>
[src]
Set motor PWM (via accessory board)
pub fn stop_motor(&mut self) -> Result<()>
[src]
Stop motor
pub fn start_motor(&mut self) -> Result<()>
[src]
Start motor
pub fn get_typical_scan_mode(&mut self) -> Result<u16>
[src]
get typical scan mode of target LIDAR
pub fn get_typical_scan_mode_with_timeout(
&mut self,
timeout: Duration
) -> Result<u16>
[src]
&mut self,
timeout: Duration
) -> Result<u16>
get typical scan mode of target LIDAR with timeout
pub fn get_all_supported_scan_modes(&mut self) -> Result<Vec<ScanMode>>
[src]
get all supported scan modes supported by the LIDAR
pub fn get_all_supported_scan_modes_with_timeout(
&mut self,
timeout: Duration
) -> Result<Vec<ScanMode>>
[src]
&mut self,
timeout: Duration
) -> Result<Vec<ScanMode>>
get all supported scan modes supported by the LIDAR with timeout
pub fn start_scan(&mut self) -> Result<ScanMode>
[src]
start scan
pub fn start_scan_with_timeout(&mut self, timeout: Duration) -> Result<ScanMode>
[src]
start scan with timeout
pub fn start_scan_with_options(
&mut self,
options: &ScanOptions
) -> Result<ScanMode>
[src]
&mut self,
options: &ScanOptions
) -> Result<ScanMode>
start scan with options
pub fn start_scan_with_options_and_timeout(
&mut self,
options: &ScanOptions,
timeout: Duration
) -> Result<ScanMode>
[src]
&mut self,
options: &ScanOptions,
timeout: Duration
) -> Result<ScanMode>
start scan with options and non-default timeout
pub fn grab_scan_point(&mut self) -> Result<ScanPoint>
[src]
read scan point
pub fn grab_scan_point_with_timeout(
&mut self,
timeout: Duration
) -> Result<ScanPoint>
[src]
&mut self,
timeout: Duration
) -> Result<ScanPoint>
read scan point with timeout
pub fn grab_scan(&mut self) -> Result<Vec<ScanPoint>>
[src]
read scan frame
pub fn grab_scan_with_timeout(
&mut self,
timeout: Duration
) -> Result<Vec<ScanPoint>>
[src]
&mut self,
timeout: Duration
) -> Result<Vec<ScanPoint>>
read scan frame
pub fn get_device_health(&mut self) -> Result<Health>
[src]
Get LIDAR health information
pub fn get_device_health_with_timeout(
&mut self,
timeout: Duration
) -> Result<Health>
[src]
&mut self,
timeout: Duration
) -> Result<Health>
Get LIDAR health information
pub fn check_motor_ctrl_support(&mut self) -> Result<bool>
[src]
Check if the connected LIDAR supports motor control
pub fn check_motor_ctrl_support_with_timeout(
&mut self,
timeout: Duration
) -> Result<bool>
[src]
&mut self,
timeout: Duration
) -> Result<bool>
Check if the connected LIDAR supports motor control with timeout
Trait Implementations
impl<T: Debug + ?Sized> Debug for RplidarDevice<T>
[src]
Auto Trait Implementations
impl<T: ?Sized> Send for RplidarDevice<T> where
T: Send,
T: Send,
impl<T: ?Sized> Sync for RplidarDevice<T> where
T: Sync,
T: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,