Andy Roid
USA
Asked
— Edited
Is there any way to look at how the script for camera tracking was written by Dj? I can read the variables, but I want to see the line by line script.
My goal is to write a tracking script to an X,Y coordinate. Someone wanted to do a similar thing using a GPS module about a year ago.
I see there is a camera coordinate X and Y in the variable list. I wanted to see how it was used in his script.
I can read where the robot is now ( X and Y value), and know where I want it to go (X and Y value). I need to borrow or write how to travel from and to.
Ron R
Hmmm, don't mean to be negative here but camera tracking isn't written in ARC script language.... it's written in C# (behind the scenes) as far as I know. Unless you understand C# I doubt it would be of any use to you...and GPS is only accurate within 10ft so that won't help you either indoors... Why don't you wait for David's Lidar/mapping pluggin?... It will give you (and everyone else) "SLAM" style indoor navigation... I mean that's what I am doing....
Hi Richard, Happy New Year.
Thanks for the information on the camera tracking. I thought I might be able to look at the script, but understand it is "behind the scenes". I believe the GPS concept was something someone was going to use outside. I wasn't thinking of GPS, just tracking to two coordinates.
I know you are also looking for indoor navigation, and I am sure David's idea will be "top drawer" once he completes it. I know it will meet our needs.
My desire at this time is a simple system, which will be better than the on board camera tracking or, auto positioning or mapping playback. I have an idea which requires scripting. Even with my limited ability I want to try this "Tracking", which isn't truly navigation. I had hoped there was something I could look at.
I will continue to play with this and post results and questions on the "Reading and Using servo Values In Tracking" thread.
I always respect your opinions and never take them in a negative way. I just, like you, enjoy the hobby of Robotics and want to try things and learn.
Ron R
I don't think providing the tracking algorithms would be very helpful as it's just a pile of math and equations.
What would you like to know? Maybe I can provide an answer for direction.
Hi Dj,
My end goal is to track to two preset coordinates, loaded from a verbal command ("go to the door").
The following is my idea: I read the loaded variables, then compare these coordinates to coordinates of two tracking cameras, looking at a target on my robot. These cameras are located 90 degrees apart in the area (two out side walls). Using Omni wheels mounted on two continuous servos, I plan on moving in the direction to match these coordinates. As the number get closer, I slow the continuous servos until the numbers match, then stop.
I started to write a concept script on paper using only one camera/servo and one continuous servo. I know your camera tracking lists an x and y coordinate and wanted to see how you wrote the script to track to them. This way I could see if I was on the right track. My idea is to do compares, then adjust the position of the robot until it matches.
I am a very new writer of scripts. The only exposure to programming was ladder logic and machine code many many years ago....LOL.. I will continue to play and post the script once it is written.
Any help or direction is appreciated. I really want to try this idea. I have future ideas to incorporate into it once it works.
Ron R
You cannot use a continuous rotation servo for tracking because it is unable to respond to position commands. It doesn't have a sense of positioning, it only knows to move a direction.
No, I am using the continuous servos to move only the robot. The camera is mounted on a regular servo, which is on a stationary location by an outside wall.. It is used to track the robot. For the initial test, I will have a long cable from the EZB in the Adventure Bot to the servo under the camera by a perimeter wall. As the Bot moves, the value sent to the camera servo to follow the target on the robot's back is my feedback. I will be using an Adventure Bot as the Target and a web cam connected to my computer as the feed back. I will load a coordinate and hopefully track to it.
I may have to make a video of the concept to eliminate some of the hardware confusion.
Ron R
Apologies Andy, i feel the question regarding how the vision tracking system identifies object positioning within ARC may be highly above your current programming capabilities based on this thread.
I do encourage learning - which is why we spent years developing and growing the LEARN section of this website. There is an activities course which will be very important to the education process. I recommend successfully completing the activities. Once you have accomplished the activities and have a grasp of logic programming, use the EXAMPLES folder in ARC to view EZ-Script examples.
This is because the question that you are asking about how object positioning is identified is quite complicated. There are many "steps" with complicated programming that identifies and detects objects. However, the answer to your specific question about how the detected object's position has been identified uses the aforge blobcounter library - which is as good or better than i could have written - which is why building off existing frameworks is important. Much like how you create robot projects in ARC...
This is because without ARC, you would need to understand this. And remember, this is only one module of 30 or so that relates to vision tracking in ARC. If this doesn't make sense to you, stick with ARC. This code example is responsible for identifying the detected object position and assigning to ARC variables:
Thanks Dj,
I had assumed the "camera tracking" used a "script" developed thru ARC, and additional code running in the background. I just looked at the surface results and never put thought into what was really going on.
Thanks for posting the information, but as you can tell, my background does not give me the ability to use it.
I have re-posted my thread on tracking using servo position information, and will continue to go forward with that scripting.
Thanks again,
Ron R