ros-industrial-attic / workcell_explorer

Repository for GSoC 2018 focusing on creation of a ROS package for Robotic Workcell exploration
Apache License 2.0
11 stars 6 forks source link

Creating a new .rosinstall file #2

Closed aadityasaraiya closed 6 years ago

aadityasaraiya commented 6 years ago

Hi!

So as per @gavanderhoorn's advice, I was trying to replace sub-modules from this repository and use a .rosinstall file instead to populate the workspace.

To get a better understanding of how .rosinstall work, I referred to this answer as well as this answer regarding wstool.

However, I am still confused about how to go about writing a .rosinstall file. I did find the .rosinstall format on ROS Install API information as well as an example .rosinstall file by OSL. However, my confusion is do I have to go about manually writing my own .rosinstall file or is there some better way to go about it?

I used the ROS Install Generator which has been mentioned in this answer but it didn't seem to work properly.

Sorry for the delay in completing this task. I am trying to get it done as soon as possible now.

Thanks in advance.

gavanderhoorn commented 6 years ago

@aadityasaraiya wrote:

However, my confusion is do I have to go about manually writing my own .rosinstall file or is there some better way to go about it?

how many dependencies / source repositories do you have? If only a handful, writing a .rosinstall file by hand takes minutes.

If you really want to use a tool, use wstool. It uses .rosinstall files to do its bookkeeping:

$ source /opt/ros/.../setup.bash
$ mkdir /some/catkin_ws/src
$ cd /some/catkin_ws/src
$ wstool init .
$ wstool set --git industrial_core https://github.com/ros-industrial/industrial_core.git
$ wstool up

At this point the .rosinstall file that is there is something you could use.

See the help of wstool set for more info on that command.

gavanderhoorn commented 6 years ago

And here is another example of a .rosinstall file: ros-industrial-consortium/godel/godel.rosinstall.

aadityasaraiya commented 6 years ago

@gavanderhoorn Thanks a lot. So with the example usage of wstool which you have given, I understood how an autogenerated .rosinstall will look like and hence writing one manually also seems possible.

So basically when a user uses a similar chain of commands for this repository as from the Godel Repository:

$ wstool init . 
$ wstool merge https://github.com/ros-industrial/workcell_explorer/raw/kinetic-devel/workcell_explorer.rosinstall
$ wstool update
$ rosdep install --from-paths . --ignore-src

they will have a workcell_explorer package, and the packages such as industrial_core and universal_robot (downloaded using the .rosinstall file) in their src directory. The workcell_explorer package will itself have the internal folders such as myworkcell_core and myworkcell_support etc.

Is my understanding correct?

gavanderhoorn commented 6 years ago

you can actually merge the three wstool lines:

$ cd /path/to/catkin_ws
$ wstool init src https://github.com/ros-industrial/workcell_explorer/raw/kinetic-devel/workcell_explorer.rosinstall
$ rosdep install --ignore-src --from-paths src

If you also list the workcell_explorer repository in your .rosinstall, the workspace would now contain all the packages that are in your .rosinstall file, and after rosdep completes all dependencies should also be installed.

aadityasaraiya commented 6 years ago

Thank you so much @gavanderhoorn. The changes have been made and I have tested it locally. Does the job.

aadityasaraiya commented 6 years ago

Sorry! I reopened the issue initially because I thought I had an issue. However, that thing is solved now.