g / roboteq

ROS driver for serial-connected Roboteq motor drivers
30 stars 57 forks source link

How to connect the SDC2130 Roboteq driver #7

Closed herohernan closed 9 years ago

herohernan commented 9 years ago

I'm trying to use the SDC2130 Roboteq driver. It has a correct connection with the port ttyACM0 and revived feedback from topic “roboteq_driver/feedback”, but I don't know how to specify, in the XML file “example.launch”, that exit 2 channels to motor: left and right

Thanks

nabilgabbouj commented 9 years ago

To your launch file or the example launch file provided with the driver add the following line into rosparam: channels: ['left', 'right']

mikepurvis commented 9 years ago

I don't have immediate access to any dual-channel units, but the driver was written to support that use case. If you'd like to PR in a change to example.launch which makes this more obvious, I'd be happy to merge it— maybe an arg like so:

roslaunch roboteq_driver example.launch dual:=true
nabilgabbouj commented 9 years ago

I tried It today with an mdc2460 with two DC motors and it worked fine. I'll PR the change in the launch file

mikepurvis commented 9 years ago

Cool, glad to hear this is finding an audience outside the Grizzly. Once #1 and #2 are resolved, we should think about moving the repo over to ros-drivers.

nabilgabbouj commented 9 years ago

Yes it has to be moved to ros-drivers since there are no other (known) alternatives. However the mbs script used in the repos should be generic in order to accept different parameters and units.

mikepurvis commented 9 years ago

Unfortunately, the MBS has a manual compile step, dependent on the RoboRun+ utility (which is Windows-only). In order to template the script and compile it at runtime, I'd need to have a compiler as part of the driver. It's doubtful that Roboteq would ever open-source their MBS compiler, but it's clearly a simple enough implementation that a motivated person could reverse-engineer it to the point that a new implementation could be functional for the needs here.

Another way to do it would be to compile the script with known sentinal values in key positions, so that those values could be modified by a more naive find and replace. That approach is definitely much more of a hack.

nabilgabbouj commented 9 years ago

It is a simple implementation as you said it only takes time to tinker with the values of the closed loop control. All these parameters are hardware dependant. However the configuration of the channel two is missing from the script available. So the simplest solution is to add the missing configuration for two channel units and leave it to the user to modify the values in accordance with the hardware available.

mikepurvis commented 9 years ago

Closing due to inactivity.

nabilgabbouj commented 9 years ago

Sorry Mike. Actually I did something similair. I will share the sample code here.

On Fri, Nov 6, 2015, 7:57 PM Mike Purvis notifications@github.com wrote:

Closed #7 https://github.com/g/roboteq/issues/7.

— Reply to this email directly or view it on GitHub https://github.com/g/roboteq/issues/7#event-457253061.

Nabil SKHIRI GABBOUJ Mob: +216 23 915 070 Tel: +216 73 505 993 Av. Ibn Al Jazzar Skaness 5000 Monastir Tunisie