Trying to fit teleop_twist_keyboard velocity
Hi to all!
I haven't had troubles using teleop_twist_keyboard node, it works perfectly. But I can't find a way to decrease velocity of the motors I have. These are the motors https://www.pololu.com/product/2827 and this one the motor driver shield https://www.pololu.com/product/2507 mounted on arduino mega 2560, in order to drive them and get odometry info. The files I'm using for motors are:
https://www.dropbox.com/s/wvl4fkcdo0i... "base_controller" (get odometry data) https://www.dropbox.com/s/jzkx5rxckoz... "motor_controller6" (this uses all parameters and suscribes to cmd_vel topic which also teleop_twist_keyboard is suscribed) https://www.dropbox.com/s/iuhv9oni4zl... "robot_specs" (parameters typical from motors)
Inside motor_controller6.ino I tried change everything that could have fit velocity:
float Kp = 15 (this is the main parameter because the 9 keyboard's keys for directions, detects faster it while I press it)
md.setM1Speed(PWM_val1) and md.setM2Speed(PWM_val2) (dividing it)
MAX_RPM (reducing it value)
Also inside teleop_twist_keyboard.py I decrease speed and turn, but seems doesn't work. Is it important clarify that "z, x and c" doesn't affect velocity nor turn speed. I'm working with this node, but is too fast and my robot is one meter high. So, abrupt speeds and turns make it tagger and it could fall. I just want to decrease velocity and turn, what should I change inside motor_controller6.ino? I understand most of code actions and relations but I can't figure out that part.
-Update-
Photos of wire connections https://www.dropbox.com/s/nq2ripdkrni... https://www.dropbox.com/s/cd9tm4ud6u8... https://www.dropbox.com/s/rrqqeaph1jx...
Thanks