Motor controller support for dual channels (Roboteq SDC2130)
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. (?)
Currently I'm planning to output something like:
rostopic pub -1 (roboteq_cmd_topic) (topic_type) -- (output for Motor 1) (output for Motor 2)
To do this, I'll have to change <topic type=""> 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.
Thanks for the response maya, thats exactly what I'm planning to do. I'm using this reference http://answers.ros.org/question/9197/for-new-package-downloading/ to git clone to my ~/catkin_ws/src/. Ofcourse I'll have to edit it for hydro. Good to know I'm heading the right way :)
Isn't your package already made to work with catkin ? If yes, you just need to git clone it in your workspace and it should work.
I sure did! I tried to debug it in my eclipse IDE but I couldnt run the node. I get the error Invalid node name [~]. I have managed to access both channels thanks to ahendrix though! :)