Asked — Edited

Movement Tracking From Within A Script

I would like to use the movement tracking from within a script to do something similar to the glyph tracking tutorial. Is there a way to set the parameters from within the script(e.g. forward/back or left/right). I would like to do one before the other and I don't see any way to enable or disable them from within a script. Are there any variables or functions I am missing? WM


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.

PRO
Synthiam
#1  

I’ll need more information for this question. A script is a list of commands, which is how you program. You can do anything with programming, long as you know what it is you’re wanting to do.

If you can explain what your goals are?

If you’d like full movement of left and right as well as forward and reverse, I would use the built in camera control movement tracking. Discover more information on that using the camera device manual: https://synthiam.com/Tutorials/Help.aspx?id=80

There’s also related tutorials on that manual page.

#2  

This is part of the same project. I have a script (independent, not the script inside the camera object) which locates an object by moving the head and rotates JD until the head is centered. At this point, now that the object has been acquired, I want to turn on movement tracking to walk towards the object( as in the glyph tutorial), but I want to be able to control forward/back and left/right independently. I don't see and controls for turning them in and off, and once the script is running, I don't want to stop it to change the options. Once JD reaches the target, I will move to the next phase of the project which I haven't decided on yet.

PRO
Synthiam
#3  

I would first start with the camera’s Tracking Start script that executes the ControlCommand() to enable movement tracking type in the camera control once an tracked object is detected.

Movement tracking controls a movement panel

Servo tracking controls servos

I would look at this activity for having a robot follow color: https://synthiam.com/Tutorials/Lesson/59?courseId=2

These two options can be found in the camera device configuration menu. Blue question marks explain more beside each option.

Information on both of these tracking types can be read about in the camera device manual and related tutorials. Combine the tutorials to produce your desired result.

The camera device manual has the information and related tutorials. You can find the camera device manual and related tutorials here: https://synthiam.com/Tutorials/Help.aspx?id=80

Lastly, if you wish to create a script, the glyph distance episode activity from the robot program is a good place to start. It contains a tutorial on how to maintain distance of a defected object. You can perform a similar function by modifying and writing a script. Here’s a link to the robot program glyph episode: https://synthiam.com/Tutorials/Lesson/111

Have fun!

PRO
Synthiam
#4  

*note: these seems to be a duplicate of another thread you started. Do not create duplicate threads on the same subject. Here is link to duplicate thread: https://synthiam.com/Community/Questions/11177

Organization of threads is like organization of conversation. Please maintain the same use of a previous thread instead of making duplicates. This is covered in the introductory welcome email to ezrobot’s community forum. Thanks and have fun!

#5  

I figured out a way to do this without playing with the check boxes, but the comments below still apply. Consider this matter closed

I thought this was a new issue. Hence the new thread. Either I am not clear what I am asking or you do not understand. I will give an example. When I use this in my script: ControlCommand("Camera", CameraMultiColor_SetColorEnable, redball, true) you can see in the multicolor box a checkmark appears by the red ball color. I want to be able to do the same thing with the movement tracking ControlCommand, but there does not appear to be a command like SetForwardBackEnable, true. I am asking if this exists. I have looked in the manuals and do not see it there or in the cheat sheet. If it doesn't exist I suggest in the next revision any box that can be checked or set have a corresponding ControlCommand .

PRO
Synthiam
#6  

My grandfather used to tell me the answer can only be as good as the question :). Your last post provides information to answer the question with more detail.

You can learn more about what the ControlCommand() means by clicking in the blue. There is also a complimentary feature named Cheat Sheet, which is a list of all commands supported by a control. Here is a screenshot of the ControlCommand() for enabling or disabling movement. The feature is named movement, as in the checkbox of the configuration screen. You can look at the configuration screen of a camera control by pressing the gear icon. The options, such as checkbox or dropdown will have titles beside them. Those titles are found in the ControlCommand() to be controlled.

Here you go, have fun!

User-inserted image