Skip to content

Commit 59c1a60

Browse files
Joshua WhitleyJWhitleyWork
andauthored
Update instructions after repo split (#86)
* Add .repos file and update instructions after repo split. * Revert to git clone for repos instead of .repos file for now * Fixing typo * Updating options for how to source workspace * Add missing git clone to README Co-authored-by: Joshua Whitley <[email protected]>
1 parent e87ddd6 commit 59c1a60

File tree

2 files changed

+63
-80
lines changed

2 files changed

+63
-80
lines changed

README.md

Lines changed: 50 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ To install ROS2 Galactic:
4242

4343
Knowledge of ROS2 is not required in order to use KomatsuSim at the most basic level. More information on ROS2 can be found at [ROS](https://www.ros.org/).
4444

45-
### ROS-TCP-Endpoint
45+
### Create and Build a ROS2 Workspace
4646

47-
To install ROS-TCP-Endpoint:
48-
49-
1. Create a ROS workspace folder structure (https://docs.ros.org/en/foxy/Tutorials/Workspace/Creating-A-Workspace.html). We suggest `~/ros2_ws/src/`. Further instructions will assume that location.
47+
1. Create a ROS2 workspace folder structure (https://docs.ros.org/en/foxy/Tutorials/Workspace/Creating-A-Workspace.html). We suggest `~/ros2_ws/src/`. Further instructions will assume that location.
5048
```bash
5149
mkdir -p ~/ros2_ws/src
5250
```
@@ -57,121 +55,91 @@ To install ROS-TCP-Endpoint:
5755
cd ~/ros2_ws/src
5856
```
5957

60-
3. Clone ROS2 branch of https://github.com/Unity-Technologies/ROS-TCP-Endpoint.git into the `~/ros2_ws/src` directory:
58+
3. Clone the required repositories to your ROS2 workspace:
6159

6260
```bash
61+
git clone https://github.com/gaia-platform/danger_zone.git
62+
git clone https://github.com/gaia-platform/rosbag2_snapshot.git
6363
git clone -b ROS2 https://github.com/Unity-Technologies/ROS-TCP-Endpoint.git
6464
```
6565

66-
4. Move to the `~/ros2_ws` directory:
66+
4. Install all necessary dependencies using `rosdep`:
6767

68-
```bash
69-
cd ~/ros2_ws
70-
```
68+
```bash
69+
rosdep install --from-paths . -i -y
70+
```
7171

7272
5. Build the `~/ros2_ws` directory:
7373

7474
```bash
75+
cd ..
7576
colcon build
7677
```
7778

78-
6. Source the `~/ros2_ws` directory in .bashrc (not required but highly recommended):
79+
6. Source the `~/ros2_ws` directory:
7980

80-
```bash
81-
echo 'source ~/ros2_ws/install/local_setup.bash' >> ~/.bashrc
82-
```
83-
84-
### rosbag2_snapshot
85-
86-
To install rosbag2_snapshot we can use the previously created workspace:
87-
88-
1. Move into the `~/ros2_ws/src` directory:
81+
Option 1: add to your ~/.bashrc once (highly recommended):
8982

9083
```bash
91-
cd ~/ros2_ws/src
84+
echo 'source ~/ros2_ws/install/setup.bash' >> ~/.bashrc
85+
source ~/.bashrc
9286
```
93-
94-
2. Clone https://github.com/gaia-platform/rosbag2_snapshot.git into the `~/ros2_ws/src` directory:
95-
96-
```bash
97-
git clone https://github.com/gaia-platform/rosbag2_snapshot.git
98-
```
99-
100-
4. Move to the `~/ros2_ws` directory:
10187

88+
Option 2: source the directory in each new terminal:
10289
```bash
103-
cd ~/ros2_ws
90+
source ~/ros2_ws/install/setup.bash
10491
```
10592

106-
5. Build the `~/ros2_ws` directory:
93+
### KomatsuSimulator
10794

108-
```bash
109-
colcon build
110-
```
95+
KomatsuSimulator has two projects: 1) a Unity-based simulator and 2) a ROS2 project.
96+
The instructions above handle the ROS2 components but it is also necessary to download the KomatsuSimulator Unity project.
97+
If it is preferred to avoid building the Unity simulator then the GaiaMineSimVx.x.x.x.zip binary can be downloaded from [the releases page](https://github.com/gaia-platform/KomatsuSimulator/releases).
98+
GAIA typically recommends downloading the latest release.
99+
Downloading and using the simulator binary does not eliminate the need to follow the ROS2 instructions above, it just avoids having to build the Unity project from source.
111100

112-
### KomatsuSimulator
101+
#### Downloading and Using the Binary
102+
103+
1. Download GaiaMineSimVx.x.x.x.zip from the latest release at https://github.com/gaia-platform/KomatsuSimulator/releases
104+
2. Unzip in a location of your choice
105+
3. Run GaiaMineSim to verify operation.
106+
```bash
107+
./Builds/GaiaMine.x86_64
108+
```
113109

114-
KomatsuSimulator has two projects: 1) a Unity-based simulator and 2) a ROS project. In order to use KomatsuSimulator, it is necessary to install ROS2 and `git clone` the KomatsuSimulator repository. If it is preferred to avoid building the Unity simulator then the GaiaMineSimVx.x.x.x.zip binary can be downloaded from [the releases page](https://github.com/gaia-platform/KomatsuSimulator/releases). GAIA typically recommends downloading the latest release. Downloading and using the simulator binary does not eliminate the need to install ROS2 and `git clone` the KomatsuSimulator repo. The releases can be found here:
110+
#### Cloning and Building from Source
115111

116-
To install KomatsuSimulator:
112+
1. Install the latest 20x LTS build of the Unity Editor.
113+
2. Follow the Unity instructions [here](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/setup.md#-unity-setup) to install the Robotics package for Unity.
117114

118-
1. Create a directory for development. Here we will assume it is '~/dev', but feel free to use any location you wish.
115+
3. Create a directory for development. Here we will assume it is '~/dev', but feel free to use any location you wish.
119116
```bash
120117
mkdir ~/dev
121118
```
122119

123-
2. Move into the the `~/dev` directory.
120+
4. Move into the the `~/dev` directory.
124121
```bash
125122
cd ~/dev
126123
```
127124

128-
3. Git the KomatsuSimulator repo.
125+
5. Clone the KomatsuSimulator repo.
129126
```bash
130127
git clone https://github.com/gaia-platform/KomatsuSimulator.git
131128
```
132129

133-
4. Move into the KomatsuSimulator ROS2 workspace.
130+
6. Enter the KomatsuSimulator folder
134131
```bash
135-
cd ~/dev/KomatsuSimulator/Ros
132+
cd KomatsuSimulator
136133
```
137134

138-
5. Install ROS project's depedencies.
139-
```bash
140-
rosdep install -y -i --from-paths .
141-
```
135+
6. TODO(markwest): Please fill in build instructions when using source
142136

143-
6. Build the `~/dev/KomatsuSimulator/Ros` directory.
144-
```bash
145-
colcon build
146-
```
137+
# Usage
147138

148-
7. Source the `~/dev/KomatsuSimulator/Ros` directory in .bashrc (not required but highly recommended).
149-
```bash
150-
echo 'source ~/dev/KomatsuSimulator/Ros/install/local_setup.bash' >> ~/.bashrc
151-
```
152-
153-
8. To avoid building the Unity simulator:
154-
1. Download GaiaMineSimVx.x.x.x.zip from the latest release at https://github.com/gaia-platform/KomatsuSimulator/releases
155-
2. Unzip in a location of your choice
156-
3. Run GaiaMineSim to verify operation.
157-
```bash
158-
./Builds/GaiaMine.x86_64
159-
```
160-
161-
# USE
162-
163-
There are several levels of development possible. It is possible to work in only one level, with little to no involvement in the others.
164-
165-
1. Develop only Gaia schema and rules.
166-
2. Develop danger zone ROS2 code.
167-
3. Develop GaiaMineSim Simulator environments, game objects, and code.
168-
169-
## Develop only Gaia schema and rules
139+
## Startup all nodes at once
170140

171141
You can use the `full_launch.py` script to launch all the ROS nodes at once.
172142

173-
### Startup all nodes at once
174-
175143
1. Start all the ROS nodes
176144
- Open a terminal.
177145
- Call the full_launch.py script
@@ -189,7 +157,7 @@ You can use the `full_launch.py` script to launch all the ROS nodes at once.
189157
```
190158
- Leave terminal open.
191159

192-
### Startup nodes independently
160+
## Startup nodes independently
193161

194162
1. Start ros-unity bridge.
195163
- Open a terminal.
@@ -231,12 +199,14 @@ You can use the `full_launch.py` script to launch all the ROS nodes at once.
231199
```
232200
<ctrl>C
233201
```
202+
# Development
203+
204+
There are several levels of development possible. It is possible to work in only one level, with little to no involvement in the others.
234205

235-
The Gaia schema and rules are in the danger_zone ROS2 project. Standard ROS2 dev practices apply.
206+
1. Develop only Gaia schema and rules.
207+
2. Develop danger zone ROS2 code.
208+
3. Develop GaiaMineSim Simulator environments, game objects, and code.
236209

237-
## Releases
238-
If it is preferred to not install and build with Unity, the Simulator binaries can be downloaded [here](https://github.com/gaia-platform/KomatsuSimulator/releases).
210+
The Gaia schema and rules are in the [`danger_zone` ROS2 project](https://github.com/gaia-platform/danger_zone) which should be in the ROS2 workspace created earlier (e.g. `~/ros2_ws/src/danger_zone`). Standard [ROS2 developer best-practices](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html) apply.
239211

240-
## Unity setup
241-
1. Install the latest 20x LTS build of the Unity Editor.
242-
2. Follow the Unity instructions [here](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/setup.md#-unity-setup) to install the Robotics package for Unity.
212+
If you wish to develop the KomatsuSimulator Unity application, see the instructions above on Cloning and Building from Source.

komatsu.repos

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repositories:
2+
src/danger_zone:
3+
type: git
4+
url: https://github.com/gaia-platform/danger_zone.git
5+
version: main
6+
src/rosbag2_snapshot:
7+
type: git
8+
url: https://github.com/gaia-platform/rosbag2_snapshot.git
9+
version: main
10+
src/unity_tcp_endpoint:
11+
type: git
12+
url: https://github.com/Unity-Technologies/ROS-TCP-Endpoint.git
13+
version: ROS2

0 commit comments

Comments
 (0)