|
Post by bonylu on Sept 20, 2016 18:25:14 GMT -7
Hi Max,
I'm rewriting the SDK.py due to some abnormal phenomenon.
But I find the angle sensor value is not solid, always changes a little every time, leads to great change of coordinate estimate. So sensor value cannot be used to calculate the coordinate.
I set front arm to 0 degree and rear arm to 90 degree before power on the step motors, and calculate coordinate based on step number of each motor. The result is much better. But I'm worried about the accumulative error of this method.
Any suggestion to keep the coordinate accurate?
Thanks, Bony
|
|
|
Post by Max on Sept 20, 2016 20:51:15 GMT -7
What is the "phenomenon" you're observing that makes you rewrite the code? Accelerometers never give solid values, especially cheap ones, noise in sensors is a general problem. How much is the "great change of coordinate estimate" you are observing? Where is the "accumulative error"? In my implementation any calculations are made based on current step position of each motor and the destination point. Destination points are calculated by simply splitting the line into segments. It is just a little bit complicated for the acceleration/deceleration segments of the velocity graph where the line segments mentioned before are just shorter. Accelerometers are read only once, when SDK is initialized. After that current pose is only relative to the pose estimated upon initialization as you always know exactly how many steps in which direction every motor has executed (unless, of course, robot bumped into something and motors skipped steps). So everything is as accurate as the initial estimate. That is the reason 3D printers all have homing procedure when they start printing which ensures the best pose estimate. Cheap accelerometers won't give you such precision. You have to consider other options if you are not satisfied with accelerometer estimate. The preferred way is to use photo-interrupters, which are supported by open-dobot from the box. I use one on the base because there are no other sensors there to estimate base position: raw.githubusercontent.com/maxosprojects/open-dobot/master/docs/images/interrupter1.jpgraw.githubusercontent.com/maxosprojects/open-dobot/master/docs/images/interrupter2.jpgraw.githubusercontent.com/maxosprojects/open-dobot/master/docs/images/interrupter3.jpggithub.com/maxosprojects/open-dobot/blob/master/application/python/example-limit-switch.pyKnowing at which motor position the joint hits the interrupter gives the best estimate you could get from dobot.
|
|
|
Post by bonylu on Sept 20, 2016 21:22:30 GMT -7
1. The motion is not expected as MoveWithSpeed() describe, there must be something not compatible to my DIY arm, but I couldn't find it. So I just rewrite the code utilize your kinematics and driver class, and my own class to implement high level control, not only MoveWithSpeed() but also special motion based on gcode or machine vision. Basic control have been implemented, and motion is expected.
2. If I use dobot to draw a cycle, will the cycle startpoint connect together with the endpoint? Maybe there is a gap between them. I'm not sure. I have a ultimaker 3D printer, it seems no accumulative errors. I hope this is my wrong thinking.
3. Limit switch is a good idea for front arm and rear arm, angle sensors are no more needed. Just like 3D printer homing, very convenient.
|
|
|
Post by Max on Sept 20, 2016 21:51:25 GMT -7
1. How can you make a robot of the similar configuration (same number of joints) that wouldn't work with open-dobot? The link lengths may need to be updated and steps/rev (including gear reduction ratio), that's all. That, actually, directly affects kinematics. It's up to you, of course, whether to re-implement it. 2. If kinematics is set up right and motors don't skip steps then my implementation should make the end effector to get to the same point. There is nothing to accumulate. Motor positions in steps map directly to joint angles, which map directly to pose. Whenever you tell it to move to a certain location it knows how many steps to make relatively to the current position in steps. Any reachable pose can be represented as (motor1steps, motor2steps, motor3steps) just as well as in joint angles. 3. Keep in mind that a limit switch is a mechanical device and won't give you as good positioning as photo-interrupters would. A lot, of course, depends on where you mount them.
|
|