From 6ca883298468fcf196e1b1f45e2e3c96ac8e25f5 Mon Sep 17 00:00:00 2001 From: Patrick Goebel Date: Wed, 26 Dec 2012 09:40:18 -0800 Subject: [PATCH] README.md updated withe instructions on testing motor and encoder connections --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fb05c86..0deec57 100644 --- a/README.md +++ b/README.md @@ -60,13 +60,9 @@ To install the MegaRobogaiaPololu sketch, follow these steps: where SKETCHBOOK_PATH is the path to your Arduino sketchbook directory. - $ ln -s `rospack find ros_arduino_firmware`/src/libraries/MegaRobogaiaPololu MegaRobogaiaPololu + $ cp -rp `rospack find ros_arduino_firmware`/src/libraries/MegaRobogaiaPololu MegaRobogaiaPololu -This last command creates a link in your sketchbook folder for the -MegaRobogaiaPololu sketch that you must run on your Arduino Mega -controller. By creating a link rather than copying the files, the -sketch will get updated along with other files in the -ros\_arduino\_bridge stack. +This last command copies the MegaRobogaiaPololu sketch files into your sketchbook folder. The next section describes how to configure, compile and upload this sketch. Loading the MegaRobogaiaPololu Sketch @@ -104,6 +100,13 @@ parameter as well as the pin numbers for the servos you have attached. * Compile and upload the sketch to your Arduino. +Testing your Wiring Connections +------------------------------- +On a differential drive robot, the motors are connected with opposite polarity to the motor controller terminals. Similarly, the A/B leads from the encoders are connected in the reverse sense to each other. However, you still need to make sure that (a) the wheels move forward when given a positive motor speed and (b) that the encoder counts increase when the wheels move forward. + +After placing your robot on blocks, you can use the Serial Monitor in the Arduino IDE to test both requirements. Use the 'm' command to activate the motors, the 'e' command to get the encoder counts, and the 'r' command to reset the encoders to 0. Remember that at the firmware level motor speeds are given in encoder ticks per second so that for an encoder resolution of, say 4000 counts per wheel revolution, a command such as 'm 20 20' should move the wheels fairly slowly. Also remember that the first argument is the left motor speed and the second argument is the right motor speed. Similarly, the using the 'e' command, the first number returned is the left encoder count and the second number is the right encoder count. + + Configuring the ros\_arduino\_python Node ----------------------------------------- Now that your Arduino is running the required sketch, you can