Lidar and motor controls

Was working on AMCL with movebase using a rosbot. Everything is working but even after closing the launch file and serial bridge node, the lidar kept spinning and the robot’s wheels didn’t stop too. How to deal with this issue? Is it related to Rosbot firmware?

Hi thiaga,

It’s some type of bug in rplidar_ros pkg. Some users face it occasionally (I cant control my rplidar(can't stop) - ROS Answers: Open Source Q&A Forum). You should try to stop it by typing:

rosservice call /stop_motor

What do you mean when you say “robot’s wheels didn’t stop too”. May I ask you to expand this description?

Best regards,
Hubert

Yeah I am trying to do multirobot coordination by making one rosbot as leader and another as follower using a follower controller node. When I stop the launch on both rosbots the follower rosbot’s wheels don’t stop.

Hi Hubert,
I tried this rosservice call /stop_motor but I got ERROR: Service [/stop_motor] is not available. And the lidar didn’t stop.

Hi thiaga,

When I stop the launch on both rosbots the follower rosbot’s wheels don’t stop.

You probably use old firmware, because in new one, wheels will set automatic stop if they don’t receive any message with velocity information for a while.

I tried this rosservice call /stop_motor but I got ERROR: Service [/stop_motor] is not available. And the lidar didn’t stop.

You are right, I’m sorry for mistake. It’s not very elegant way, but after closing all launch file and roscore you have to run rosrun rplidar_ros rplidarNode it should give you Error and stop LIDAR.

Please let me know the results.

Best regards,
Hubert

1 Like

I was following the ROS2 + Docker ROSbot tutorial and at some point, the lidar was spinning forever even when there was no ROS running.

Running the rosrun rplidar_ros rplidarNode did the job. It started the /scan topic and the services /start_motor and /stop_motor became available.

Before running rosrun rplidar_ros rplidarNode, the rplidarNodeClient was always failing with the error below, no matter how many times I stopped and stared docker-compose:

[ERROR] [1643825985.435398273]: Error, operation time out. RESULT_OPERATION_TIMEOUT!

So I came here basically to thank you for the rosrun rplidar_ros rplidarNode command, and also to keep track of the answer.