Closed jayro-zaid closed 1 year ago
i have the same issue in both ros2 foxy and ros2 humble (minus the ros1 specifics) edit, i found out its about the baud rate of the serial coms. alternatively, you can use this: https://github.com/Slamtec/sllidar_ros2/tree/main it works great for me
It seems you are using RPLIDAR A2M12, whose baudrate should be 256000 instead of 115200. Please change serial_baudrate param in your launch file and try again.
And also, RPLIDAR consume much electricty, so please use a USB port that can provide more current.
Got the same but I couldn't solve with this package do you have any idea about it?
edit, i found out its about the baud rate of the serial coms. alternatively, you can use this: https://github.com/Slamtec/sllidar_ros2/tree/main it works great for me
Got the same but I couldn't solve with this package do you have any idea about it?
edit, i found out its about the baud rate of the serial coms. alternatively, you can use this: https://github.com/Slamtec/sllidar_ros2/tree/main it works great for me
As mentioned before, this issue is mainly related to baud-rate issues (didn't go deep enough to see exactly how, but it is so based on my very little experience). so check the baud-rates specification of your lidar and change the relevant parameters. that should do the trick.
My lidar is s2e so it uses LAN cable.
It seems you are using RPLIDAR A2M12, whose baudrate should be 256000 instead of 115200. Please change serial_baudrate param in your launch file and try again.
And also, RPLIDAR consume much electricty, so please use a USB port that can provide more current.
Just refer to this
Dear community,
A few weeks ago, the company where I am working acquired a Lidar A2M12, and I have followed these tutorials, but nothing works!
a) http://wiki.ros.org/rplidar b) https://github.com/robopeak/rplidar_ros/wiki
I want to explain to you step by step my procedure, in such a way that you can give me a solution or suggestion about this huge problem that I have, since we are in the middle of a project.
I am using a virtual machine with Ubuntu 20.04 and ROS Noetic. I am powering the lidar with a mobile phone charger of: 5V, 2A.
Step 1 First, I cloned the RPLIDAR ROS package (https://github.com/slamtec/rplidar_ros) in my catkin's workspace src folder:![image](https://user-images.githubusercontent.com/82879073/235331903-9a9897b1-0e28-4311-8f4c-fcc2f121d95f.png)
Output:![image](https://user-images.githubusercontent.com/82879073/235331905-ca8b76b6-dfa4-4f88-b6cd-e96a709553fc.png)
Then, I ran![image](https://user-images.githubusercontent.com/82879073/235331924-01e3a0e2-797e-4591-bc6f-192aa280726d.png)
catkin_make
to build rplidarNode and rplidarNodeClient:Output:
![image](https://user-images.githubusercontent.com/82879073/235331936-957335d6-0b36-4f6e-b69d-56177256e3c8.png)
Step 2 I set the permissions for the rplidar device. For that, I opened the original file![image](https://user-images.githubusercontent.com/82879073/235331956-b4e15486-b0de-45f8-90e1-b05a78e68b31.png)
rplidar.rules
:Output:![image](https://user-images.githubusercontent.com/82879073/235331974-a2e506a8-8b1f-44f8-b367-2bd545e2580f.png)
And then, I have done the settings below (according to http://wiki.ros.org/rplidar):![image](https://user-images.githubusercontent.com/82879073/235331986-edec13c9-138d-4fee-9104-0ecb528c192f.png)
I saved the new
rplidar.rules
file, and finally I ran the script./create_udev_rules.sh
:Output:![image](https://user-images.githubusercontent.com/82879073/235332407-f3bfd3b1-47e7-4ee4-8b94-7a5d31d4fc56.png)
Now, I have the![image](https://user-images.githubusercontent.com/82879073/235332423-d47f9f27-59c1-44d5-a8af-92505708036d.png)
rplidar.rules
file in/etc/udev/rules.d
:Step 3 Once I have changed the USB port remap, I changed the launch file about the serial_port value. This is the original
![image](https://user-images.githubusercontent.com/82879073/235332437-ae6671c8-c1b0-44e0-897a-4bd9f659d35d.png)
rplidar.launch
file:This is the new![image](https://user-images.githubusercontent.com/82879073/235332447-e1322c97-d413-4fac-93df-4de7e7338b8a.png)
rplidar.launch
file:The same procedure with the![image](https://user-images.githubusercontent.com/82879073/235332469-373dd42b-4c73-4396-80d1-382744c6363c.png)
rplidar_a3.launch
file:The original![image](https://user-images.githubusercontent.com/82879073/235332493-8b095ab0-6d9f-4915-b03f-a04fcd6adb4c.png)
rplidar_a3.launch
file:The new![image](https://user-images.githubusercontent.com/82879073/235332509-978a4426-b7e6-43f8-af9b-9944027b7c56.png)
rplidar_a3.launch
file:Step 4 I checked the authority of rplidar's serial-port, and this is the result:![image](https://user-images.githubusercontent.com/82879073/235332519-f3e8a529-6968-48a2-b33f-02a45e626d8b.png)
Then, I added the authority to write:![image](https://user-images.githubusercontent.com/82879073/235332532-10f8c73d-ff6c-4f39-ba50-8c365745a961.png)
Step 5 Finally, I started the rplidar node.![image](https://user-images.githubusercontent.com/82879073/235332538-2808f954-a136-43dd-a5d7-e9f95f5e79b7.png)
roscore
initialization without any problems.Error executing![image](https://user-images.githubusercontent.com/82879073/235332550-65ecaca5-6f77-468d-9d38-93eacfe312c4.png)
view_rplidar.launch
!I had read that in some cases the solution was to run![image](https://user-images.githubusercontent.com/82879073/235332568-b041db19-18f5-4986-b982-0e645c58b5c1.png)
view_rplidar_a3.launch
, but I still get an error!Please, if someone could give me a suggestion, solution, or tell me about a similar experience, I would be very grateful!
I look forward to your comments. Thank you in advance!