ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Could not find a package configuration file provided by "image_transport"

asked 2021-06-14 03:22:54 -0500

arif gravatar image

updated 2021-06-17 04:32:18 -0500

gvdhoorn gravatar image

Image transport error

 CMake Error at CMakeLists.txt:62 (find_package):
  By not providing "Findimage_transport.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "image_transport", but CMake did not find one.

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

    image_transportConfig.cmake
    image_transport-config.cmake

  Add the installation prefix of "image_transport" to CMAKE_PREFIX_PATH or
  set "image_transport_DIR" to a directory containing one of the above files.
  If "image_transport" provides a separate development package or SDK, be
  sure it has been installed.


---
Failed   <<< rviz_default_plugins [2.64s, exited with code 1]
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-06-15 10:48:14 -0500

Ranjit Kathiriya gravatar image

updated 2021-06-17 04:06:36 -0500

By not providing "Findimage_transport.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "image_transport", but CMake did not find one.

Just try to install the image-transport package using sudo apt-get install ros-foxy-image-transport this command. If it is not working then just drop the error of this command in the comment.

edit flag offensive delete link more

Comments

Not worked.

arif gravatar image arif  ( 2021-06-17 03:02:15 -0500 )edit
1

You can also build from the source.

https://github.com/ros-perception/ima...

Here is a link for it.

Steps:

  1. clone it into your working_ws/ src folder

  2. make sure that you are in ros2 branch by checkout

  3. go to your working_ws directory from the terminal and build it.

  4. don't forget to source it.

Try these steps it may work.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-06-17 03:05:08 -0500 )edit
1

It worked:)`thank you

arif gravatar image arif  ( 2021-06-17 03:31:59 -0500 )edit

Tick on the answer so it can be helpful for other users in the community.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-06-17 03:35:49 -0500 )edit
1

Please do not suggest building things from source without adding that this should only be done if there are no other options.

This was already the case in ROS 1 and ROS 2 is no different.

According to status_page/ros_foxy_default.html?q=image_transport, image_transport and related packages are available for ROS 2 Foxy, so installing those with apt should have worked.

If it didn't, that would be the problem to solve.

Suggesting to build it from source is not the solution here.

gvdhoorn gravatar image gvdhoorn  ( 2021-06-17 03:56:06 -0500 )edit

Actually, First, he has tried to install from sudo apt-get install ros-foxy-image-transport but it did not work for him then I have suggested installing from the source.

I am sorry that I re-edited my answer.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-06-17 04:06:27 -0500 )edit
1

it did not work for him

@arif only responded:

Not worked.

that's not a proper description of a problem and we cannot help him with just that information.

It's possible his workspace contained cached information which would make CMake still complain even after he installed image_transport using apt.

I am sorry that I re-edited my answer.

there is no need to apologise. It's just important we try to avoid suggesting to build from source all the time, as it's really wasteful:

  • wasteful of time (because you have to do many more things than simply apt-get install),
  • wasteful of resources (as your computer now compiles something which was already compiled for you), and
  • wasteful of effort (as users tend to run into problems and then post new questions about how to build packages from source)

We can avoid all of that by just asking why apt-get did not work.

gvdhoorn gravatar image gvdhoorn  ( 2021-06-17 04:12:05 -0500 )edit

Thank you for your explanation It was really helpful. Next time will take care of it.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-06-17 04:23:47 -0500 )edit

Question Tools

Stats

Asked: 2021-06-14 03:22:54 -0500

Seen: 3,394 times

Last updated: Jun 17 '21