I'm using the Roboteq SDC2130 Motor Controller and using the ros-hydro-roboteq-driver package and supporting packages (i.e. msgs and diagnostics) to control my motor controller. The package only supports one channel and I'm trying to have ROS support two channels (SDC2130 is a dual channel controller). Before I create a new catkin package of ros-hydro-roboteq-driver and edit the package (I don't want to edit this in /opt/ros/hydro), I was wondering if I'm missing an obvious way to access both channels. (?)
To do this, I'll have to change from float32 to float32[] (MultiArray), but it seems like I'll have to edit the driver code too. I'd hate to have missed an obvious solution to this, if someone is aware of the solution, please steer me in the right direction. Also if there is a better alternative to the editing the code, I'd really appreciate your advise. I'm new to ROS (2 weeks) and trying to expose myself to it with hardware that I have.
If your catkin workspace space is before /opt/ros/hydro in the ROS_PACKAGE_PATH variable, you can git clone the ros-hydro-roboteq-driver package in your catkin workspace and it will be use instead of the /opt/ros/hydro one ;). Helpful trick if you want to work on its code without changing the /opt.
I had something similar first, but I still could control the controller. Instead of passing channel arguments through rosrun, I edited the roslaunch files but only channel 1 (left motor) would respond to commands and not not channel 2. Turns out, I also had to replace the microbasic hex files from my windows pc Roboteq+ Software as the script configures the motor controller and channel 2 was not configured.
I have a roboteq motor controller and I would like to control it and an arduino Mega which has more than one ttl channels.
I have to mention that my knowledge with serial programing is very low and I'll need your precious help on this.
First of all I am sending a telemetry string from my roboteq through the serial line, it is a string with some different infos like voltage, amps, temperature, encoder counts, etc, this string is terminated with "/r" for the arduino to know that the string is completed.
Now, my first need is to receive the string on the arduino as it is and print it on the terminal window just to see how the string is constructed in order to understand how to parse it later.
If you're also planning to receive data from serial monitor as well, it's advisable to modify the example now.
1)
Rename the function recvWithEndMarker to e.g recFromRoboteq so you know what happens in loop.
2)
Change the names of the involved variables so they reflect what they are used for
e.g. replace receivedChars by roboteqRxBuffer and newData to roboteqNewData
batteriesBattery BoxesC4castercastersclone warsDomedome driveframemakerfairemaker faireNPCpaintperiscopepittmanprimerrf remoterobogamesroboteqrustoleumsan franciscoservoservosskinsskirtslip ringspeed controllerVexvideowondercon
I changed the Input Adjustment to Logarithmic (from Exponential) and decreased the Acceleration Delay to 682 ms. This controls how fast Artoo reaches his maximum speed and time to stop. I found that anything lower made him too jerky as he tries to stop on a dime. Both these parameters will make Artoo a little bit more responsive.
The following schematic outlines the 3 main areas of my setup. The red area is the front charging port, flashing LEDs and the battery select/on/off switch. Yellow is the wiring harness/relays that does all the magic of switch batteries between charing mode or running the droid, and finally the blue on the right is the rear electrical panel containing the speed controllers, fuse block, battery monitor, and power distribution board. It also contains an additional relay/power jack to run the drive from 120VAC/12VDC adapter.
In addition to adding the extra relays to switch two sets of batteries, I replaced the large MAXI fuse block/voltage display with a much smaller ATO fuse block and a separate LED voltage meter display.
I mounted the voltage meter on the rear electrical panel, and instead of using one for each of the batteries I decided to use just one with a switch to flip between batteries. The board requires a separate 5VDC supply to operate and I got this from the power distribution board.
Today I did get together with Gerard to talk droid and strip my Artoo back down ready to implement my revised battery system. I was hoping to get a few more local builders over, but being easter it was hard to arrange at such short notice.
Not a whole lot going on. I did find a very cool surplus electronics store this week in Santa Clara called HSC. They carry a LOT of stuff at a fraction of the cost and the place is full of things that can be used on R2. I was hoping to find a slip ring to experiment with but I was out of luck. I did pick up a few bits though, including some red rectangular LEDs for the front slot on the periscope.
I also worked a bit on my RoboteQ speed controller, adding a RS232 connection to the provided PWM cable to allow me to monitor things live from a tethered laptop. Basically I ran two wires (RxD/GND) from the 25-pin plug they provide to a 9-pin RS232 plug/housing.
Drive system jerkiness is all fixed. The problem was the AX3500 and not a Vex compatibility issue. The board had a dry joint on the main power control tab which was causing a short. The speed controller thought the battery was low which cause the fail safes to kick in and turn everything off to avoid damaging the Mosfetts.
In the process of troubleshooting the problem, they also convinced me to reconfigure my batteries to have a dedicated 12V supply to the board rather than using a single shared 12V supply for everything. They explained that the symptoms I was seeing were very similar to a low battery problem due to the motors drawing too much current.
I received my center foot on Friday and it was the last structural part that I needed to get R2 on all 3 feet. So, my goal for Saturday was to get him running around under his own steam by the end of the day. I still needed to wire in the RoboteQ AX3500 speed controller which controls the drive system.
So you need to install ROS serial in the computer connected to the control board as well as this driver. Then configure the launch file (roboteq_driver/launch/example.launch) accordingly with your board. Then start the driver with:
Roboteq, Inc. has introduced a microcomputer- based dual channel DC motorcontroller capable of directly driving up to 120 Amps on each channel at up to40 V. The AX2850 (Plate 2) is targeted at designers of mobile robotic vehiclesincluding automatic guided vehicles (AGV), underwater remote operated vehicles(ROVs), and mobile robots for exploration, hazardous material handling, andmilitary and surveillance applications.
The controller accepts commands from either standard R/C radio for simpleremote controlled robot applications or serial port interface. Using the serialport, the AX2850 can be used to design fully or semi-autonomous robots byconnecting it to single board computers, wireless modems or wireless LANadapters.
The controller's two channels can be operated independently or combined toset the direction and rotation of a vehicle by coordinating the motion on eachside of the vehicle. The motors may be operated in open or closed loop speedmode. The AX2850 includes inputs for two quadrature encoders up to 250 kHz, andfour limit switches for precise speed and odometer measurement.
The AX2850 features intelligent current sensing and controlling that willautomatically limit each channel's power output to 120 A for the time typicallyrequired to accelerate or stop a robot. If the motor's current draw remainsexcessive after that time (as in the case of stalled motor or other unusualloading), the controller will gradually reduce the power to user-selectedvalues.
The controller supports a long list of features, including analog anddigital I/Os for accessories and sensors, thermal protection, programmableacceleration, input command watchdog and non- volatile storage of configurationparameters.
The AX2850 is built into a robust extruded aluminum case, which also servesas a heat sink for its output power stage. The large fin area ensures sufficientheat dissipation for operation without a fan in most applications.
The AX2850 is available currently at $620 in single quantities, completewith cable and PC-based configuration software. Product information, applicationexamples and software can be downloaded from the company's Web site: www.roboteq.com
c80f0f1006