Fieldsteer
From Rsewiki
(Difference between revisions)
(Created page with "Interface plug-in to dynamixel servos (one at each front wheel) and the magnetic encoders AMS 5045 on each wheel and their roll angle relative to the rear wheels. The plug-in ...") |
|||
Line 5: | Line 5: | ||
===Read variables=== | ===Read variables=== | ||
− | encfront[3] Magnetic encoder value for left wheel, right wheel and roll encoder (14 bit value (sum of 4 12 but values). | + | encfront[3] Magnetic encoder value for left wheel, right wheel and roll encoder (14 bit value (sum of 4 12 but values). |
− | encfrontmagnet[3] Magnet status: 0 all is fine , 3 is magnetic field is too week (to far away), 1,2 magnet is moving away or getting closer. | + | encfrontmagnet[3] Magnet status: 0 all is fine , 3 is magnetic field is too week (to far away), 1,2 magnet is moving away or getting closer. |
− | encfronterr[3] Magnet error count. | + | encfronterr[3] Magnet error count. |
− | steerPos[2] Steering position for each servo (degrees*10) | + | steerPos[2] Steering position for each servo (degrees*10) |
− | steerVel[2] Steering servo velocity - in servo units | + | steerVel[2] Steering servo velocity - in servo units |
− | steerLoad[2] Steering load - motor current based - as reported by servo | + | steerLoad[2] Steering load - motor current based - as reported by servo |
− | steerVolt[2] Battery voltage as reported by servo (volt x 10) | + | steerVolt[2] Battery voltage as reported by servo (volt x 10) |
− | steerTemp[2] Servo temperature in degrees celcius | + | steerTemp[2] Servo temperature in degrees celcius |
− | steerServoComErr[2] Servo communication error count | + | steerServoComErr[2] Servo communication error count |
− | steerServoIntRef[2] Servo position reference in unsigned int (12 bit) (mostly for debug, may be removed) | + | steerServoIntRef[2] Servo position reference in unsigned int (12 bit) (mostly for debug, may be removed) |
− | steerServoIntPos[2] Servo current position in unsigned int (12 bit) (mostly for debug, may be removed) | + | steerServoIntPos[2] Servo current position in unsigned int (12 bit) (mostly for debug, may be removed) |
===Write variables=== | ===Write variables=== | ||
Line 21: | Line 21: | ||
Robot geometry must be defined in rhdconfig.xml | Robot geometry must be defined in rhdconfig.xml | ||
− | steeringangleref[1] Desired steering angle (in degrees x 10) for robot | + | steeringangleref[1] Desired steering angle (in degrees x 10) for robot |
Revision as of 08:08, 26 October 2013
Interface plug-in to dynamixel servos (one at each front wheel) and the magnetic encoders AMS 5045 on each wheel and their roll angle relative to the rear wheels. The plug-in talks to a microprocessor (teensy 2++). The firmware is in a subdirectory to this plug-in.
Read variables
encfront[3] Magnetic encoder value for left wheel, right wheel and roll encoder (14 bit value (sum of 4 12 but values). encfrontmagnet[3] Magnet status: 0 all is fine , 3 is magnetic field is too week (to far away), 1,2 magnet is moving away or getting closer. encfronterr[3] Magnet error count. steerPos[2] Steering position for each servo (degrees*10) steerVel[2] Steering servo velocity - in servo units steerLoad[2] Steering load - motor current based - as reported by servo steerVolt[2] Battery voltage as reported by servo (volt x 10) steerTemp[2] Servo temperature in degrees celcius steerServoComErr[2] Servo communication error count steerServoIntRef[2] Servo position reference in unsigned int (12 bit) (mostly for debug, may be removed) steerServoIntPos[2] Servo current position in unsigned int (12 bit) (mostly for debug, may be removed)
Write variables
Robot geometry must be defined in rhdconfig.xml
steeringangleref[1] Desired steering angle (in degrees x 10) for robot
Configuration example
Robot geometry
< !-- robot configuration (for all plugins) - in meters for the most part. wheelbase is distance between rear wheels steerbase is distance between front and rear axis frontbase is distance between front wheels -- > <robot wheelBase = "0.35" steerBase = "0.39" frontBase = "0.35" tickPerRev = "2048" gearRatio="1" wheelDiameter="0.16" />
Servo ID for the servo on the left and right wheel are the ID set in the servo, and must be among the defined IS listed in the firmware (on teensy 2++) . The servo communication speed is define in the controller (500kbit/s)
<! -- steering interface * servo values: "ID minpos centerpos maxpos" * dev is USB interface to teency 2++ board * dead zone (with no movement around target position) (0..255) * safety > joystick * debug if 1 then errors during startup is ignored * debugIO if is e.g. 3 then three status messages from each servo is shown after each update -- > <dxlSteer enable="true" lib="fieldsteer.so.1" critical="true" safety="2" dev="/dev/ttyACM0" servoLeft ="0x04 21 527 1002" servoRight="0x05 21 531 1002" deadzone="3" debug="0" debugIO="0" > </dxlSteer>