lagadic / vision_visp

ViSP stack for ROS
http://wiki.ros.org/vision_visp
GNU General Public License v2.0
181 stars 90 forks source link

visp_auto_tracker cannot open model file #42

Closed formica-multiuso closed 7 years ago

formica-multiuso commented 9 years ago

Hi, I'm trying to use visp_auto_tracker but I'm stuck on this issue:

Coin read error: Could not find '��u' in any of the following directories (from cwd '/home/formica/.ros'): '' '.'

(L0) !! /tmp/buildd/ros-hydro-visp-2.9.0-4raring-20140819-1830/src/tracking/mbt/vpMbTracker.cpp: loadVRMLModel(#774) : can't open file to load model terminate called after throwing an instance of 'vpException' what(): can't open file to load model [visp_auto_tracker-2] process has died [pid 27735, exit code -6, cmd /home/formica/ros/catkin_ws/devel/lib/visp_auto_tracker/visp_auto_tracker /visp_auto_tracker/camera_info:=/usb_cam/camera_info /visp_auto_tracker/image_raw:=/usb_cam/image_raw name:=visp_auto_tracker log:=/home/formica/.ros/log/cccbbb7e-52c2-11e4-b0ce-e811326b35e2/visp_auto_tracker-2.log]. log file: /home/formica/.ros/log/cccbbb7e-52c2-11e4-b0ce-e811326b35e2/visp_auto_tracker-2*.log

Any idea? Thanks in advance

fspindle commented 9 years ago

Does this error occur with "roslaunch visp_auto_tracker tutorial.launch" ?

formica-multiuso commented 9 years ago

This error occur with every launch file... :(

fspindle commented 9 years ago

Do you build ViSP and vision_visp from source or do you install them from ubuntu packages ?

formica-multiuso commented 9 years ago

ubuntu packages

formica-multiuso commented 9 years ago

Any idea?

fspindle commented 9 years ago

What happens if you launch the tutorial that comes with visp_tracker:

roslaunch visp_tracker tutorial.launch

formica-multiuso commented 9 years ago

process[visp_auto_tracker-3]: started with pid [11198] [ INFO] [1413270897.905167549]: model full path=/home/formica/ros/catkin_ws/src/visp_auto_tracker/models/pattern [ INFO] [1413270897.922510136]: model content=#VRML V2.0 utf8

DEF fst_0 Group { children [

Object "cube"

Shape {

geometry DEF cube IndexedFaceSet {

coord Coordinate { point [ -0.0765 -0.0765 0.000 0.0765 -0.0765 0.000 0.0765 0.0765 0.000 -0.0765 0.0765 0.000 -0.03825 -0.03825 0.000
0.03825 -0.03825 0.000 0.03825 0.03825 0.000 -0.03825 0.03825 0.000 ] }

coordIndex [ 0,1,2,3,-1, 4,5,6,7,-1, ]} }

] }

Coin read error: Could not find '�,]' in any of the following directories (from cwd '/home/formica/.ros'): '' '.'

(L0) !! /tmp/buildd/ros-hydro-visp-2.9.0-4raring-20140819-1830/src/tracking/mbt/vpMbTracker.cpp: loadVRMLModel(#774) : can't open file to load model terminate called after throwing an instance of 'vpException' what(): can't open file to load model [visp_auto_tracker-3] process has died [pid 11198, exit code -6, cmd /home/formica/ros/catkin_ws/devel/lib/visp_auto_tracker/visp_auto_tracker /visp_auto_tracker/camera_info:=/camera/camera_info /visp_auto_tracker/image_raw:=/camera/image_raw name:=visp_auto_tracker log:=/home/formica/.ros/log/c8c73724-5371-11e4-8460-e811326b35e2/visp_auto_tracker-3.log]. log file: /home/formica/.ros/log/c8c73724-5371-11e4-8460-e811326b35e2/visp_auto_tracker-3*.log

fspindle commented 9 years ago

It seems to me that the file /home/formica/ros/catkin_ws/src/visp_auto_tracker/models/pattern.wrl is wrong. In your previous message, there is a blank line between -0.03825 -0.03825 0.000

0.03825 -0.03825 0.000

Try to remove it.

formica-multiuso commented 9 years ago

Nope. That was a visualization issue related to the linux console. The file has no blank line. :/

fspindle commented 9 years ago

Try to modify the file by adding commas:

point [ -0.0765 -0.0765 0.000, 0.0765 -0.0765 0.000, 0.0765 0.0765 0.000, -0.0765 0.0765 0.000, -0.03825 -0.03825 0.000, 0.03825 -0.03825 0.000, 0.03825 0.03825 0.000, -0.03825 0.03825 0.000 ]

formica-multiuso commented 9 years ago

No way, sorry. I'm going crazy. :/

formica-multiuso commented 9 years ago

Coin read error: Could not find '�OD��' in any of the following directories (from cwd '/home/formica/.ros'): '' '.'

fspindle commented 9 years ago

What about

roslaunch visp_tracker tutorial.launch

formica-multiuso commented 9 years ago

I obtain this 3 errors: ERROR: cannot launch node of type [visp_tracker/tracker]: can't locate node [tracker] in package [visp_tracker] ERROR: cannot launch node of type [visp_tracker/visp_tracker_client]: can't locate node [visp_tracker_client] in package [visp_tracker] ERROR: cannot launch node of type [visp_tracker/visp_tracker_viewer]: can't locate node [visp_tracker_viewer] in package [visp_tracker]

fspindle commented 9 years ago

This is strange since visp_auto_tracker uses visp_tracker.

In visp-tracker tutorial we also load a .wrl file. It could be interesting to check if this is working. To go further, check if ros-hydro-visp-tracker is installed. If installed, but not found, source /opt/ros/hydro/setup.bash or the one in your catkin workspace. This should be enough to find visp_tracker package and run again roslaunch visp_tracker tutorial.launch

An other test would be to build ViSP from source as explained in http://wiki.ros.org/visp/Tutorials/CatkinBuildViSPFromSourceRelease but without the sudo make install command.

$ cd /tmp $ git clone -b release/hydro/visp https://github.com/lagadic/visp-release.git $ cd /tmp/visp-release $ cmake -DCMAKE_INSTALL_PREFIX=/opt/ros/hydro -DCMAKE_INSTALL_LIBDIR=lib . $ make -j8

After the build, download ViSP data set http://www.irisa.fr/lagadic/visp/download/sequence/ViSP-images-2.9.0.zip

$ cd /tmp $ wget http://www.irisa.fr/lagadic/visp/download/sequence/ViSP-images-2.9.0.zip $ unzip ViSP-images-2.9.0.zip $ export VISP_INPUT_IMAGE_PATH=/tmp

and then run the following ViSP example that used coin to read *.wrl file

$ /tmp/visp-release/example/tracking/mbtEdgeTracking -c

formica-multiuso commented 9 years ago

It works, installing visp from sources :)

So, now I have to uninstall the previous release and install this working one. Do you have any hint?

fspindle commented 9 years ago

The best is to remove all ros-hydro-visp* packages, and then install the packages from source.

For ViSP: $ cd ~/visp $ git clone -b release/hydro/visp https://github.com/lagadic/visp-release.git $ cd ~/visp/visp-release $ cmake -DCMAKE_INSTALL_PREFIX=/opt/ros/hydro -DCMAKE_INSTALL_LIBDIR=lib . $ make -j8 $ sudo make install

For visp auto tracker (you can use the master branch) $ cd ~/catkin_ws/src $ git clone https://github.com/lagadic/vision_visp.git $ cd .. $ catkin_make --pkg visp_auto_tracker $ source devel/setup.bash $ roslaunch visp_auto_tracker tutorial.launch