I have compete a KiboRobot Programming challenge. I need to move my robot to the point and shoot the laser to the target (Green Circle). But my problem is when I arrive infront of the point I don't know how to move my robot to float infront of the Point. So I want to know how to detect a Aruco marker and what should I do next.
public class YourService extends KiboRpcService {
@Override
protected void runPlan1(){
api.startMission();
moveTo(11.114, -7.9756, 5.3393, -0.5, -0.5, -0.5, 0.5);
Mat image = api.getMatNavCam();
api.saveMatImage(image, "image.png");
laser(true);
}
public void moveTo(double x, double y, double z, double qx, double qy, double qz, double w) {
Point point = new Point(x, y, z);
Quaternion quaternion = new Quaternion((float)qx, (float)qy, (float)qz, (float)w);
Result result = api.moveTo(point, quaternion, false);
final int loop_MAX = 5;
int loop_count = 0;
while (!result.hasSucceeded() && loop_count <= loop_MAX) {
result = api.moveTo(point, quaternion, true);
loop_count++;
}
}
public void laser(boolean shoot) {
if (shoot) {
api.laserControl(true);
}
}
ํYou can search more details about Kibo-rpc. Please help me. I stuck in this problem for 4 days ( I search on youtube, google and also ChatGPT but still confuse ) This image is from cam on robot This from rulebook of competetion
How to detect Aruco marker. and move my robot to the center of point.