WassimB / utexas-ros-pkg

Automatically exported from code.google.com/p/utexas-ros-pkg
0 stars 0 forks source link

imagesource error in april_tk #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I do: 
rosrun april_tk execute april.jcam.JCamView

Output:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no imagesource in 
java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at april.jcam.ImageSourceNative.<clinit>(ImageSourceNative.java:30)
    at april.jcam.ImageSource.getCameraURLs(ImageSource.java:22)
    at april.jcam.JCamView.main(JCamView.java:712)

Using the driver on Ubuntu 12.04 LTS.

Original issue reported on code.google.com by devendra...@gmail.com on 23 Oct 2012 at 1:33

GoogleCodeExporter commented 9 years ago
I cannot reproduce this error. I think something in the build process has 
failed without informing the user.

Can you print the output of the following command:
rosls april_tk/lib

If the above results in no such file or directory, then can you print the 
output of the following command:
rosmake april

Original comment by piyu...@gmail.com on 23 Oct 2012 at 2:17

GoogleCodeExporter commented 9 years ago
There was no directory called april_tk/lib so i'm pasting the required output. 
I even checked the build log in the /.ros folder and the build_failures.txt 
file is blank!

dev@dev-MacBookPro:~/ros/stacks/april$ rosmake --pre-clean april
[ rosmake ] rosmake starting...                                                 
[ rosmake ] Packages requested are: ['april']                                   
[ rosmake ] Logging to directory 
/home/dev/.ros/rosmake/rosmake_output-20121023-125208
[ rosmake ] Expanded args ['april'] to:
['lcm', 'april_test', 'april_tags_node', 'april_tk', 'april_msgs']
[rosmake-0] Starting >>> rosjava_bootstrap [ make clean ]                       
[rosmake-0] Finished <<< rosjava_bootstrap  No Makefile in package 
rosjava_bootstrap
[rosmake-0] Starting >>> roslang [ make clean ]                                 
[rosmake-0] Finished <<< roslang  No Makefile in package roslang                
[rosmake-0] Starting >>> std_msgs [ make clean ]                                
[rosmake-0] Finished <<< std_msgs  No Makefile in package std_msgs              
[rosmake-0] Starting >>> rosjava_test [ make clean ]                            
[rosmake-0] Finished <<< rosjava_test  No Makefile in package rosjava_test      
[rosmake-0] Starting >>> rosjava_messages [ make clean ]                        
[rosmake-0] Finished <<< rosjava_messages  No Makefile in package 
rosjava_messages
[rosmake-0] Starting >>> rosjava_geometry [ make clean ]                        
[rosmake-0] Finished <<< rosjava_geometry  No Makefile in package 
rosjava_geometry
[rosmake-0] Starting >>> lcm [ make clean ]                                     
[rosmake-1] Starting >>> rospy [ make clean ]                                   
[rosmake-1] Finished <<< rospy  No Makefile in package rospy                    
[rosmake-1] Starting >>> april_tk [ make clean ]                                
[rosmake-0] Finished <<< lcm [PASS] [ 1.46 seconds ]                            
[rosmake-0] Starting >>> geometry_msgs [ make clean ]                           
[rosmake-0] Finished <<< geometry_msgs  No Makefile in package geometry_msgs    
[rosmake-0] Starting >>> april_msgs [ make clean ]                              
[rosmake-0] Finished <<< april_msgs [PASS] [ 0.28 seconds ]                     
[rosmake-0] Starting >>> april_tags_node [ make clean ]                         
[rosmake-1] Finished <<< april_tk [PASS] [ 4.17 seconds ]                       
[rosmake-1] Starting >>> bullet [ make clean ]                                  
[rosmake-1] Finished <<< bullet ROS_NOBUILD in package bullet                   
[rosmake-1] Starting >>> sensor_msgs [ make clean ]                             
[rosmake-1] Finished <<< sensor_msgs  No Makefile in package sensor_msgs        
[rosmake-1] Starting >>> roscpp [ make clean ]                                  
[rosmake-1] Finished <<< roscpp  No Makefile in package roscpp                  
[rosmake-1] Starting >>> rosconsole [ make clean ]                              
[rosmake-1] Finished <<< rosconsole  No Makefile in package rosconsole          
[rosmake-1] Starting >>> angles [ make clean ]                                  
[rosmake-1] Finished <<< angles ROS_NOBUILD in package angles                   
[rosmake-1] Starting >>> rostest [ make clean ]                                 
[rosmake-1] Finished <<< rostest  No Makefile in package rostest                
[rosmake-1] Starting >>> roswtf [ make clean ]                                  
[rosmake-1] Finished <<< roswtf  No Makefile in package roswtf                  
[rosmake-1] Starting >>> message_filters [ make clean ]                         
[rosmake-1] Finished <<< message_filters  No Makefile in package message_filters
[rosmake-1] Starting >>> tf [ make clean ]                                      
[rosmake-1] Finished <<< tf ROS_NOBUILD in package tf                           
[rosmake-1] Starting >>> rosjava_benchmarks [ make clean ]                      
[rosmake-1] Finished <<< rosjava_benchmarks  No Makefile in package 
rosjava_benchmarks
[rosmake-1] Starting >>> mk [ make clean ]                                      
[rosmake-1] Finished <<< mk  No Makefile in package mk                          
[rosmake-1] Starting >>> rosjava [ make clean ]                                 
[rosmake-1] Finished <<< rosjava  No Makefile in package rosjava                
[rosmake-1] Starting >>> rosbuild [ make clean ]                                
[rosmake-1] Finished <<< rosbuild  No Makefile in package rosbuild              
[rosmake-1] Starting >>> roslib [ make clean ]                                  
[rosmake-1] Finished <<< roslib  No Makefile in package roslib                  
[rosmake-1] Starting >>> pluginlib [ make clean ]                               
[rosmake-1] Finished <<< pluginlib ROS_NOBUILD in package pluginlib             
[rosmake-1] Starting >>> image_transport [ make clean ]                         
[rosmake-1] Finished <<< image_transport ROS_NOBUILD in package image_transport 
[rosmake-1] Starting >>> opencv2 [ make clean ]                                 
[rosmake-1] Finished <<< opencv2 ROS_NOBUILD in package opencv2                 
[rosmake-1] Starting >>> cv_bridge [ make clean ]                               
[rosmake-1] Finished <<< cv_bridge ROS_NOBUILD in package cv_bridge             
[rosmake-1] Starting >>> april_test [ make clean ]                              
[rosmake-1] Finished <<< april_test [PASS] [ 0.31 seconds ]                     
[rosmake-1] Starting >>> rosjava_tutorial_services [ make clean ]               
[rosmake-1] Finished <<< rosjava_tutorial_services  No Makefile in package 
rosjava_tutorial_services
[rosmake-1] Starting >>> rosjava_tutorial_pubsub [ make clean ]                 
[rosmake-1] Finished <<< rosjava_tutorial_pubsub  No Makefile in package 
rosjava_tutorial_pubsub
[rosmake-0] Finished <<< april_tags_node [PASS] [ 11.66 seconds ]               
[rosmake-0] Starting >>> rosjava_bootstrap [ make ]                             
[rosmake-0] Finished <<< rosjava_bootstrap  No Makefile in package 
rosjava_bootstrap
[rosmake-0] Starting >>> roslang [ make ]                                       
[rosmake-0] Finished <<< roslang  No Makefile in package roslang                
[rosmake-0] Starting >>> rospy [ make ]                                         
[rosmake-0] Finished <<< rospy  No Makefile in package rospy                    
[rosmake-0] Starting >>> std_msgs [ make ]                                      
[rosmake-0] Finished <<< std_msgs  No Makefile in package std_msgs              
[rosmake-0] Starting >>> rosjava_test [ make ]                                  
[rosmake-0] Finished <<< rosjava_test  No Makefile in package rosjava_test      
[rosmake-0] Starting >>> rosjava_messages [ make ]                              
[rosmake-0] Finished <<< rosjava_messages  No Makefile in package 
rosjava_messages
[rosmake-0] Starting >>> rosjava_geometry [ make ]                              
[rosmake-0] Finished <<< rosjava_geometry  No Makefile in package 
rosjava_geometry
[rosmake-0] Starting >>> lcm [ make ]                                           
[rosmake-1] Starting >>> geometry_msgs [ make ]                                 
[rosmake-1] Finished <<< geometry_msgs  No Makefile in package geometry_msgs    
[rosmake-1] Starting >>> april_msgs [ make ]                                    
[rosmake-1] Finished <<< april_msgs [PASS] [ 7.54 seconds ]                     
[rosmake-1] Starting >>> bullet [ make ]                                        
[rosmake-1] Finished <<< bullet ROS_NOBUILD in package bullet                   
[rosmake-1] Starting >>> sensor_msgs [ make ]                                   
[rosmake-1] Finished <<< sensor_msgs  No Makefile in package sensor_msgs        
[rosmake-1] Starting >>> roscpp [ make ]                                        
[rosmake-1] Finished <<< roscpp  No Makefile in package roscpp                  
[rosmake-1] Starting >>> rosconsole [ make ]                                    
[rosmake-1] Finished <<< rosconsole  No Makefile in package rosconsole          
[rosmake-1] Starting >>> angles [ make ]                                        
[rosmake-1] Finished <<< angles ROS_NOBUILD in package angles                   
[rosmake-1] Starting >>> rostest [ make ]                                       
[rosmake-1] Finished <<< rostest  No Makefile in package rostest                
[rosmake-1] Starting >>> roswtf [ make ]                                        
[rosmake-1] Finished <<< roswtf  No Makefile in package roswtf                  
[rosmake-1] Starting >>> message_filters [ make ]                               
[rosmake-1] Finished <<< message_filters  No Makefile in package message_filters
[rosmake-1] Starting >>> tf [ make ]                                            
[rosmake-1] Finished <<< tf ROS_NOBUILD in package tf                           
[rosmake-1] Starting >>> rosjava_benchmarks [ make ]                            
[rosmake-1] Finished <<< rosjava_benchmarks  No Makefile in package 
rosjava_benchmarks
[rosmake-1] Starting >>> mk [ make ]                                            
[rosmake-1] Finished <<< mk  No Makefile in package mk                          
[rosmake-1] Starting >>> rosjava [ make ]                                       
[rosmake-1] Finished <<< rosjava  No Makefile in package rosjava                
[rosmake-1] Starting >>> rosbuild [ make ]                                      
[rosmake-1] Finished <<< rosbuild  No Makefile in package rosbuild              
[rosmake-1] Starting >>> roslib [ make ]                                        
[rosmake-1] Finished <<< roslib  No Makefile in package roslib                  
[rosmake-1] Starting >>> pluginlib [ make ]                                     
[rosmake-1] Finished <<< pluginlib ROS_NOBUILD in package pluginlib             
[rosmake-1] Starting >>> image_transport [ make ]                               
[rosmake-1] Finished <<< image_transport ROS_NOBUILD in package image_transport 
[rosmake-1] Starting >>> opencv2 [ make ]                                       
[rosmake-1] Finished <<< opencv2 ROS_NOBUILD in package opencv2                 
[rosmake-1] Starting >>> cv_bridge [ make ]                                     
[rosmake-1] Finished <<< cv_bridge ROS_NOBUILD in package cv_bridge             
[rosmake-1] Starting >>> april_test [ make ]                                    
[rosmake-1] Finished <<< april_test [PASS] [ 15.66 seconds ]                    
[rosmake-1] Starting >>> rosjava_tutorial_services [ make ]                     
[rosmake-1] Finished <<< rosjava_tutorial_services  No Makefile in package 
rosjava_tutorial_services
[rosmake-1] Starting >>> rosjava_tutorial_pubsub [ make ]                       
[rosmake-1] Finished <<< rosjava_tutorial_pubsub  No Makefile in package 
rosjava_tutorial_pubsub
[ rosmake ] Output from build of package lcm written to: Active 30/33 Complete ]
[ rosmake ]    
/home/dev/.ros/rosmake/rosmake_output-20121023-125208/lcm/build_output.log
[rosmake-0] Finished <<< lcm [PASS] [ 47.57 seconds ] -- WARNING: 2 compiler 
warnings
[rosmake-0] Starting >>> april_tk [ make ]                                      
[ rosmake ] Output from build of package april_tk written to:ve 31/33 Complete ]
[ rosmake ]    
/home/dev/.ros/rosmake/rosmake_output-20121023-125208/april_tk/build_output.log
[rosmake-0] Finished <<< april_tk [PASS] [ 21.31 seconds ] -- WARNING: 1 
compiler warnings
[rosmake-0] Starting >>> april_tags_node [ make ]                               
[rosmake-0] Finished <<< april_tags_node [PASS] [ 12.51 seconds ]               
[ rosmake ] Results:                                                            
[ rosmake ] Cleaned 33 packages.                                                
[ rosmake ] Built 33 packages with 0 failures.                                  
[ rosmake ] Summary output to directory                                         
[ rosmake ] /home/dev/.ros/rosmake/rosmake_output-20121023-125208

Original comment by devendra...@gmail.com on 23 Oct 2012 at 5:08

GoogleCodeExporter commented 9 years ago
I'll check the directory name again tomorrow. Can you print the output
of this file:
/home/dev/.ros/rosmake/rosmake_output-20121023-125208/lcm/build_output.log

Also, are you using a Mac for this (given your machine name)? I think
some of the system dependencies may be missing.

Piyush

Original comment by piyu...@gmail.com on 23 Oct 2012 at 5:18

GoogleCodeExporter commented 9 years ago
Attached is the file..

And yes I am using a mac..though I installed all the opencv dependencies before 
doing the rosmake..can you pinpoint which dependency I am missing?

Thank you very much for your time Piyush...

Original comment by devendra...@gmail.com on 23 Oct 2012 at 5:21

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think I found what the problem might be, though I don't know what to do to 
solve it...

this is the output of april_tk 's log..

Original comment by devendra...@gmail.com on 23 Oct 2012 at 6:15

Attachments:

GoogleCodeExporter commented 9 years ago
So based on the jni.h error in the april_tk package's log, I saw your 
openjdk-6-patch.diff file, and noticed that it expects the jni.h file to live 
in the /usr/lib/jvm/java-6-openjdk, but for some reason on my laptop, that 
folder is empty and jni.h lives in /usr/lib/jvm/java-6-openjdk-i136. Changing 
either the .diff file or the actual image_source_jni.c file doesn't help as 
they are downloaded fresh from git for every make..How can I change the search 
path for the jni.h file?

Original comment by devendra...@gmail.com on 23 Oct 2012 at 10:20

GoogleCodeExporter commented 9 years ago
Ok, so this is because the CMakelists supplied by the April toolkit is
not really cross-platform, it relies on jni.h being at a specific
location (expecting the OS to be Ubuntu).

There is a bug in the ROS pacakge that when the gradle wrapper fails,
it does not return an incorrect exit code -- consequently the build
passes. I will see if I can fix this somehow. This would have saved a
bit of time for both of us.

Note: openjdk-6-patch.diff is not downloaded afresh ever ytime you run
make in the package. I would recommend the following:
1) Build the package as normal using make (let it fail)
2) Go into build/april and modify the CMakeLists.txt with the jni.h
file location until you can get it to work.
3) Generate the diff file and send it over to me, and I will tag a
separate branch for osx. For the time being, replace the
openjdk-6-patch.diff with the diff you generated.
4) Submit a separate enhancement ticket with the diff.

I don't have access to too many macs, so it will be difficult for me
to test this out, but I will try to. Keep in mind that the April
toolkit build is only meant for Ubuntu. This might be the first of
your problems...

Piyush

Original comment by piyu...@gmail.com on 23 Oct 2012 at 4:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry for being vague, but i'm running the Ubuntu OS on a Mac. I'm running it 
on a separate bootcamp partition, so there should be no issues because of that.

So I changed the makefile in stacks/april/april_tk/build/april/java/jni/jcam, 
but on every make it is restored to the original file on the respository..I'm 
unfortunately not well versed with Makefile, so please tell me how I should 
stop it from acquiring the files afresh on every make?

Again, thank you very much for your time, I really appreciate it.

Original comment by devendra...@gmail.com on 23 Oct 2012 at 5:20

GoogleCodeExporter commented 9 years ago
Ah understood. I suspect this is an i386 bug then. I only have 64 bit machines.

Once you change the files, generate the diff using git diff. Replace
the patch file with this diff. Then use make. The patch will be
applied once the code is downloaded.

Original comment by piyu...@gmail.com on 23 Oct 2012 at 5:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I changes the .diff file manually with the correct paths, and everything is 
working fine now. Thank you very much Piyush!

Original comment by devendra...@gmail.com on 24 Oct 2012 at 1:57

GoogleCodeExporter commented 9 years ago
Can you send me the diff file? I will try and fix the i386 issue.

Thanks for reporting this and working through the error!

Original comment by piyu...@gmail.com on 24 Oct 2012 at 2:03

GoogleCodeExporter commented 9 years ago
Here it is!

Thanks again for all the help!

Original comment by devendra...@gmail.com on 24 Oct 2012 at 2:33

Attachments: