Skip to content

Commit

Permalink
Add the installation from source for not released repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-nhg committed Dec 12, 2023
1 parent e04026b commit 942840f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject
import java.util.Set
import java.util.HashSet
import ros.Dependency
import ros.PackageDependency
import ros.Package
import system.Component
import system.RosNode
import ros.impl.AmentPackageImpl
Expand All @@ -29,6 +29,8 @@ class GeneratorHelpers {

AmentPackageImpl package_impl
List<CharSequence> PkgsList
ArrayList<String> RepoList

String Pkg
RosNode node
String[] FromFileInfo
Expand Down Expand Up @@ -57,6 +59,28 @@ class GeneratorHelpers {
}
return subSystemsList
}

def ArrayList<String> getAllRepos(System system) {
RepoList = new ArrayList<String>()
for (node : getNodes(system)){
if (!((node.from.eContainer.eContainer as Package).fromGitRepo.nullOrEmpty)) {
val repo=(node.from.eContainer.eContainer as Package).fromGitRepo
if (repo.contains(":")){
if (repo.split(":",2).get(1).contains(":")){
RepoList.add(repo.split(":",3).get(0)+":"+repo.split(":",3).get(1)+" -b "+repo.split(":",3).get(2))
} else {
RepoList.add(repo)
}
}
}
}
if (!system.subsystems.nullOrEmpty){
for (subsystem:system.subsystems) {
RepoList.addAll(getAllRepos(subsystem))
}
}
return RepoList;
}

def <String> getPkgsDependencies (System rossystem){
PkgsList = new ArrayList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ sudo apt install ros-ROSDISTRO-«system.fromFile.split("/",2).get(0).replace("_"

«ENDIF»

«IF !getAllRepos(system).empty»
### From source code
```
mkdir -p ros2_ws/src
cd ros2_ws/
«FOR repo:getAllRepos(system)»git clone «repo»«ENDFOR»
rosdep install --from-path src/ -i -y
colcon build
source install/setup.bash
```
«ENDIF»

## Usage

Expand Down

0 comments on commit 942840f

Please sign in to comment.