RoboJDE & Java Project: Smoothing Robot Motion

Click For Summary
SUMMARY

The discussion centers on optimizing robot motion using RoboJDE and Java for color tracking. The current implementation employs while loops to control movement based on the centroid's position and the size of the color swatch detected by the camera. However, participants highlight that the existing control algorithm is too sensitive to measurement noise, resulting in jerky movements. Recommendations include implementing a control mechanism that accounts for velocity and noise, such as a phase plane controller with deadbands, to achieve smoother motion.

PREREQUISITES
  • Understanding of RoboJDE for robot programming
  • Proficiency in Java programming language
  • Knowledge of centroid detection algorithms
  • Familiarity with control systems and motion algorithms
NEXT STEPS
  • Research phase plane control techniques for smoother robot motion
  • Explore deadband control mechanisms to reduce sensitivity to noise
  • Learn about simultaneous control of multiple axes in robotic systems
  • Investigate advanced centroid tracking algorithms for improved accuracy
USEFUL FOR

Robotics developers, software engineers working with motion control, and anyone involved in optimizing robotic tracking systems.

glid02
Messages
54
Reaction score
0
Hey, I'm working on a project with RoboJDE and java and I have a few quick questions.

What I'm supposed to do is write code so that the camera will find the coordinates of a swatch of color and move accordingly as the swatch changes positions. The robot is supposed to move from side to side and forward and backward as smoothly as possible.

I've already been provided with the code necessary to move the robot and find the centroid. Basically when the centroid moves to the left or right the robot moves accordingly and when the swatch occupies more pixels on the camera the robot moves backward and when the swatch occupies less pixels the robot moves forward.

Now I'm just trying to figure out the best way to code the commands so the robot moves as smooth as possible.

The best idea I've come up with so far is a series of while loops.

I'd save the original position of the centroid of the swatch and do:
while (new position > old position)
move to the right

and

while(current no. of pixels > original no. of pixels )
move backwards

Is this sound? Any ideas are more than welcome.

Thanks.
 
Technology news on Phys.org
This is not a very good controller.
  • It is too sensitive to measurement noise. Your measurement of the centroid and size of the patch is inherently noisy. No besmirching of how you are accomplishing this as all measurements are inherently noisy.
  • It is not 'smooth'. Your control algorithm needs to account for velocity in some way to make it smooth.
  • It is rather jerky. Suppose the target is moving forward and to the left simultaneously. Your robot will follow the patch by making a series of ninety degree turns.

Some suggestions:
  • Control forward/backward and left/right motion simultaneously.
  • Use a control mechanism that accounts for velocity and noise such as a phase plane controller with deadbands.
 

Similar threads

Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
8
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K