Ask Your Question
0

Libuvc_camera install problem (what is JpegPkg?)

asked 2020-03-07 09:54:40 -0500

jackkj gravatar image

updated 2020-03-07 10:28:42 -0500

Hi All,

I have an error with installing libuvc_camera. I really have no idea what jpegpkg is. I tried to google but seems like no one has this issue before. I tried to install libjpeg but still the error is still there.

I'm currently using a Pi4 with raspbian buster with ros melodic.

Please help me. I need this to install the astra pro camera driver for my final year project.

pi@raspberrypi:~/libuvc_ros/libuvc_camera $ cmake .
-- Using CATKIN_DEVEL_PREFIX: /home/pi/libuvc_ros/libuvc_camera/devel
-- Using CMAKE_PREFIX_PATH: /home/pi/catkin_ws/devel;/opt/ros/melodic
-- This workspace overlays: /home/pi/catkin_ws/devel;/opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.16", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/pi/libuvc_ros/libuvc_camera/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.17
-- BUILD_SHARED_LIBS is on
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.16") 
CMake Error at /home/pi/libuvc/libuvcConfig.cmake:13 (find_package):
  By not providing "FindJpegPkg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "JpegPkg", but
  CMake did not find one.

  Could not find a package configuration file provided by "JpegPkg" with any
  of the following names:

    JpegPkgConfig.cmake
    jpegpkg-config.cmake

  Add the installation prefix of "JpegPkg" to CMAKE_PREFIX_PATH or set
  "JpegPkg_DIR" to a directory containing one of the above files.  If
  "JpegPkg" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:9 (find_package)
edit retag flag offensive close merge delete

Comments

please format your code/console output using the 101010 button for your question to be more readable.

Can you clarify what commands you ran before ? For example how did you install the dependencies of libuvc_camera?


Also you seem to be running CMake directly, while it may be fine for a single package, you will quickly run into overly complicated build sequences when you start growing your application. I recommend you to use the ROS build tools catkin_make and friends to simplify your workflow.

marguedas gravatar image marguedas  ( 2020-03-07 10:16:53 -0500 )edit

thanks for you quick reply.

previously i have been following the instructions of ros_astra_camera but it's dependencies i cannot use sudo apt install ros-melodic-... , it always shows that it cannot locate the packages. so i have install all the dependencies individually through each of their respective githubs. I have installed all the other dependencies will no issues just that some of the config files directories need to be replaced in the cmake_cache file but this 'JpegPkg' package i cannot locate it in pi nor i can download it anywhere.

I'm quite new to the linux environment. So sorry for any basic or stupid questions asked.

jackkj gravatar image jackkj  ( 2020-03-07 10:39:18 -0500 )edit

So sorry for any basic or stupid questions asked.

no worries, there are no stupid questions :)

marguedas gravatar image marguedas  ( 2020-03-07 11:33:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-03-07 11:33:34 -0500

marguedas gravatar image

The quick fix for your problem is to install the package libjpeg-dev

However finding, installing and compiling packages one by one is not a very sustainable workflow for large projects.

Unfortunately for you, you are using a non supported platform (there are currently no version of ROS running on Debian Buster) which is why you cannot find the packages and have to build them from source.

Cloning and building packages and their dependencies by hand can be very tedious. Fortunately ROS provide many tools to help you with that. This will allow you to find the github repositories you need, clone them, installing their dependencies, build them in the right order.

How did you install ROS in the first place? from source?

If you followed a tutorial like https://wiki.ros.org/melodic/Installa..., you can use the exact same workflow to build any set of ROS packages on top:

0) create a workspace:

mkdir ~/libuvc_camera_ws && cd ~/libuvc_camera_ws

1) use rosinstall_generator to generate the list of repositories to clone

source <YOUR_ROS_INSTALLATION>/setup.bash
rosinstall_generator libuvc_camera --rosdistro melodic --deps --tar --exclude RPP > libuvc_camera.rosinstall

2) use wstool to download all the packages to build

wstool init -j8 src libuvc_camera.rosinstall

3) use rosdep to install the dependencies

rosdep install --from-paths src --ignore-src --rosdistro melodic -y

4) use catkin_make_isolated to build the workspace

catkin_make_isolated --install
edit flag offensive delete link more

Comments

Thank you very very much for the detailed instructions for helping me.

Before using melodic i was trying to install kinetic but it always have some random errors, so I have grab a raspbian image with melodic installed.

I'll try to install other packages in the future with these instructions.

jackkj gravatar image jackkj  ( 2020-03-08 00:11:56 -0500 )edit

sorry for bothering again.

the package installed without any problems but there are still error with a bunch of undefined reference regarding the libuvc_camera when i catkin_make with the instructions provided. is it because of path problems ?

    [ 98%] Built target astra_camera_nodelet
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::~CameraDriver()':
camera_driver.cpp:(.text+0xcb4): undefined reference to `uvc_free_frame'
/usr/bin/ld: camera_driver.cpp:(.text+0xcd4): undefined reference to `uvc_exit'
jackkj gravatar image jackkj  ( 2020-03-08 00:21:01 -0500 )edit

I've also tried to use the installation method above but this error appeared

pi@raspberrypi:~/camera_ws $ rosinstall_generator astra_camera --rosdistro melodic --deps --tar --exclude RPP > astra_camera.rosinstall
The following unreleased packages/stacks will be ignored: astra_camera
No packages/stacks left after ignoring unreleased
jackkj gravatar image jackkj  ( 2020-03-08 00:22:32 -0500 )edit

this is their instructions and github link driver & instructions

jackkj gravatar image jackkj  ( 2020-03-08 00:27:22 -0500 )edit

Follow-up question has been opened at: https://answers.ros.org/question/3462...

@jackkj thanks for opening another question, it is better for visibility

marguedas gravatar image marguedas  ( 2020-03-09 13:06:35 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-03-07 09:54:40 -0500

Seen: 643 times

Last updated: Mar 07 '20