This repository contains the implementation of a visual servoing algorithm for a 2-DOF robot.
-
Spawn Object:
- Spawn the object created in the previous homework on the ground within the robot's workspace.
-
Move Robot:
- Move the robot via the position controller to ensure the entire object is visible in the image.
-
Image Capture:
- Capture an image and obtain the coordinates of the 4 circle centers.
-
Output:
- Present the captured image from the virtual camera.
- Display the detected circle centers.
-
Relocate Robot:
- Move the robot to a different location using the position controller.
-
Ensure Visibility:
- Ensure the entire object is still visible by the virtual camera.
-
New Image Capture:
- Capture a new image and obtain the coordinates of the 4 circle centers.
-
Output:
- Present the new captured image from the virtual camera.
- Display the detected circle centers in the new location.
-
Algorithm Implementation:
- Implement a visual servoing algorithm using the four point features (centers of the circles).
-
Controller Switch:
- Switch the controller to velocity mode to execute the velocity command.
-
Image Jacobian:
- In the image Jacobian, use f and Z, both set to 1.
-
Note:
- All parameters are multiplied with a gain (lambda) in this 2D example and do not have a direct effect.
-
Output:
-
Record the locations (x, y coordinates) of all features over time during visual servoing.
-
Plot the trajectories of the features in the XY plane.
trial1.webm
-
Note: Adjust parameters, gains, and other specifics based on your implementation details.