0
$\begingroup$

Rosanswers logo

I am trying to build a ros package which actually during compilation is asking me to call 'sudo rosdep init' and 'rosdep update' . Both of these require the machine to be connected to an active internet so that the necessary repositories can be downloaded. But in my case its near to impossible for me to connect that system to internet. So i was looking for an offline workaround. Is that possible??

EDIT::

As suggested in the posts i tried downloading all the yaml files from the urls and stored them in local disk. In /etc/ros/rosdep/sources.list.d i provided local path names to all the files. Then i tried running rosdep update and it shows "Hit file:///home/ros/Documents/ros......." At last line its shows error for index.yaml file. I downloaded that file too and provided it with a local path. Still that error comes which i guess might be due to the rosdep update configuration to automatically look for index.yaml file on repositories. Nonetheless the package which I was trying to compile still suggests me to run 'rosdep update'. The error says "Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'"


Originally posted by gaurav on ROS Answers with karma: 1 on 2017-11-30

Post score: 0


Original comments

Comment by gvdhoorn on 2017-12-04:
Not an answer, but:

Nonetheless the package which I was trying to compile still suggests me to run 'rosdep update'

if you're only doing this to be able to run rosdep check or rosdep install, then I'm wondering what you'll do after we get past the current issue: dependencies will be ..

Comment by gvdhoorn on 2017-12-04:
.. installed using the internet, so that is going to fail as well.

Comment by gaurav on 2017-12-04:
Thats what i want to know. The error which i am facing, is it because of rosdep not getting updated? or the package i am trying to compile is having some dependency problem?

Comment by gvdhoorn on 2017-12-04:\

Thats what i want to know

ok. So just to (further) avoid an xy-problem: what are you really trying to do? What is your end goal.

Comment by gaurav on 2017-12-04:
ok but should it be added as a new question? Actually i am trying to compile lsd_slam package which requires rosmake as catkin support is not there for the package. While compiling the package it is showing "Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'"

Comment by gvdhoorn on 2017-12-04:
There are already many questions about lsd_slam on ROS Answers. If this is the only problem blocking you then we can continue with this question.

Comment by gaurav on 2017-12-04:
yes right now during compilation of rosmake lsd_slam the only error associated is this one only. It says "Failed to invoke /opt/ros/indigo/bin/rospack deps-manifests lsd_slam_viewer" followed by "the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'"

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This should be possible.

See #q61323, #q132911 and #q189757 for earlier questions about this.


Edit: a quick work-around for all this would appear to be to copy the $HOME/.ros/rosdep directory from a PC with internet access to the one that doesn't have internet.

But then you run into the issue that for rosdep to be able to install any dependencies it needs internet access (or your pkg manager can't download from the repositories).

rosdep check --from-paths .. --ignore-src and similar would still be able to print the list of missing dependencies for you though.


Edit2: running the risk of solving the 'wrong' part of an xy-problem: I believe I got this to work. As follows (MWI: machine with internet, MNI: machine no internet):

  1. MWI: wget the files listed in ros/rosdistro/rosdep/20-default.list to somewhere on your disk. Copy these to the machine without.
  2. MNI: sudo mkdir -p /etc/ros/rosdep/sources.list.d.
  3. MWI: wget 20-default.list and copy it to MNI (in the dir we created in the previous step). Replace all http:// URIs with file:///path/to/where/you/put/the/files/from/step/1. Pay attention to the nr of forward slashes, it has to be three.
  4. MWI: git clone https://github.com/ros/rosdistro.git. Copy this to MNI
  5. MNI: export ROSDISTRO_INDEX_URL=file:///path/to/where/you/put/the/rosdistro/clone/index.yaml
  6. MNI: edit /path/to/where/you/put/the/rosdistro/clone/index.yaml, comment all distribution_cache entries.

Now rosdep update should not try and download anything from the internet anymore.

Note that this is essentially what @Dirk Thomas wrote in his answer to #q132911.


Originally posted by gvdhoorn with karma: 86574 on 2017-11-30

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gaurav on 2017-12-04:
all those solutions don't seem to provide any help. I have tried editing sources.list files and downloading the necessary .yaml files and also provided them with local paths. But still the problem persists. It appears like rosdep has not been updated yet.

Comment by gvdhoorn on 2017-12-04:\

all those solutions don't seem to provide any help.

That's rather vague, and not something I can act on.

Could you please update your original question text (edit it and place an update below the current text) with the steps you took and the output of the commands you're trying to use?

$\endgroup$

Your Answer

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