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

Can sudo rosdep init and rosdep update be done offline?

asked 2017-11-29 23:42:53 -0500

gaurav gravatar image

updated 2017-12-04 03:55:06 -0500

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'"

edit retag flag offensive close merge delete

Comments

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

gvdhoorn gravatar image gvdhoorn  ( 2017-12-04 04:19:51 -0500 )edit

.. installed using the internet, so that is going to fail as well.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-04 04:20:05 -0500 )edit

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?

gaurav gravatar image gaurav  ( 2017-12-04 04:24:37 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-04 04:25:51 -0500 )edit

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'"

gaurav gravatar image gaurav  ( 2017-12-04 05:44:45 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-04 05:52:43 -0500 )edit

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'"

gaurav gravatar image gaurav  ( 2017-12-04 06:06:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-11-30 02:38:21 -0500

gvdhoorn gravatar image

updated 2017-12-04 05:14:33 -0500

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.

edit flag offensive delete link more

Comments

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.

gaurav gravatar image gaurav  ( 2017-12-04 03:38:23 -0500 )edit

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?

gvdhoorn gravatar image gvdhoorn  ( 2017-12-04 03:39:41 -0500 )edit

Question Tools

Stats

Asked: 2017-11-29 23:42:53 -0500

Seen: 2,109 times

Last updated: Dec 04 '17