Asked — Edited
Resolved Resolved by thetechguru!

Polar Coordinate Steering

Thanks to everyone for helping me get up and going! I've learned how to connect hardware, download projects and learning ez scripting. I have never been one to reinvent the wheel so here goes....

I am looking to build a robot that will steer using polar coordinates. Is there an easy way to do this?

Castle


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

#17  

I have been working on something like this. So far I have the arm so it will scan the area around it and when it see's a red object, it stops, picks up the object and hands it to me. I have not played with "object" recognition yet but that's next. I also want to play with QR codes on objects. With QR codes it should be possible for the robot to identify an object and do something specific with it (maybe). Anyway, here's the code I/we have come up with so far. If anyone has any comments on how to improve it, I am all ears.


ControlCommand("Script Manager", ScriptStart, "Scan table")

servo(D0,55)
servospeed(D0,3)
sleep(2000)

:Step 2
ControlCommand("Camera", CameraServoTrackEnable)
ControlCommand("Camera", CameraColorTracking, "red")
#step 3
sleep(500)

If($Cameraistracking = 1)
sleep(300)
Goto(step 5)
else 
ControlCommand("Camera", CameraServoTrackDisable)
sleep(500)
ServoDown(d4,10)
servospeed(d4,3)
sleep(500)
Goto(step 2)
endif

:step 5
ControlCommand("Script Manager", ScriptStop, "Scan table")

sleep(500)
ControlCommand("Camera", CameraServoTrackEnable)
ControlCommand("Camera", CameraColorTracking, "red")

Waitfor($cameraverticalquadrant = "middle" and $camerahorizontalquadrant = "middle",1000)
Sayezb("I see a red object")
ControlCommand("Script Manager", ScriptStop, "Scan table")
sleep(1000)

ControlCommand("Auto Position 2", AutoPositionFrame, "object pick up 1", 25,7,7)

#ControlCommand("Auto Position 2", AutoPositionFrame, "Object pickup", 50,10,10)
#ControlCommand("Camera", CameraServoTrackDisable)

ControlCommand("Camera", CameraColorTracking, "red")
Waitfor($cameraverticalquadrant = "middle" and $camerahorizontalquadrant = "middle",1000)
sleep(1500)
ControlCommand("Auto Position 2", AutoPositionFrame, "Object pickup", 50,10,10)

sleep(5000)
Servo(d0,105)
sleep(2000)

ControlCommand("Auto Position", AutoPositionFrame, "Hand to me", 25,3,3,)
ControlCommand("Camera", CameraColorTrackingdisable, "red")

sleep(4000)
servo(d0,50)
sleep(3000)
Sayezb("i am amazing")
ControlCommand("Auto Position", AutoPositionFrame, "Rest", 25,3,4,)
#18  

QR codes are an interesting idea / but the tool has to be lying QR up - with RFID that would not be an issue / the trick would be to scan the floor in a pattern until an RFID is detected, query the DB for any pick up information an darling space and the pick up and park and then return to continue the search...

#19  

I was hoping for some more feedback but I guess I will close this thread / study someone and them ask again...