-
Notifications
You must be signed in to change notification settings - Fork 3
DIARC ROS
In order to use ROS with DIARC, Java files must be autogenerated from your local ROS packages.
- Source your ROS workspaces
source /my/catkin/ws/devel/setup.bash
- Clone diarcros_core (which includes rosjava)
git clone https://github.com/hrilabtufts/diarcros_core.git
- In the diarcros_core repo, run the following command:
./gradlew buildAndPublishDiarcRos
You should now be able to use ROS packages in DIARC.
By default, using ROS with DIARC is disabled. In order to enable it, edit your personal gradle.properties (in ~/.gradle/gradle.properties) to have the following properties:
diarc.rosVersion=yourRosDistro
diarc.enableRos=true
If your project uses ROS out of the box (i.e. no third party packages, no custom messages), you can now run DIARC components and DIARC configurations that use ROS using the method outlined in the top-level readme (i.e., ./gradlew launch -Pmain=<>).
If your project uses third party ROS packages such as kortex, fetch, ihmc, etc, you can specify these dependencies in two ways:
-
When running
launch, add the-Pdiarc.rosPackagesflag, followed by a list of the packages you need, e.g.:./gradlew launch -Pmain=example.config -Pdiarc.rosPackages="rospackage1, rospackage2, rospackage3" -
Add the packages you want to your personal gradle.properties, e.g.:
diarc.rosPackages=rospackage1, rospackage2, rospackage3Dependencies added this way will be applied to ALL configs on run in this project, but are overridden by method 1.
See the list below for a list of supported packages.
-
moveit
-
map
-
movebase
-
kortex
-
fetch
-
lidar
-
imu
-
pr2
-
spot
-
tower
-
vision
- Requires installation of https://github.com/hrilabtufts/diarc_vision_ros
In the build.gradle.kts in the diarcRos subproject, add your new package and its sources like so:
addRosSource("examplePackageName", listOf(
"edu/tufts/hrilab/examplePackage/*",
"edu/tufts/hrilab/diarcros/examplePackage/*",
), listOf("exampleDependencyName1", "exampleDependencyName2"))
The final argument can be fully omitted if your package has no dependencies.