0
$\begingroup$

Rosanswers logo

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


Originally posted by phil123456 on ROS Answers with karma: 51 on 2020-03-06

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by robustify with karma: 956 on 2020-03-06

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2020-03-07:
Note: this will only install system dependencies when building ROS from source.

It will not install / fetch missing ROS packages.

Comment by phil123456 on 2020-03-07:
s@#t...ok well I'll do this manualy

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

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

Comment by phil123456 on 2020-03-09:
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 :-(

Comment by phil123456 on 2020-03-09:
-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

Comment by gvdhoorn on 2020-03-09:
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.

Comment by phil123456 on 2020-03-10:
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

Comment by gvdhoorn on 2020-03-10:\

error about some package being not homogenous and such

that's most likely an error printed by catkin_make, which it prints whenever you have packages with a build type other than catkin in your workspace. It should also tell you to use catkin_make_isolated to build workspaces like that (catkin_tools can also build them).

I decided to stop tinkering with an unfinnished ros version

ROS Melodic is far from "unfinished". It's in production use in countless applications.

RPi support (all of them actually, not just the 4) is community contributed. That doesn't mean it's any less valuable, but unless someone from the community decides to keep it up to date, there are bound to be problems on newer platforms.

Comment by phil123456 on 2020-03-10:
ok but since I added packages manualy, I have no idea what to do, do I remove them ? I am a complete ROS noob and I 'd rather avoid compile stuffs, I have done enough manual add/compile... yet I am nowhere on the path of learning ROS

I'll try the ubiquity image

Comment by phil123456 on 2020-03-10:
actualy I could make my lidar work but now I want hector slam to be installed, it ends up with some weird QT compilation issues...digging in google, it appears nobody had that error on ROS, so maybe I reached the limit of working pakages on RPI4/melodic

$\endgroup$

Your Answer

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