OpenMV tracking.py problems

Hello, I’m using the latest tracking.py and it seems to be confirming the problem I was having with the first version.
I’ve connected everything up - OpenMV RX3 to Uarm TX2, OpenMV TX3 to Uarm RX2, I’ve copied it over as main.py, but the OpenMV green light turns on and it never turns off, so it must be failing to even communicate with the Uarm (Swift Pro) over UART.
When I add a facial recognition block in Uarm Creator Studio I get a blank white screen.

Also, if OpenMV VIN is connected to Uarm 5V, would it be dangerous to connect OpenMV via USB while it’s already being powered by the Uarm 5V? I haven’t tried yet.

Do I need to flash Marlin firmware from here?

I’m using 3.1.9 flashed from Uarm Creator Studio…

Hi there, there is no need to flash the firmware, since the demo is finished, while we are working on the step by step guide for you. Next Monday, you will get 1.0.10 guide which will show you how make it work. Thanks!

1 Like

Just got the new guide, I was already doing everything right. Nothing has changed.
I get no video feedback in OpenMV IDE running tracking.py, but I do when running helloworld_1.
I keep getting ‘None’ in the serial terminal from the initialization loop: while(flag != b'ok\n'): flag = uart.readline() utime.sleep_ms(100) print(flag)

[code]Traceback (most recent call last):
File “”, line 19, in
Exception: IDE interrupt
MicroPython v1.8-4391-g3696110a on 2017-06-04; OPENMV3 with STM32F765
Type “help()” for more information.

None
None
None
None[/code]

My soldering is fine, everything is definitely connected properly. I’ve checked it a thousand times. I’m not sure why it’s not getting a UART response.

Since the default uart of arm is used to do the USB connection, so if we want to do the communication with openmv, we have to switch the uart in uarm. But he openmv have no idea when thearm is ready, so that’s the reason why we need to handshake first. So in this demo, openmv will get the response first then start the tracking. For you ,it you just want to run the openmv, you could remove the code of response to get the image immediately. THANKS

Hello everyone,

I’m having similar issue with my swift pro and openMV M7.
(both got the latest FW version, pro on 3.1.9 and openmv on 2.4.1)

After comment out the flag checking block in tracking.py as suggested, video feedback is ok now but the uArm won’t move (track or reset).
I can see the little white cross in video moves as I move the item under camera, so I suspect code finds the item ok, but has issue talking to uArm.

The python output is like this:

size:150 threshold:10 normalized:1 matched:13 dt:15
size:142 threshold:10 normalized:1 matched:10 dt:30
size:142 threshold:10 normalized:1 matched:5 dt:0
size:146 threshold:10 normalized:1 matched:6 dt:30
size:149 threshold:10 normalized:1 matched:3 dt:30
size:150 threshold:10 normalized:1 matched:6 dt:30
size:147 threshold:10 normalized:1 matched:4 dt:30
size:150 threshold:10 normalized:1 matched:5 dt:30
size:150 threshold:10 normalized:1 matched:5 dt:30
size:150 threshold:10 normalized:1 matched:5 dt:30

Traceback (most recent call last):
  File "<stdin>", line 95, in <module>
Exception: IDE interrupt
MicroPython v1.8-4391-g3696110a on 2017-06-04; OPENMV3 with STM32F765

Type "help()" for more information.
>>> 

Any help would be much appreciated

I am also having the same issue. When I direct connect the camera using the USB and the OpenMV IDE and comment out the response code in Tracking.PY it works fine. However, when I run tracking.py as is and connect to the UArm the light stays green and appears that the Uart is not switching. One curiosity is that in checking the OpenMV documentation they indicate that the M7 (what we were sent) has either another Uart available or has switched the Uart: UART (serial bus). See below from their documentation.

See pyb.UART.

from pyb import UART

uart = UART(3, 9600)
uart.write(‘hello’)
uart.read(5) # read up to 5 bytes

Here’s the UART Pinout:
•UART 3 RX → P5 (PB11)
•UART 3 TX → P4 (PB10)

Only on the OpenMV Cam M7:
•UART 1 RX → P0 (PB15)
•UART 1 TX → P1 (PB14)

I tried to change the code to use Uart 1 rather than Uart 3 and changed the pin connection but the result was the same.

Anyone else have any ideas?

@KWS @Meatlover Did you send the command M2500 to the arm by USB cable after putting everything together? Please follow the step in 1.0.10 instruction step by step. There are few points you should pay attention:

1,Upgrade the firmware to 3.1.9, and download the tracking.py to the openmv without any change; instruction Step 4
(BTW, there might be some firmware issue of the openmv, since it could not store the .py file sometimes, so after you download the code please keep the openmv IDE closed and plug the openmv again to see if the green light could turn on)

2,Finish all the wiring and assembling between robot and camera;

3,Power on the arm and send the command M2500 through USB cable. instruction Step 9
Then the arm will lift up.

Hi,

i am also stuck with the openMV.

Firmware Swift Pro: 3.1.9
OpenMV: Latest 2.4.1

I followed the steps of the new manual and typed in the M2500 command using Arduino IDE. I got an “ok” in the next commandline, thats it. No moving of the arm or anything. The green light stays on.

I have the same problems like KWS or Meatlover. So when i opened OpenMV IDE running the tracking.py over the App the monitor didn´t work. With the example “helloworld1.py” everthing worked fine and the camera was on.
Anyway, i put the tracking.py on the openMV module and wired everything.

When plug in all the cables (power and Usb) and power the Uarm on the green light of the openMV modul goes on and stays on. And no movement at all after sending the M2500 code.

Any more suggestions Tony???

helloworld1.py is designed only for openmv so when you run it, it could show the images.
While tracking.py is designed for both openmv and uarm, since openmv is using another port of the arduino, so we have to do handshake before showing the images.
Showing image or not just caused by the different code of openmv, it’s not a real issue.

Later I will make a video to show more details about the arm.

@Adventurebox_Escape I just test the code, and find out that when running the hellowworld_1.py it also turns on the green led :disappointed_relieved: So this time I modify the code and if you run the tracking.py, it will turn on the blue led different from the green led of helloworld. I will change the pdf file as well. Thanks for your feedback, and now I am sure you didn’t upload the tracking.py to the openmv’s storage successfully. Please check the tips below especially the NO.1

There are few tips:

1,Upgrade the firmware to 3.1.9, and download the tracking.py to the openmv without any change. When the arm works with openmv we cannot connect the camera to the PC since it will be controlled by the IDE;
(BTW, there might be some firmware issue of the openmv, since it could not store the .py file sometimes, so after you download the code please keep the openmv IDE closed and plug the openmv again to see if the green light could turn on)

2,Finish all the wiring and assembling between robot and camera;

3,Power on the arm and send the command M2500 through USB cable. instruction Step 9
Then the arm will lift up.
(BTW, make sure the setting of arduino monitor like below)

Hi Tony,
thanks for the reply. Indeed the code was not on it. This time i unzipped directly to the openMV and named it main.py. Now the blue LED turns on…but still its not working!

STEP 3 is already not working out… the camera will not turn on. In my opinion there is still a glitch in the software/script. And yes i waited several minutes but in OpenMV IDE nothing happens. As soon as i use the example helloworld the camera instantly turns on…so the camera works, no hardware issue.

Anyway, i fullfilled all the other steps. After typing in the M2500 command i get a feedback on the serial port saying “ok”… so this works as well. But still, camera isn´t working neither in OpenMV and not in Blockly.

Any more suggestions, ideas? You need some more information from me?
It shouldn´t be an issue that i already cabled everyting else (STEP 5)? So i didn´t unplugged everytime i tried all the cables… i just powered off the uarm and used the micro usb of the uarm to connect to openMV…

Next thing: In step 7/8 you are writing put something under the uarm around 25cm… but i can´t do that because the arm has no power and is on the ground…of course i could hold it the whole time but i guess that was not the intention…only after step 9 (powering on etc.) i could put something beneath the arm

greetings Christoph

@tony Unfortunately following the latest guide (1.0.11) didn’t make the arm move.
In step 9 I’m seeing something different than the guide. The serial connection gives a python CLI instead and I had to change some line settings to make it responds. Screenshot attached.

Treid uart.write( something but nothing is sent to uart.readall().

@Adventurebox_Escape , are you using different models than M7? I’m trying to figure out why it seems I cannot send the M2500 right…

@Meatlover The “Both NL & CR” might be the problem for you, since we choose Newline. The baudrate should be 115200 as well.

@Adventurebox_Escape Just review the instruction, in step 3, we made a mistake, we should run the helloworld.py directly and focus the lens as well. Then in the step 4, we save the tracking.py to openMV.
BTW, did you make sure the openmv could turn on the blue light when just plug the USB cable to powe ron the modules without opening the IDE?

@Tony: I reviewed it more then 100 times…so it feels like.
I actually did that as well and focus the lens with helloworld.py directly since the camera wasn´t starting with the tracking.py

Yes, i stored the tracking.py using the micro-usb cable .and connecting it to the openMV. And yes it´s now showing a blue LED which indicates that the tracking.py found its way onto the OpenMV. And yes i just powered it on as well (just a micro-usb connection between OpenMV and the PC without OpenMV IDE running)

And yes, i openen Arduino IDE in the last step and sent the “M2500” command. I got the response: “Ok”.

I really have no idea what to do!!! Another question, in the script, there is no line/command about initialising the camera?! You are sure that the script is right? What else can i do? Would it help if i send you a video and do step 1-9???

Another thing: In you guide is a little mistake with the wiring pictures of the OpenMV. In one picture your are talking about pin 5 + 6. But in the other picture it is wired to Pin 4 + 5.

Please show me the video, it will help a lot. thanks

can u sent me an email adress where i can send you a link to?

So a fresh installation helped! Works now…kind of slow the movement but it worked :slight_smile:
Facial Recognition is not yet working in uarm studio right?? OpenMV just works via the handshake in Arduino IDE right?

@Adventurebox_Escape Nice to hear that, currently it only works in offline mode, and need the handshake in Arduino IDE. We are planning to make it like a simple modules as Grove. Then it could work with studio.
BTW, could you please post a video in our Facebook group? It would help others to use it easily as well. Really appreciate it!

1 Like

How are you copying the tracking.py to the OpenMV’s built in drive? It says insufficient disk space. Do you know if I have a microSD card and put the tracking.py and rename it to main.my it will work?

Hey @prvns , insufficient disk is a bug of openmv firmware, if you got this problem please try to upgrade the firmware again (even the same version). It will fix the problem and try to copy the tracking.py again to the disk. It should work, that’s my own experience. Thanks