Question regarding lidar

I have a husarion rosbot 2.0 which uses LIDAR A2 and recently bought a LIDAR A3 (has baudrate of 256000).
I tried swapping this two lidar seem to have problem launching the LIDAR A3.
Is there anything specific that i need to change?
i saw a ros-core2-client which uses 500000 baudrate and i cant seem to change that file inside rosbot

Hello urahara94,

RpLidar A3 needs a little different configuration, here is provided example launch file for A3 version.

In our example launch files we are including RpLidar with:

<include file="$(find rplidar_ros)/launch/rplidar.launch"></include>

You can change it to:

<include file="$(find rplidar_ros)/launch/rplidar_a3.launch"></include>

Baudrate of ros-core2-client does not matter here, as both devices are using different serial ports.

Regards,
Łukasz

i see that the tutorial uses this node instead of the one which you provided.

node pkg=“rplidar_ros” type=“rplidarNode” name=“rplidar”/>
Is this the same?
and does changing the parameter will work on my lidar?

Havent tested this but will this work?
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=“256000”/>
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=“scan_mode” type=“string” value=“Sensitivity”/>
/node>

Yes, they are equal.
To be precise, the rplidar.launch contains all parameters for node pkg=“rplidar_ros” type=“rplidarNode” name=“rplidar” that are required for RpLidar A1 and A2.
Similarly, the rplidar_a3.launch is for RpLidar A3.

Regards,
Łukasz

1 Like

Why does my Lidar A3 Disconnect from time to time? It works fine at first then will disconnect and reconnect
Attach is the photo

<launch>  
  <node pkg="rplidar_ros" type="rplidarNode" name="rplidar">
	<param name="serial_port"         type="string" value="/dev/ttyUSB0"/>  
	<param name="serial_baudrate"     type="int"    value="256000"/>
 	<param name="angle_compensate"    type="bool"   value="false"/>
	<param name="inverted"            type="bool"   value="false"/>
	<param name="scan_mode"           type="string" value="Sensitivity"/>
  </node>
</launch>  

Above is the code i am using

Edit: Manual movement seems fine. Issue only occurs when i am using gmapping without manual key movement.

Hello angtzewern,

It seems that your lidar is working fine.
The error Lost sync with device, restarting... is from serial bridge.

It may look like problem with lidar, as it’s rendering in rviz depends on data from serial bridge.

Could you provide here list of all nodes running on your robot?

Regards,
Łukasz

image

list of all the node running
sorry for the delay

and this is from roswtf (even know those node i already call them in the launch file)

Could you provide here full .launch file that you are using?
And also contents of params.yaml after executing:

rosparam dump params.yaml

And screen from:

rosrun rqt_tf_tree rqt_tf_tree