Difference between revisions of "TB3 ROS OpenCL Caffe"

From wikidb
Jump to: navigation, search
(Running Demo)
(Running Demo)
Line 54: Line 54:
 
'''Holly Shit''' it did something.
 
'''Holly Shit''' it did something.
 
    
 
    
 +
This didn't work until I add "Inference Optomization" and "Yolo2 Model Support" items in [[TB3_clCaffe]].
  
 
+
== Investigation ==
Investigation
+
  
 
   $ cd /home/eepp/ros_packages/roslaunch_to_dot
 
   $ cd /home/eepp/ros_packages/roslaunch_to_dot
Line 63: Line 63:
 
   
 
   
 
   $ gimp caffe_nodelet.png
 
   $ gimp caffe_nodelet.png
 
This did not help: [https://github.com/01org/caffe/wiki/clCaffe clCaffe]
 
 
  $ export CAFFE_ROOT=$HOME/code/clCaffe
 

Revision as of 20:05, 7 July 2018

Reference

Prerequisite

  • Done: Ubuntu 16.04
  • Done: ROS kinetic
  • Done: RGB Camera

Environment Setup

  • ROS Kinetic - See TR3_Intel_ROS_Project#Software_Environment
  • Catkin Workspace - See TR3_Intel_ROS_Project#Software_Environment
  • clCaffe TB3 clCaffe - Done - This step is misleadingly involved. It is also finicky. It took me several trials to get it right. Once done, it doesn't appear that difficult. It is easy to miss a detail that puts you on a bad path. Furthermore, there is a lot of glue here to stitch together components from diverse environments, for example, ROS catkin, classic Ubuntu, rpm, Debian, and OpenCL.
  • Create a symbol link in /opt/clCaffe
 $ sudo ln -s /home/eepp/code/clCaffe/ /opt/clCaffe
  • Add clCaffe libraries to LD_LIBRARY_PATH to the .bashrc file.
 $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/clCaffe/build/lib

Building and Installing

 $ cd ~/catkin_ws/src/

 $ git clone https://github.com/intel/ros_opencl_caffe

 $ cd ~/catkin_ws/

 $ catkin_make
     ...
     [ 98%] Linking CXX executable /home/eepp/catkin_ws/devel/lib/opencl_caffe/unittest_detector
     [ 98%] Built target unittest_detector
     [100%] Linking CXX executable /home/eepp/catkin_ws/devel/lib/movidius_ncs_stream/unittest_stream_detection
     [100%] Built target unittest_stream_detection

 $ catkin_make install

 $ source install/setup.bash

 $ cp ~/catkin_ws/src/ros_opencl_caffe/opencl_caffe/resources/voc.txt /opt/clCaffe/data/yolo/

Running Demo

 $ roslaunch opencl_caffe_launch usb_cam_viewer.launch

Holly Shit it did something.

This didn't work until I add "Inference Optomization" and "Yolo2 Model Support" items in TB3_clCaffe.

Investigation

 $ cd /home/eepp/ros_packages/roslaunch_to_dot

 $ python roslaunch-to-dot.py --png ~/catkin_ws/install/share/opencl_caffe_launch/launch/opencl_caffe_nodelet.launch caffe_nodelet.dot

 $ gimp caffe_nodelet.png