Problem with Tracking Service

Hello,

I have a problem with tracking service in MRL. I uploaded the last available pyton script (.txt attached below), but i have errors like this:

Traceback(most recent call last): File string line 16 in ModuleAttributeError: org.myrobotlab.service.Servo object hs no attribute as setPin....

Someone can explain me how to proceed or can provide me with an updated pyton script?

 

Pasqui's picture

Someone can halp me?

Someone can halp me?

Mats's picture

Tracking

Tracking is a bit tricky to start.

I hope this script will help you.

https://github.com/MyRobotLab/pyrobotlab/blob/master/home/Mats/Tracking.py

 

Pasqui's picture

Tracking

Hello Mats,

With your script I've a sintax error at line 35!

However I need a working script for tracking objects like showed in this page:

http://myrobotlab.org/content/second-mrl-tutorial-tracking-service-wirin...

I've tried the script reported in that page several times, even by modifying it, but I always get errors. Why?

Fox exemple, the following code lines not work

xpid.setPID(5.0, 5.0, 0.1)

ypid.setPID(5.0, 5.0, 0.1)

None type object has no attribute setPID...

What are the correct lines of code to define and set the PID control?

I thank you for your time!

Mats's picture

Tracking

Hi

I updated the script to contain how to set the PID values. It has changed since the Tracking example was made. Now the same PID service can calculate PID values for several inputs.

https://github.com/MyRobotLab/pyrobotlab/blob/master/home/Mats/Tracking.py

I also removed the reset loop. I had it there because sometimes the tracking may lock up on an extreme position.