Open wesfletch opened 2 years ago
To download RoboRun software, go to https://www.roboteq.com/support/files-download
The software requires a Windows computer to test.
Wrote the following code in RoboRun+
setcommand(_GO, 1, 1000)
Sends power to the motor with a value of 1000. Motor ran successfully in bursts upon each "Run" command. We will next put the command in a loop and alter code.
Follow manual attached above for wiring configuration.
[ 7332.949165] tegradc 15210000.nvdisplay: blank - powerdown [ 7333.011314] extcon-disp-state external-connection:disp-state: cable 47 state 0 [ 7333.011316] Extcon AUX1(HDMI) disable [ 7333.033030] tegra_nvdisp_handle_pd_disable: Powergated Head2 pd [ 7333.033105] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd [ 7333.033561] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd [ 7333.728373] tegradc 15210000.nvdisplay: unblank [ 7333.728985] tegra_nvdisp_handle_pd_enable: Unpowergated Head0 pd [ 7333.729071] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd [ 7333.729154] tegra_nvdisp_handle_pd_enable: Unpowergated Head2 pd [ 7333.730416] Parent Clock set for DC plld2 [ 7333.733549] tegradc 15210000.nvdisplay: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_111m_223m [ 7333.734774] tegradc 15210000.nvdisplay: hdmi: get YCC quant from EDID. [ 7333.772653] extcon-disp-state external-connection:disp-state: cable 47 state 1 [ 7333.772656] Extcon AUX1(HDMI) enable [ 7333.784386] tegradc 15210000.nvdisplay: unblank [ 7364.157021] ifidx:0 DHCP - DISCOVER [TX] [ 7364.175532] ifidx:0 DHCP - OFFER [RX] [ 7364.175750] ifidx:0 DHCP - REQUEST [TX] [ 7364.187197] ifidx:0 DHCP - ACK [RX] [ 7628.377260] ifidx:0 DHCP - DISCOVER [RX] [ 7629.330450] ifidx:0 DHCP - REQUEST [RX] [ 7670.457951] usb 1-2.2: USB disconnect, device number 39 [ 7764.634748] usb 1-2.2: new full-speed USB device number 45 using tegra-xusb [ 7764.659287] usb 1-2.2: New USB device found, idVendor=20d2, idProduct=5740 [ 7764.659329] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 7764.659348] usb 1-2.2: Product: Motor Controller [ 7764.659363] usb 1-2.2: Manufacturer: Roboteq [ 7764.659379] usb 1-2.2: SerialNumber: MDC2XXX [ 7764.664649] cdc_acm 1-2.2:1.0: ttyACM1: USB ACM device [ 7766.201797] usb 1-2.1: USB disconnect, device number 38 [ 7792.574816] usb 1-2.1: new full-speed USB device number 46 using tegra-xusb [ 7792.599459] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [ 7792.599491] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 7792.599510] usb 1-2.1: Product: Motor Controller [ 7792.599527] usb 1-2.1: Manufacturer: Roboteq [ 7792.599543] usb 1-2.1: SerialNumber: MDC2XXX [ 7792.604251] cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device [ 8580.410167] tegradc 15210000.nvdisplay: blank - powerdown [ 8580.470080] extcon-disp-state external-connection:disp-state: cable 47 state 0 [ 8580.470083] Extcon AUX1(HDMI) disable [ 8580.497000] tegra_nvdisp_handle_pd_disable: Powergated Head2 pd [ 8580.497106] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd [ 8580.497743] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd [ 8581.682447] tegradc 15210000.nvdisplay: unblank [ 8581.683311] tegra_nvdisp_handle_pd_enable: Unpowergated Head0 pd [ 8581.685861] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd [ 8581.690644] tegra_nvdisp_handle_pd_enable: Unpowergated Head2 pd [ 8581.700281] Parent Clock set for DC plld2 [ 8581.705426] tegradc 15210000.nvdisplay: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_111m_223m [ 8581.706749] tegradc 15210000.nvdisplay: hdmi: get YCC quant from EDID. [ 8581.744372] extcon-disp-state external-connection:disp-state: cable 47 state 1 [ 8581.744376] Extcon AUX1(HDMI) enable [ 8581.769181] tegradc 15210000.nvdisplay: unblank [ 8584.874471] extcon-disp-state external-connection:disp-state: cable 47 state 0 [ 8584.874480] Extcon AUX1(HDMI) disable [ 8584.899263] tegra_nvdisp_handle_pd_disable: Powergated Head2 pd [ 8584.899354] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd [ 8584.899923] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd [ 8584.900081] tegradc 15210000.nvdisplay: blank - powerdown [ 8584.900224] extcon-disp-state external-connection:disp-state: cable 51 state 0 [ 8584.900227] Extcon HDMI: HPD disabled [ 8584.903073] tegradc 15210000.nvdisplay: hdmi: unplugged [ 8584.907211] tegradc 15210000.nvdisplay: blank - powerdown [ 8584.907222] tegradc 15210000.nvdisplay: unblank [ 8584.907237] tegradc 15210000.nvdisplay: unblank [ 8585.144639] tegradc 15210000.nvdisplay: blank - powerdown [ 8585.144654] tegradc 15210000.nvdisplay: unblank [ 8585.145282] tegra_nvdisp_handle_pd_enable: Unpowergated Head0 pd [ 8585.145380] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd [ 8585.145469] tegra_nvdisp_handle_pd_enable: Unpowergated Head2 pd [ 8585.146927] Parent Clock set for DC plld2 [ 8585.150373] tegradc 15210000.nvdisplay: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_111m_223m [ 8585.151656] tegradc 15210000.nvdisplay: hdmi: get YCC quant from EDID. [ 8585.188427] extcon-disp-state external-connection:disp-state: cable 47 state 1 [ 8585.188430] Extcon AUX1(HDMI) enable [ 8585.189670] extcon-disp-state external-connection:disp-state: cable 51 state 1 [ 8585.189674] Extcon HDMI: HPD enabled [ 8585.189732] tegradc 15210000.nvdisplay: hdmi: plugged [ 8585.204044] tegradc 15210000.nvdisplay: unblank [ 8585.272291] tegradc 15210000.nvdisplay: unblank [ 8651.814317] ch341-uart ttyUSB2: usb_serial_generic_write_bulk_callback - nonzero urb status: -71 [ 8651.962757] usb 1-2.4-port1: disabled by hub (EMI?), re-enabling... [ 8651.969941] usb 1-2-port1: disabled by hub (EMI?), re-enabling... [ 8651.976598] usb 1-2.4.1: USB disconnect, device number 42 [ 8651.976943] usb 1-2.1: USB disconnect, device number 46 [ 8651.977037] usb 1-2.4.1: ch341_read_int_callback - usb_submit_urb failed: -19 [ 8651.984311] usb 1-2.4.1: failed to send control message: -19 [ 8651.990806] ch341-uart ttyUSB2: ch341-uart converter now disconnected from ttyUSB2 [ 8651.990851] ch341 1-2.4.1:1.0: device disconnected [ 8652.212997] usb 1-2.4.1: new full-speed USB device number 47 using tegra-xusb [ 8652.234304] usb 1-2.4.1: New USB device found, idVendor=1a86, idProduct=7523 [ 8652.234310] usb 1-2.4.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0 [ 8652.234313] usb 1-2.4.1: Product: USB2.0-Serial [ 8652.235183] ch341 1-2.4.1:1.0: ch341-uart converter detected [ 8652.236463] usb 1-2.4.1: ch341-uart converter now attached to ttyUSB1 [ 8652.314217] usb 1-2.1: new full-speed USB device number 48 using tegra-xusb [ 8652.335299] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [ 8652.335305] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 8652.335308] usb 1-2.1: Product: Motor Controller [ 8652.335310] usb 1-2.1: Manufacturer: Roboteq [ 8652.335312] usb 1-2.1: SerialNumber: MDC2XXX [ 8652.336217] cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device [ 8652.339491] usb 1-2-port2: disabled by hub (EMI?), re-enabling... [ 8652.345958] usb 1-2.2: USB disconnect, device number 45 [ 8652.572992] usb 1-2.2: new full-speed USB device number 49 using tegra-xusb [ 8652.595282] usb 1-2.2: New USB device found, idVendor=20d2, idProduct=5740 [ 8652.595287] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 8652.595290] usb 1-2.2: Product: Motor Controller [ 8652.595292] usb 1-2.2: Manufacturer: Roboteq [ 8652.595295] usb 1-2.2: SerialNumber: MDC2XXX [ 8652.596218] cdc_acm 1-2.2:1.0: ttyACM1: USB ACM device [ 9861.051985] usb 1-2-port1: disabled by hub (EMI?), re-enabling... [ 9861.058338] usb 1-2.1: USB disconnect, device number 48 [ 9861.061904] cdc_acm 1-2.1:1.0: failed to set dtr/rts [ 9861.291061] usb 1-2.1: new full-speed USB device number 50 using tegra-xusb [ 9861.313395] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [ 9861.313399] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 9861.313402] usb 1-2.1: Product: Motor Controller [ 9861.313404] usb 1-2.1: Manufacturer: Roboteq [ 9861.313407] usb 1-2.1: SerialNumber: MDC2XXX [ 9861.314272] cdc_acm 1-2.1:1.0: ttyACM2: USB ACM device [ 9932.732593] usb 1-2-port1: disabled by hub (EMI?), re-enabling... [ 9932.740719] usb 1-2.1: USB disconnect, device number 50 [ 9932.967683] usb 1-2.1: new full-speed USB device number 51 using tegra-xusb [ 9932.992555] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [ 9932.992582] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 9932.992596] usb 1-2.1: Product: Motor Controller [ 9932.992605] usb 1-2.1: Manufacturer: Roboteq [ 9932.992616] usb 1-2.1: SerialNumber: MDC2XXX [ 9932.996620] cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device [ 9934.524999] usb 1-2-port1: disabled by hub (EMI?), re-enabling... [ 9934.532925] usb 1-2.1: USB disconnect, device number 51 [ 9934.763750] usb 1-2.1: new full-speed USB device number 52 using tegra-xusb [ 9934.788030] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [ 9934.788067] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 9934.788079] usb 1-2.1: Product: Motor Controller [ 9934.788090] usb 1-2.1: Manufacturer: Roboteq [ 9934.788101] usb 1-2.1: SerialNumber: MDC2XXX [ 9934.794525] cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device [ 9944.508460] usb 1-2.1: USB disconnect, device number 52 [ 9944.512301] cdc_acm 1-2.1:1.0: failed to set dtr/rts [ 9945.755795] usb 1-2.1: new full-speed USB device number 53 using tegra-xusb [ 9945.779805] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [ 9945.779821] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 9945.779829] usb 1-2.1: Product: Motor Controller [ 9945.779835] usb 1-2.1: Manufacturer: Roboteq [ 9945.779842] usb 1-2.1: SerialNumber: MDC2XXX [ 9945.781613] cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device [ 9947.324468] usb 1-2.2: USB disconnect, device number 49 [ 9949.083907] usb 1-2.2: new full-speed USB device number 54 using tegra-xusb [ 9949.108652] usb 1-2.2: New USB device found, idVendor=20d2, idProduct=5740 [ 9949.108665] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 9949.108671] usb 1-2.2: Product: Motor Controller [ 9949.108677] usb 1-2.2: Manufacturer: Roboteq [ 9949.108682] usb 1-2.2: SerialNumber: MDC2XXX [ 9949.110554] cdc_acm 1-2.2:1.0: ttyACM1: USB ACM device [10161.084378] usb 1-2-port1: disabled by hub (EMI?), re-enabling... [10161.090740] usb 1-2.1: USB disconnect, device number 53 [10161.094435] cdc_acm 1-2.1:1.0: failed to set dtr/rts [10161.321144] usb 1-2.1: new full-speed USB device number 55 using tegra-xusb [10161.343478] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [10161.343484] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10161.343487] usb 1-2.1: Product: Motor Controller [10161.343489] usb 1-2.1: Manufacturer: Roboteq [10161.343492] usb 1-2.1: SerialNumber: MDC2XXX [10161.344377] cdc_acm 1-2.1:1.0: ttyACM2: USB ACM device [10177.212389] usb 1-2-port1: disabled by hub (EMI?), re-enabling... [10177.218932] usb 1-2.1: USB disconnect, device number 55 [10177.441245] usb 1-2.1: new full-speed USB device number 56 using tegra-xusb [10177.463640] usb 1-2.1: New USB device found, idVendor=20d2, idProduct=5740 [10177.463645] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10177.463648] usb 1-2.1: Product: Motor Controller [10177.463651] usb 1-2.1: Manufacturer: Roboteq [10177.463653] usb 1-2.1: SerialNumber: MDC2XXX [10177.464568] cdc_acm 1-2.1:1.0: ttyACM2: USB ACM device [10279.138332] ifidx:0 DHCP - REQUEST [TX] [10279.152841] ifidx:0 DHCP - ACK [RX]
Our motor controllers will control our motors. We need to control our motors to drive our robot.
[x] Flashing anything to our motor controller(s) Before we can use our motor controllers for anything, we have to actually be able to flash programs to them. This probably requires using these roboteq ROS packages to communicate with them. Completion Criteria: we can flash a program to the motor controllers.
[ ] Writing a useful program for motor controller(s) Now that we can flash our motor controllers, we need to write a program that can usefully control them. This will probably just require adapting the old code from the Bowser repo, and adjusting it for driving a single motor. Completion Criteria: the motor controllers should be ready to accept data in a format we specify, and turn that data into motor commands.
[ ] ROS script to talk to motor controllers With our motor controllers programmed, now we just need to tell them what to do. A ROS script will open a serial connection to the motor controller(s) (pyserial). Then, it will listen for ROS messages on a specific topic and convert them to commands for the motor controller in whatever format we specified. Completion Criteria: ROS script should receive ROS messages, and convert them into the correct format for motor controller.
[ ] Actually controlling motors All the pieces are in place, now we just need to make sure we can actually control the motors using the stuff from above. Testing this will require that the motor controller be hooked up to a battery and the motor(s). Talk to Dwight first. Make sure the motors aren't actually touching the ground when you do this. Completion Criteria: motors actually move in the expected direction at expected speed. Test through the whole range of speeds, if possible.