Tune servos of Camera Robot

If you need technical help with anything you've bought from Dawn Robotics, please post here.

Tune servos of Camera Robot

Postby japonophile » Fri May 08, 2015 3:32 pm

Hi,

I successfully built the Camera Robot, and got it (kind of) working.
However, I observe some issues:

1) As soon as the robot is turned on, the pan servo suddenly turns completely to the left and makes a strange noise (as if trying to go even further left although it is already at the limit)
When I then take control of the robot, I manage to move the camera to the right, but not quite centered.
And if for some reason the WIFI drops, the pan servo will again push hard to the left.

2) The left motor seems to turn quite slowly, so when I press the "go straight" button on the motor control page, it makes a kind of circular trajectory (to the left, because the left motor does not turn as fast as the right one). I tried changing the scale on the motor control page, but did not get any result, and I don't quite understand what this scale is supposed to do.

Any help greatly appreciated.

Thanks,
Antoine
japonophile
 
Posts: 11
Joined: Fri May 08, 2015 3:18 pm

Re: Tune servos of Camera Robot

Postby Alan » Mon May 11, 2015 3:43 pm

Hi Antoine,

Welcome to the forums. :)

For the servo motor, can you please check that it's assembled so that the centre position is looking forward, and that when the robot is off you can turn it 90 degrees to the left, and to the right? If not then it may help to unscrew it and put it back on.

If this doesn't help then there may be a problem with that servo. I've seen the odd servo that fails and start pushing hard in one direction, but not one that atcually seems to work a bit at the same time. Could you please try connecting the tilt servo to the pan servo connection and seeing if that exhibits similar odd behaviour? If it doesn't then we can probably conclude that the pan servo is dodgy and I can send you a replacement.

With regards to the left motor. It's usual for the motors to run at different speeds due to manufacturing differences although hopefully it shouldn't be that extreme. Running the motors at speed forwards for 30 seconds or so, then backwards for 30 seconds and repeating a couple of times can help to even out the distribution of lubrication in the plastic gearbox and amy help to speed up the slow motor. To balance out the motor speed further the motor scale slider should help, but the interface is not as user friendly as it could be.. Basically you need to press the 'Save' button in the bottom left corner before the change takes effect. Putting the slider down to zero should confirm if it's working or not.

Hope that helps.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: Tune servos of Camera Robot

Postby japonophile » Sun May 31, 2015 7:19 am

Hi Alan,

I really appreciate your support.

Regarding the pan/tilt servos, it turns out I just did not orient the pan servo wheel to the center before mounting the upper part, so the "straight" direction of the pan servo was in fact pointing to the left. I unscrewed it and corrected it, and I could get it working.

For the left/right motors, I now understood that you cannot expect such motors to turn exactly at the speed you set, and so you need odometry and a PID controller to make the robot drive straight.

So my first project ended up to be using the camera and analyse frames with opencv to determine how much the robot is deviating to the left or to the right.
Here is what I built: http://chopp.in/clj/2015/05/29/raspberr ... ch-on-ros/

I also found an odometry kit (simple optic wheel encoder) which I bought and plan to put on the robot.
I'd be great for DawnRobotics to sell such a wheel encoder kit as an option to the robot.

Btw, I read your post explaining the structure of the code, and it really helped me understand how it works.
I am now planning to add sensors to the robot.

Thanks,
Antoine
japonophile
 
Posts: 11
Joined: Fri May 08, 2015 3:18 pm

Re: Tune servos of Camera Robot

Postby Alan » Tue Jun 02, 2015 2:49 pm

Hi Antoine,

This is very cool. We do have an encoder planned for the robot (hence the extended shafts on the motors), but progress is slow at the moment. Very interested to see how your experiments with visual odometry progress. :)

Also, it's very interesting to see someone making use of ROS with one of our robots. I've used it a lot on my PhD and found it to be a very useful framework. As with the encoders, there is a plan to produce a ROS node for the robot. I was assuming that running ROS on the Pi would probably be a bit too much for it and so was planning to write a ROS node that ran on a controlling PC and talked to the robot using the py_websockets_bot library. Controlling the mini driver with a node running on the robot may give you better control though.

All the best.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: Tune servos of Camera Robot

Postby japonophile » Fri Jun 05, 2015 4:06 pm

Hi Alan,

Great to hear you had experience with ROS!

As mentioned on my blog, I actually succeeded running ROS on the Pi (although not rviz of course), just roscore. And it connects to the master on my PC, where all the high-level stuff happens.

I am currently looking into creating a robotHW implementation of the ROS interface to plug a ros_controller. It looks like it should not be too hard. (Any advice / idea appreciated)

Thanks,
Antoine
japonophile
 
Posts: 11
Joined: Fri May 08, 2015 3:18 pm

Re: Tune servos of Camera Robot

Postby Alan » Fri Jun 05, 2015 4:36 pm

Hi Antoine,

That sounds cool. I haven't really looked at the ros_control and hardware_interface packages so it'll be interesting to see how you get on.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 0 guests