Ask Your Question
2

Changing RPLIDAR laser scanner motor from being always on?

asked 2014-08-26 05:42:25 -0600

mrsoft99 gravatar image

(This is on Ubuntu 12.04 and Hydro, Turtlebot2 with kobuki.)

I just got a Robopeak RPLIDAR, and I'm working on mounting it to my turtlebot2. (I wanted a wider angle than the kinect could give me.) As soon as the RPLIDAR is plugged into the USB slot, the motor starts spinning (This is without even having the driver loaded). The motor is enabled by the RS232 DTR signal. When the RPLIDAR ros node starts, it also sets the DTR signal to start the motor spinning.

I often have my turtlebot on for hours (days!) at a time, even if I'm not using it. I don't like the idea of the motor spinning for hours (days!). I'm thinking of modifying the RPLIDAR ros node to implement a way to stop/start the motor. What do people think of these ideas?

1) Add a service to the rplidar node, with 3 messages: motor_on, motor_off, get_motor_status. The motor could be controlled from command line, or programatically.

2) Add a dynamic parameter to the rplidar node: motor_enable. Could still use command line or program to change.

3) Use a special case of the rplidar publishing rate. If set to 0 Hz, this would turn the motor off; if non-zero, motor would turn on.

(And I know the motor should be given time to warm up.)

thanks for your comments, buddy

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2015-04-09 07:30:14 -0600

Amaury Negre gravatar image

Hi, I have implemented the functionalities you want (the rplidar_node create 2 services "start_motor" and "stop_motor").

I have send a pull request on github, but you can access the code on my fork : https://github.com/negre/rplidar_ros

edit flag offensive delete link more
0

answered 2014-10-17 09:42:57 -0600

I saw that

serialport.setDTR(true);

stops motor turning. But this may cause serial port problems. If you could get a stable solution with this please post here :)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-26 05:42:25 -0600

Seen: 1,527 times

Last updated: Oct 17 '14