Asked — Edited

Reading And Using Servo Values In Tracking

Hello,

I have two cameras mounted on servos. They are set it up in tracking color mode (red). I have an 10 foot square area. The cameras are mounted in two locations (5 feet from a corner), 90 degrees from each other, against the outside wall . While tracking, I want to read the values the servos are at, and display the value. I know I can only read the information sent, not the true value.

I want to take these values and compare them to a preset value or coordinates.

My end goal is to track a Movement Panel to these two values.

My scripting skills are minimal to say the least, but can someone point me in a direction to find examples of these concepts?

I search around and know the "servo read" is somewhere, but I can't remember where.

Rich, Dave and Richard R, posted some information about this. Any ideas?

Ron R


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

#9  

Has anyone ever made or have seen a script where you describe a set point and track to it? An example is to have a robot fetch an item on the floor, or get a ball. Another idea is if I have a "green frog" seen in the camera, I want to track to it. (My real goal is to load two variables, an x and y, and go to that point).

I am able to read the servo values discussed above which tells me where I am, and updates every 500 ms.

Ron R

PRO
Synthiam
#10  

You're over thinking how to do it:)

Simply enable and customize servo or movement tracking in the camera config dialogue. The work is already done for you, just turn it on and tweak the values. The learn section has an activity course. Press learn from the top menu of this website. There is a lesson which demonstrates how to make a robot move toward an object.

I'm on my phone at the moment, so unable to give you a direct link this time. But I know you've been there before because I have told you:). Navigate to the activities course through the learn section. You will find the lesson in there.

Also, each control has a ? (Question mark) next to the X (close). If you press it on the camera control, it will bring you to the help page for that control, which included written explanations of the control and tutorials.

#11  

Hi DJ,

Thanks for the reminder. My goal is to load x and y variables, to send the robot to a location. It will use the principles you are pointing me to in the camera tracking tutorial, but I want a voice command (example: go to the door) to load the x,y information. The robot will then go to that set of coordinates. I will mess with the camera tracking script and see which variables run the movement panel, so I can use that script location for the coordinates I want. The two cameras tell me where I am so I can compare to where I want to go. This will be my primitive navigation script.

I'm a slow learner but having fun.

Ron R

#12  

Lets see if I have this right. You have two cameras mounted at an initial position 90 degrees apart. You use the cameras to track the robot. As they track it, and move via servos to keep it in view, you use the amount of movement to determine the robot's position. Is that correct?

#13  

Hello WBS00001,

Yes, that is what I have so far. I haven't loaded this into my Adventure Bot yet because I stole the continuous servos, LOL. Once I build new servos, my next step is to load the program DJ reminded me of, and I will watch the variables it uses to load into the motion panel to make the robot track to a target. I will place a red ball, for now, on the top of the Bot and check to see if the tracking servos will gather the info correctly. Once I have these test done, I will see how to use the two sets of information to track to coordinates I load.

Just trying an idea.

Ron R

#14  

I had discussions with Dave C. and Dave S. about this type of idea in the past. Their thoughts were more complex. They are looking at a much more autonomous robot. My idea is simple, and with an ultra sound avoidance script, which overrides the direct line track if something gets in the way, may work.

My script ability is very, very minimal. I do have a concept in mind and will try to develop the needed software.

Ron R

#15  

The calculations would have to take into account the size of the robot or object from each camera image to be used to estimate the distance that the object is from the camera. From there, using the position that each servo is pointing to get the object centered in the camera view should allow you to get an idea of the location of the robot.

#16  

Hi Dave,

I am only looking at position for now. The area I want to track in is relatively small so the error of distance shouldn't screw it up to much for the test. Later maybe 3 ultra sonic pings and more math will have to be considered, especially when object avoidance is used.

Thanks,

Ron R