0
$\begingroup$

Rosanswers logo

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)

Originally posted by jackkj on ROS Answers with karma: 3 on 2020-03-07

Post score: 0


Original comments

Comment by marguedas on 2020-03-07:
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.

Comment by jackkj on 2020-03-07:
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.

Comment by marguedas on 2020-03-07:\

So sorry for any basic or stupid questions asked.

no worries, there are no stupid questions :)

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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/Installation/Source, you can use the exact same workflow to build any set of ROS packages on top:

  1. create a workspace:

    mkdir ~/libuvc_camera_ws && cd ~/libuvc_camera_ws

  2. 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

  3. use wstool to download all the packages to build

    wstool init -j8 src libuvc_camera.rosinstall

  4. use rosdep to install the dependencies

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

  5. use catkin_make_isolated to build the workspace

    catkin_make_isolated --install


Originally posted by marguedas with karma: 3606 on 2020-03-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by jackkj on 2020-03-08:
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.

Comment by jackkj on 2020-03-08:
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'

Comment by jackkj on 2020-03-08:
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

Comment by jackkj on 2020-03-08:
this is their instructions and github link driver & instructions

Comment by marguedas on 2020-03-09:
Follow-up question has been opened at: https://answers.ros.org/question/346240/ros_astra_camera-install-error-undefined-reference-error/

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.