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

How to install package manualy on a ROS compiled from code

asked 2020-03-06 14:11:30 -0500

phil123456 gravatar image

updated 2020-03-06 14:11:44 -0500

Hello

I am currently installing packages manually when missing dependencies are occurring on compile

is there a way to make this easier ? I mean if it is possible to compile ros from code, there must be some alternative to aptitude ?

regards

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-03-06 16:00:21 -0500

robustify gravatar image

If you run the following command in the root of your workspace folder, it will search through all the package.xml files in the src directory and automatically install missing package binaries using apt:

rosdep install --from-paths src --ignore-src -r

Make sure rosdep is up to date first:

rosdep update

Any package included as a <depend>, <exec_depend>, <build_depend> etc. in any package.xml will be found by the command, so make sure all packages you need to build or run a package are listed it its package.xml.

edit flag offensive delete link more

Comments

Note: this will only install system dependencies when building ROS from source.

It will not install / fetch missing ROS packages.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-07 03:54:13 -0500 )edit

s@#t...ok well I'll do this manualy

phil123456 gravatar image phil123456  ( 2020-03-07 13:53:31 -0500 )edit

No, that's not necessarily needed. I just wanted to draw attention to the fact that what @robustify writes is not a complete answer to your question.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-08 06:24:23 -0500 )edit

If we're talking about packages that have been released, you could try something like this:

rosinstall_generator <the_package> --rosdistro <your_distro> --deps --tar --exclude RPP > the_package_deps.rosinstall

this will ask rosinstall_generator to generate a list of files/repositories to download (actually: .tar files) which you then merge into your workspace using wstool. Then you can run rosdep, which installs the system dependencies, and then you can run catkin_make.

See also #q346123 for a recent Q&A about this procedure.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-08 06:26:48 -0500 )edit

I am talking about raspbery pi 4 and the fact that I had to compile ROS from the appropriate tutorial

I'll try to use rosdep, but I am pretty sure, I'll end up doing this on my RPI3 in the end :-(

phil123456 gravatar image phil123456  ( 2020-03-09 07:24:15 -0500 )edit

-bash: rosinstall_generator: command not found

but 'rodep update' and 'rosdep install --from-paths src --ignore-src -r' installed some packages

then I could go further installing hector slam...it installed opncv deps , but I keep having unmet dependencies, so I install them manualy

phil123456 gravatar image phil123456  ( 2020-03-09 11:44:57 -0500 )edit

rosinstall_generator is not installed by default. On platforms without .deb packages, you'd have to install it using pip install rosinstall_generator. The same goes for rosdep.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-09 15:44:39 -0500 )edit

ok but I have an error about some package being not homogenous and such, I checked the logs and there are some compilation errors, I decided to stop tinkering with an unfinished ros package, I'll try on a RPI3 ready to go image

phil123456 gravatar image phil123456  ( 2020-03-10 04:01:14 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-06 14:11:30 -0500

Seen: 339 times

Last updated: Mar 06 '20