|
@@ -104,11 +104,112 @@ colcon build --symlink-install
|
|
|
|
|
|
1. [Build](https://github.com/aws-lumberyard/ROSConDemo#download-and-install) and run the `ROSConDemo`
|
|
|
2. Load level `Main`
|
|
|
+3. Start a simulation by hitting `CTRL+G`
|
|
|
|
|
|
-## Running the kraken stack for multiple vehicles
|
|
|
+## Usage scenario
|
|
|
+
|
|
|
+### Single robot teleoperation with joystick
|
|
|
+1. Make sure that you have ROS2 workspace sourced
|
|
|
+
|
|
|
+```bash
|
|
|
+cd ~/o3de_kraken_ws
|
|
|
+source ./install/setup.bash
|
|
|
+```
|
|
|
+
|
|
|
+2. Make sure that you have `CycleDDS` as middleware
|
|
|
+```bash
|
|
|
+export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
|
|
+```
|
|
|
+
|
|
|
+3. Start teleoperation launch, make sure that you have your joystick plugged in
|
|
|
+```bash
|
|
|
+ros2 launch o3de_kraken_nav teleop.launch.py namespace:=apple_kraken_rusty_1
|
|
|
+```
|
|
|
+
|
|
|
+4. Spawn a single robot
|
|
|
+```
|
|
|
+ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_kraken_rusty', xml: 'line1'}'
|
|
|
+```
|
|
|
+
|
|
|
+5. You should be able to drive the robot
|
|
|
+
|
|
|
+### Single robot navigation
|
|
|
+
|
|
|
+> Note: Slam is turned off by default since we have ground truth information about the robot's position from the simulator. However, it is possible to enable `slam_toolbox` forcefully. You can allow slam by adding `use_slam:=True` to the navigation launch command.
|
|
|
+
|
|
|
+
|
|
|
+1. Make sure that you have ROS2 workspace sourced
|
|
|
+
|
|
|
+```bash
|
|
|
+cd ~/o3de_kraken_ws
|
|
|
+source ./install/setup.bash
|
|
|
+```
|
|
|
+
|
|
|
+2. Make sure that you have `CycleDDS` as middleware
|
|
|
+```bash
|
|
|
+export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
|
|
+```
|
|
|
+
|
|
|
+3. Run the navigation stack
|
|
|
+
|
|
|
+```bash
|
|
|
+ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_rusty_1 rviz:=True
|
|
|
+```
|
|
|
+
|
|
|
+4. Spawn the robot
|
|
|
+```bash
|
|
|
+ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_kraken_rusty', xml: 'line1'}'
|
|
|
+```
|
|
|
+
|
|
|
+5. You should be able to send goal to the robot.
|
|
|
+Make sure that that you use only the first `2D Goal Pose`
|
|
|
+
|
|
|
+
|
|
|
+### Multiple robots navigation
|
|
|
|
|
|
> Note: Slam is turned off by default since we have ground truth information about the robot's position from the simulator. However, it is possible to enable `slam_toolbox` forcefully. You can allow slam by adding `use_slam:=True` to the navigation launch command.
|
|
|
|
|
|
+1. Make sure that you have ROS2 workspace sourced
|
|
|
+
|
|
|
+```bash
|
|
|
+cd ~/o3de_kraken_ws
|
|
|
+source ./install/setup.bash
|
|
|
+```
|
|
|
+
|
|
|
+2. Make sure that you have `CycleDDS` as middleware
|
|
|
+```bash
|
|
|
+export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
|
|
+```
|
|
|
+
|
|
|
+3. Run the first navigation stack with `Rviz` param set to `True`:
|
|
|
+
|
|
|
+```bash
|
|
|
+ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_rusty_1 rviz:=True
|
|
|
+```
|
|
|
+
|
|
|
+4. Run the navigation stack for rest of the robots (in different terminals, remember about points `1-2`):
|
|
|
+
|
|
|
+```bash
|
|
|
+ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_shiny_2 rviz:=False
|
|
|
+ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_rusty_3 rviz:=False
|
|
|
+ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_shiny_4 rviz:=False
|
|
|
+```
|
|
|
+
|
|
|
+5. Spawn multipel robots
|
|
|
+```bash
|
|
|
+ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_kraken_rusty', xml: 'line1'}' &&
|
|
|
+ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_kraken_shiny', xml: 'line2'}' &&
|
|
|
+ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_kraken_rusty', xml: 'line3'}' &&
|
|
|
+ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_kraken_shiny', xml: 'line4'}'
|
|
|
+```
|
|
|
+
|
|
|
+6. You should be able to send goals to multiple robots.
|
|
|
+
|
|
|
+### Multiple robots with Kraken stack
|
|
|
+
|
|
|
+In this scenario on top of four navigation stacks, the orchestrator nodes are executed.
|
|
|
+Those are providing navigation stacks with goals and trigger apple gathering.
|
|
|
+
|
|
|
1. Source the workspace
|
|
|
|
|
|
```bash
|
|
@@ -117,7 +218,6 @@ source ./install/setup.bash
|
|
|
```
|
|
|
|
|
|
2. Set up `CycloneDDS` rmw:
|
|
|
-
|
|
|
```bash
|
|
|
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
|
|
```
|
|
@@ -128,7 +228,7 @@ export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
|
|
ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_rusty_1 rviz:=True
|
|
|
```
|
|
|
|
|
|
-4. Run the navigation stack for rest of the robots (in different terminals, remember about points `1-3`):
|
|
|
+4. Run the navigation stack for the rest of the robots (in different terminals, remember about points `1-2`):
|
|
|
|
|
|
```bash
|
|
|
ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_shiny_2 rviz:=False
|
|
@@ -136,7 +236,7 @@ ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_r
|
|
|
ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_shiny_4 rviz:=False
|
|
|
```
|
|
|
|
|
|
-5. Run the orchestration nodes for all the robots (in speparate terminals):
|
|
|
+5. Run the orchestration nodes for all the robots (in separate terminals):
|
|
|
|
|
|
```bash
|
|
|
ros2 run o3de_kraken_orchestration kraken_orchestration_node --ros-args -p robot_name:=apple_kraken_rusty_1 -p spawn_line:=line1
|