Some questions on how people are using servos with ROS and Arduino
I'm just getting started with ROS and ultimately want to do some experimentation with CV and physical object manipulation, but I have miles to go before I'm at that point.
I have been working with MyRobotLab but Oracle Java on my 64bit Linux machine is unstable, even after completely nuking all things Java and doing a clean reinstall. When things work it works reasonably well, but too many hiccups to be efficient.
Also issues on a different machine running Win10 and Java there. So I decided to move to ROS which has a steeper learning curve, but appears to be much more stable.
For starters I have a "head" with two cameras for eyes, servos driving the eyes in X and Y and servos driving the head in X and Y.
I have an Arduino in the head that interfaces to the servos to control them. Currently no position feedback from the servos.
In MyRobotLab the Arduino code allows specifying Acceleration and Velocity values for the servos by using the writeMicroseconds() method to drive the servo motion. I have implemented this and have it interfacing with ROS and I'm able to move the servos and set Velocity and Acceleration just fine.
The other part of the MRL implementation is also to be able to specify Min and Max values for the Servo to prevent driving it past points of physical constraint in the head. For example with the eyes the Y axis movement is quite small so the servo range of motion should be limited.
MRL does this with an actually SetMinMax() method and also with a mapping function that allows more control over the relationship of the input and output Min/Max for the servo(s).
So I wondered what people are doing with ROS to accomplish similar things when using Arduino to control your servos?
Is there some code that exists that manages the MinMax() limits for servos. Or will I need to write my own code.
Right now I'm working towards a small application to drive the head and eye motion in a pre-programmed mode as my next set of tests.
Once I get that working (I already have Python code for doing this with MyRobotLab) then it's on to looking at interfacing with OpenCV to do some initial simple object tracking as I have been able to do with MRL (on the days when Java cooperates:)
If I have missed some suitable code/tutorial/examples could someone point me in the right direction?
And I would be interested to hear if others are doing anything similar with your Arduino based servo control?
Burt