tomasvr / turtlebot3_drlnav

A ROS2-based framework for TurtleBot3 DRL autonomous navigation
128 stars 18 forks source link

physical robot apply cmd_vel to motors using pwm #19

Open xubo92 opened 3 months ago

xubo92 commented 3 months ago

Hi @tomasvr

Thanks a lot for the great project! The demo looks fantastic!

I'm building my own physical robot and would like to deploy your project on it. I have one question about how you turn the cmd_vel value generated from NN model to the physical motor spin speed? do you directly set the motor's pwm signal to some value like "motor1.pwm = xxx" that is computed by cmd_vel? if the cmd_vel are very different at two consecutive time steps (say this moment cmd_vel =1, but next moment it is 10), how to make sure the motor can immediately reach that speed? will the robot have jerk behaviours due to fast speed change?

Thanks a lot!

Best, Xubo