ROS RoboClaw Support

General discussion of using Roboclaw motor controllers
henryacev
Posts: 10
Joined: Tue Sep 13, 2016 9:23 am

ROS RoboClaw Support

Post by henryacev » Sat Mar 25, 2017 3:19 pm

Dear ION Motion Control

We would like to know if you will provide a real support for ROS in C++ and Python, as ROS is becoming more an more relevant across the market.

we have used the python ROS driver but is incomplete, have issues and don't work properly, C++ is not even developed.




Thanks

User avatar
Basicmicro Support
Posts: 1404
Joined: Thu Feb 26, 2015 9:45 pm

Re: ROS RoboClaw Support

Post by Basicmicro Support » Mon Mar 27, 2017 10:45 am

The ROS driver we link to is developed by a third party. Since the person who developed it is doing it mainly for his own use we are planning on forking it and updating it with the latest Roboclaw interface. However I cant give a timeline on this. Also we have not had any plans on changing from python to C++ when we do fork the driver. If you have a specific reason why C++ is better than python for this appliaction please let me know why.

henryacev
Posts: 10
Joined: Tue Sep 13, 2016 9:23 am

Re: ROS RoboClaw Support

Post by henryacev » Tue Mar 28, 2017 1:47 am

Hi

the fact that this driver has been developed by a third party, this will not provide support or a minimum troubleshooting, as is the case with the current version that odometry does not provides any input.

despite ROS does can be developed with Python and C++, C++ is faster as this is a complied rather than interpreted at runtime, hence C++ is faster in orders of magnitude.

I'm not sure if you are familiar with ROS community, but there are few DC motor controllers that support ROS, generally are very expensive and not all are designed to be as efficient and cost attractive.

your motor controllers are great and with a good price/performance, so if ROS support is added and you publish this support on the ROS wiki page, more robot companies will look at your company for DC motor drivers.

is a win/win situation

User avatar
Basicmicro Support
Posts: 1404
Joined: Thu Feb 26, 2015 9:45 pm

Re: ROS RoboClaw Support

Post by Basicmicro Support » Wed Mar 29, 2017 7:47 pm

I just spent the last two days trying to setup ROS on available systems(a BananaPi and RaspberryPi 2 we had). I may finally have one of them working.

I've also spent time reading through the ROS wiki and figuring out how it all works. Based on what I've read whether you use python code or C++ code, in regards to working with the Roboclaw, doesnt really matter. The bottleneck is the communications rate to/from the Roboclaw. So unless you are using a much lower powered processor than I think you can actually use with ROS(eg R-Pi seems to be the bare minimum) I dont see any particular advantage of C++ over Python. That is only the case in regards to communicating to the Roboclaw of course. Other parts of ROS where heavy computing may be required I can see the advantages of C++.

From the readme.md included with the ROS driver:

## Topics
###Subscribed
/cmd_vel [(geometry_msgs/Twist)](http://docs.ros.org/api/geometry_msgs/h ... Twist.html)
Velocity commands for the mobile base.
###Published
/odom [(nav_msgs/Odometry)](http://docs.ros.org/api/nav_msgs/html/msg/Odometry.html)
Odometry output from the mobile base.

As you can see it has both a cmd_vel subscriber and a odom publisher. I've looked through the code and I dont see any reason the odom code would not be functioning. I will be doube checking it when I update the roboclaw.py library code though. Assuming I can get this RPi2 running ROS properly that should be sometime tomorrow.

henryacev
Posts: 10
Joined: Tue Sep 13, 2016 9:23 am

Re: ROS RoboClaw Support

Post by henryacev » Fri Apr 07, 2017 6:17 am

Hi

I wonder if there is any update on this topic


Thanks

User avatar
Basicmicro Support
Posts: 1404
Joined: Thu Feb 26, 2015 9:45 pm

Re: ROS RoboClaw Support

Post by Basicmicro Support » Fri Apr 07, 2017 9:40 am

I have some more testing to do on the updated driver. I expect to have something you can download later next week. Eventually I want to get the github updated with the changes.

power_tech
Posts: 2
Joined: Sat May 13, 2017 4:10 am

Re: ROS RoboClaw Support

Post by power_tech » Sat May 13, 2017 4:22 am

acidtech wrote:I have some more testing to do on the updated driver. I expect to have something you can download later next week. Eventually I want to get the github updated with the changes.
I bought recently roboclaw 2x7a and i'm planning to use with ros and raspberry pi 3. The current ros driver for roboclaw is intermittently crashes. When this is happens the motors keep running and it is a big problem. I hope your updated version is stable and i'm really looking forward to download and test your updated drivers.

The ION Motor Control products is very good and i think it will be better with a stable & reliable ros driver.

User avatar
Basicmicro Support
Posts: 1404
Joined: Thu Feb 26, 2015 9:45 pm

Re: ROS RoboClaw Support

Post by Basicmicro Support » Mon May 22, 2017 9:18 am

Email support@ionmc.com to get the updated ROS driver. We havent released it yet but it is working. We are planning on adding some examples but the schedule is full for the next couple months.

If you are using a USB connection to control the Roboclaw you should use a USB cable with a ferite choke on the cable. Standard(eg cheap) USB cables almost never have these(a larger barrel near the B side connector). The feriite choke prevent noise from the motors from glitching the USB signal and causing USB disconnection problems. This is less of a problem on Linux systems(have not see the problem on Linux myself and suspect it has better error handling then Windows for USB connections) but its a possibility for crashes.

The ROS driver used a modified version of the Python driver. When we updeated it recently there was almost no change to the pythong code so if there is a crashing problem still we will need more information on exactly what you were doing when it crashed and what the crash was like(eg was it a crash or a freeze up, was there a dump from ROS describing the crash etc...).

power_tech
Posts: 2
Joined: Sat May 13, 2017 4:10 am

Re: ROS RoboClaw Support

Post by power_tech » Tue May 23, 2017 5:13 am

Thank you for your reply. I emailed and requested the new driver.

The dying node problem is occurring when I'm using the joystick and mapping the joy.axes messages to cmd_vel linear.x messages in ROS. I found a workaround to this problem for now. I realized that /joy topic publishes axes messages without rounding. It's like 0.8974535683895639856398 Then I rounded /joy axes messages to 2 digits, like 0.89, the problem disappeared. I hope this will be helpful. I can give more information about the problems I have encountered if you want. But first, i want to try updated driver and see if I will have problems.

mairasaboia
Posts: 2
Joined: Wed May 24, 2017 10:04 am

Re: ROS RoboClaw Support

Post by mairasaboia » Wed May 24, 2017 10:13 am

I have a Roboclaw Driver 2*15A. We have been using the old ROS code for a while now but now after we updated the firmware, it no longer works properly.

Can you please send the updated ROS driver code? my email is mairasaboia@gmail.com

Also, can you please let us know what is the frequency of command velocities it can receive? (after some testing, we found out that 2 hz was the best in our system)

Post Reply