Ask Your Question
2

Opencv no rule to make target

asked 2016-08-03 11:28:40 -0600

skr_robo gravatar image

updated 2016-08-03 11:40:16 -0600

I am trying out the example to convert ros image to opencv image from here. I am creating a new package roscv_conv and using a zed camera with ros indigo, on a Jetson tx1, to get this done (I will probably have to edit the topic being subscribed to , given in the example). I have installed OpenCV4Tegra (version 2.4.12.2). But my current issue is that I am receiving the following error during catkin_make :

make[2]: *** No rule to make target `/usr/lib/arm-linux-gnueabihf/libopencv_videostab.so.2.4.8', needed by `/home/ubuntu/tst_ws/devel/lib/roscv_conv/roscv_conv_node'.  Stop.
make[1]: *** [roscv_conv/CMakeFiles/roscv_conv_node.dir/all] Error 2

My CMakeLists.txt looks like this:

cmake_minimum_required(VERSION 2.8.3)
project(roscv_conv)

find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  roscpp
  sensor_msgs
  std_msgs

)

find_package(OpenCV REQUIRED)

catkin_package(
  CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msg
)

include_directories(
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
)

add_executable(roscv_conv_node src/roscv_conv_node.cpp)

target_link_libraries(roscv_conv_node
   ${catkin_LIBRARIES}
   ${OpenCV_LIBRARIES}
)
add_dependencies(roscv_conv_node sensor_msgs_generate_messages_cpp std_msgs_generate_messages_cpp)

Also, I have the following lines in my package.xml :

<build_depend>OpenCV</build_depend>
<run_depend>OpenCV</run_depend>

How do I fix this issue? I believe it has nothing to do with the actual code inside the src folder.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2016-09-01 04:37:46 -0600

Nxt gravatar image

updated 2016-09-02 00:28:58 -0600

Hi,

same problem here. In my case I'm using rpi3 with jessie. Our CMakeList.txt and package.xml are completely the same.

Did you find any solution?

Thanks in advance!

EDIT:

I figured out how to solve this problem. Probably it is a shoddy job, but the case is that it worked for me.

My case is RPI3 + Jessie + ROS Indigo (base)

I installed opencv (sudo apt-get install libopencv-dev) which comes with the 2.4.9 version.

So far everything is running right.

After that I installed image_transport and cv_bridge and the problem started to appear when a node included cv_bridge:

make[2]: *** No rule to make target `/usr/lib/arm-linux-gnueabihf/libopencv_videostab.so.2.4.8', needed by `/home/ubuntu/tst_ws/devel/lib/my_package/my_node'.  Stop.

I moved to where the opencv.so files are and created a symbolic link named "libopencv_videostab.so.2.4.8" and pointing to "libopencv_videostab.so.2.4.9". Catkin_make asked me to do the same with every "libopencv_something.so.2.4.8" I had.

Everything is running correctly now. I'm sure it is not a brilliant solution but, if a stupid idea works, probably is not that stupid!

edit flag offensive delete link more

Comments

I installed a normal OpenCV (not OpenCV4Tegra), version 2.4.13. In my case I found out that it is an issue with the platform.

skr_robo gravatar imageskr_robo ( 2016-09-01 12:37:37 -0600 )edit

Thank you! I finally found a solution that works for me, I edited my post with it.

Nxt gravatar imageNxt ( 2016-09-02 00:30:08 -0600 )edit

I think the solution is similar for Jetson as well. Anyway, thank you for the info.

skr_robo gravatar imageskr_robo ( 2016-09-14 12:43:32 -0600 )edit
0

answered 2016-08-03 14:08:47 -0600

skr_robo gravatar image

updated 2016-09-30 15:46:59 -0600

I figured out that I might require a few complex workarounds to rectify this issue. I was able to install a normal version of OpenCV (2.4.13) on my system (Jetson TX1). I would still like to know if there are any easy workarounds.

Edit: Please see this link as well.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-08-03 11:28:40 -0600

Seen: 2,718 times

Last updated: Sep 30 '16