Rosanswers logo

hi i want to know how to change the LIDAR's frequency from 5.5 Hz to say 10 Hz . I know that it involves changing the PWM singal to the motors to increase its scan rate but how do i do it ? like where is the setting in the source code ?

thanks in advance

Originally posted by Asim Arif on ROS Answers with karma: 11 on 2015-11-17

Post score: 1

Original comments

Comment by Asim Arif on 2015-11-18:
anyone please?

Comment by KennyxD on 2020-11-11:
Hi! Were you able to find answer? I'm currently having the same issue. Thanks!


2 Answers 2


Rosanswers logo


The current Serial Module of the rplidar is not capable of generating PWM signals itself, therefore there is not an option to tweak in the source code, etc. But you need to use an external source to generate and feed the control signal to the device, e.g. an Arduino board, if you wish to modify the LIDAR's frequency.

You can find the devices PIN information in Section 3 of the devkit_manual.

and here you can read about how to work with PWM in Arduino.

Hope it helps.

Originally posted by sobot with karma: 116 on 2016-02-09

This answer was ACCEPTED on the original site

Post score: 1


Rosanswers logo

I have changed the RPLIDAR A2 driver to accept the PWM frequency as a parameter at:


In the launch file that you use to start the laser driver, just add:

<param name="motor_pwm" value="..."/>```

to the "rplidar_ros" node. The value is 660 by default.


Originally posted by [DavidPortugal](https://answers.ros.org/users/1522/davidportugal/) with karma: 349 on 2018-05-21

This answer was **NOT ACCEPTED** on the original site

Post score: 2


### Original comments

**Comment by [pans7](https://answers.ros.org/users/52239/pans7/) on 2020-03-04**:\
Hello, is this pkg applicable to **RPLIDAR A1M8**?

**Comment by [KennyxD](https://answers.ros.org/users/61254/kennyxd/) on 2020-10-31**:\
I would also like to know if we can simply add this to RPLidar A1 launch files as well. Thank you.

**Comment by [winterwoods12](https://answers.ros.org/users/128073/winterwoods12/) on 2022-12-19**:\
I don't think it works on my RPLIDAR A1M8 :(
Here is my launch file code:

  <arg name="motor_pwm" default="660"/>
  <node name="rplidarNode"  pkg="rplidar_ros"  type="rplidarNode" output="screen">
    <param name="serial_port"         type="string" value="/dev/ttyUSB0"/>  
    <param name="serial_baudrate"     type="int"    value="115200"/>
    <param name="frame_id"            type="string" value="laser"/>
    <param name="inverted"            type="bool"   value="false"/>
    <param name="angle_compensate"    type="bool"   value="true"/>
    <param name="motor_pwm"          value="$(arg motor_pwm)"/>

I think, my RPLidar speed doesn't change when I change the motor_pwm value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.