TB3 Movidius Neural Compute Stick

From wikidb
Revision as of 08:02, 26 May 2018 by Edc (Talk | contribs)

Jump to: navigation, search

References

On Dual Boot

Install

Step 2

 mkdir -p ~/workspace
 cd ~/workspace
 git clone https://github.com/movidius/ncsdk.git
 cd ~/workspace/ncsdk
 make install

USB

Initial and after NCS plugin lsusb

 lsusb
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 005: ID 04f3:2494 Elan Microelectronics Corp. 
   Bus 001 Device 004: ID 8087:0a2a Intel Corp. 
   Bus 001 Device 003: ID 0bda:58c2 Realtek Semiconductor Corp. 
   Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 lsusb
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 005: ID 04f3:2494 Elan Microelectronics Corp. 
   Bus 001 Device 004: ID 8087:0a2a Intel Corp. 
   Bus 001 Device 003: ID 0bda:58c2 Realtek Semiconductor Corp. 
   Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
   Bus 001 Device 006: ID 03e7:2150  
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

On VirtualBox

Install

 mkdir -p ~/workspace
 cd ~/workspace
 git clone https://github.com/movidius/ncsdk.git
 ls
 cd ~/workspace/ncsdk
 ls
 make install
   ...
   Successfully installed mvnc-1.12.0.1
   You are using pip version 8.1.1, however version 9.0.1 is available.
   You should consider upgrading via the 'pip install --upgrade pip' command.
   NCS Libraries have been installed in /usr/local/lib
   NCS Toolkit binaries have been installed in /usr/local/bin
   NCS Include files have been installed in /usr/local/include
   NCS Python API has been installed in /opt/movidius, and PYTHONPATH environment variable updated
   Updating udev rules...
   Adding user 'eepp' to 'users' group
   Setup is complete.
   The PYTHONPATH enviroment variable was added to your .bashrc as described in the Caffe documentation. 
   Keep in mind that only newly spawned terminals can see this variable!
   This means that you need to open a new terminal in order to be able to use the NCSDK.
   Please provide feedback in our support forum if you encountered difficulties.

Investigating Movidus NCS USB Connection

 lsusb
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 003: ID 03e7:2150  
   Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The 03e7 id is the Movidius driver

  lsusb -v -s 1:3
    Bus 001 Device 003: ID 03e7:2150  
    ...
    idVendor           0x03e7 
    idProduct          0x2150 
    bcdDevice            0.01
    iManufacturer           1 Movidius Ltd.
    iProduct                2 Movidius MA2X5X
    ...

Build Examples

Problem One

 cd ~/workspace/ncsdk
 
 make examples
    ...
    [Error 7] Toolkit Error: USB Failure. Code: No devices found

Fix One

 cd ncsdk/
 
 make uninstall
 
 cd ..
 
 rm -rf ncsdk/
 
 git clone https://github.com/movidius/ncsdk
 
 cd ncsdk/
 

Problem Two

 making run
   ....
   ./run.py
  Traceback (most recent call last):
  File "./run.py", line 22, in <module>
     import cv2
   ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type
   Makefile:91: recipe for target 'run' failed
   make: *** [run] Error 1

Fix Two

Import Error ROS python3 opencv. ROS creates its own open cv which is compatible with python2 only. I do the following.I followed zishan’s instructions

 sudo mv cv2.so cv2_renamed.so

I noticed that the NCS went away during the make run process. It no longer shows up in the lsusb list. I need to go through the VituralBox Devices -> USB menu to re-enable it.

I entered make run again.

Problem Three

 make run
   ...
   Performing bulk write of 865724 bytes...
   Successfully sent 865724 bytes of data in 236.494626 ms (3.491068 MB/s)
  Boot successful, device address 2
  Traceback (most recent call last):
    File "./run.py", line 58, in <module>
      device.OpenDevice()
    File "/usr/local/lib/python3.5/dist-packages/mvnc/mvncapi.py", line 147, in OpenDevice
      raise Exception(Status(status))
  Exception: mvncStatus.ERROR
  Makefile:91: recipe for target 'run' failed
  make: *** [run] Error 1

lsusb confirms that the Vovidius NCS is not connected

Stalled

Reported at Compatibility of Movidius ncsdk with ROS. Not sure how to approach this. Going to focus here next.

Next Steps