|
@@ -155,24 +155,39 @@ Launch the O3DE Editor (in the Project directory):
|
|
|
build/linux/bin/profile/Editor
|
|
|
```
|
|
|
|
|
|
+## Building the Navigation package
|
|
|
+
|
|
|
+To build the ROS 2 navigation stack configured for this Project, please follow this [repository](https://github.com/RobotecAI/o3de_kraken_nav). Do not run it yet if you wish to follow the demo scenario.
|
|
|
+
|
|
|
# Running the demo scenario
|
|
|
|
|
|
You can try out the demo scenario as presented during ROSCon 2022. Take the following steps:
|
|
|
|
|
|
1. Launch the Editor and select the Main level. Allow it to load.
|
|
|
-2. Run the simulation with `Ctrl-G` or by pressing the Play button in the Editor. When it loads, you should be able to see the Apple Kraken.
|
|
|
-3. Once the simulation is running, start the [navigation stack](https://github.com/RobotecAI/o3de_kraken_nav). If you followed all the instructions, launch it with `ros2 launch o3de_kraken_nav navigation.launch.py`. You should see a new Rviz2 window.
|
|
|
+2. Run the simulation with `Ctrl-G` or by pressing the Play button in the Editor.
|
|
|
+3. When it loads, spawn your first Apple Kraken using the following command: `ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_kraken_rusty', xml: 'line1'}'`.
|
|
|
+ 1. You can learn more about spawning in [this section](#spawning-krakens)
|
|
|
+3. Once the simulation is running, start the [navigation stack](https://github.com/RobotecAI/o3de_kraken_nav). If you followed all the instructions for setting it up, do the following:
|
|
|
+ 1. launch the stack for the first robot with `ros2 launch o3de_kraken_nav navigation_multi.launch.py namespace:=apple_kraken_rusty_1 rviz:=True`.
|
|
|
+ 1. You should see a new Rviz2 window.
|
|
|
+ 1. Note that the number index `_1` has been added to the namespace when it was automatically generated by the Spawner.
|
|
|
4. Using RViz2, set the navigation goal using a widget in the toolbar (`2D Goal Pose`). You need to click and drag to indicate direction the robot will be facing. Make sure to set the goal next to an apple tree, to have the tree on the right side. Not too close, not too far. You can set subsequent goals for the robot to move around.
|
|
|
+ 1. As configured in our package, RViz2 has additional `2D Goal Pose` buttons which are hard-set to work with specific robot namespaces.
|
|
|
+ 1. Use the button first to the left.
|
|
|
5. Once the robot arrives and stops next to the tree, you can [trigger apple gathering](#triggering-apple-gathering).
|
|
|
-6. Either wait for the robot to complete its job (gather all reachable apples) or cancel the gathering through the `/cancel_apple_gathering` service.
|
|
|
+6. Either wait for the robot to complete its job (gather all reachable apples) or cancel the gathering through the `/apple_kraken_rusty_1/cancel_apple_gathering` service.
|
|
|
7. Select another navigation goal for the robot.
|
|
|
-8. [Spawn another Apple Kraken](#spawn-more-krakens).
|
|
|
+8. Spawn three other Krakens:
|
|
|
+ 1. `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'}'`
|
|
|
+ 1. You can also navigate with them using remaining `2D Goal Pose` buttons and trigger gathering events.
|
|
|
|
|
|
## Controlling the Apple Kraken
|
|
|
|
|
|
### Navigation
|
|
|
|
|
|
-To run ROS 2 navigation stack with this Project, please use this [repo](https://github.com/RobotecAI/o3de_kraken_nav) for necessary instructions and packages.
|
|
|
+Please refer to [Kraken navigation project](https://github.com/RobotecAI/o3de_kraken_nav) for instructions.
|
|
|
|
|
|
### Triggering Apple Gathering
|
|
|
|
|
@@ -182,17 +197,17 @@ Check available services in a terminal using this command:
|
|
|
|
|
|
If your simulation is running, you should be able to see the apple gathering service(s) listed there.
|
|
|
|
|
|
-- It should be named `/trigger_apple_gathering`. It might include a namespace.
|
|
|
+- It should be named `/apple_kraken_rusty_1/trigger_apple_gathering`. It might have another namespace.
|
|
|
|
|
|
If Apple Kraken is in position, next to a tree, you can trigger apple gathering with this command:
|
|
|
|
|
|
-- `ros2 service call /trigger_apple_gathering std_srvs/srv/Trigger`
|
|
|
+- `ros2 service call /apple_kraken_rusty_1/trigger_apple_gathering std_srvs/srv/Trigger`
|
|
|
|
|
|
You can also cancel a gathering operation in progress by calling another service:
|
|
|
|
|
|
-- `ros2 service call /cancel_apple_gathering std_srvs/srv/Trigger`
|
|
|
+- `ros2 service call /apple_kraken_rusty_1/cancel_apple_gathering std_srvs/srv/Trigger`
|
|
|
|
|
|
-### Spawning more Krakens
|
|
|
+### Spawning Krakens
|
|
|
|
|
|
Please read the following section on [Robot Spawner](https://github.com/RobotecAI/o3de-ros2-gem/blob/development/docs/guides/ros2-gem.md#spawner).
|
|
|
|
|
@@ -241,7 +256,7 @@ ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: 'apple_krake
|
|
|
- `ros2 topic list` should include `/clock`, `/tf` and `/tf_static` regardless of robot presence.
|
|
|
- topic list should also include `/pc`, `/ackermann_vel` and `/ground_truth_3D_detection` if there is a robot in the
|
|
|
scene and simulation is running.
|
|
|
- - note that with multiple robots, these topics will be namespaced.
|
|
|
+ - note that these topics will be namespaced.
|
|
|
- `ros2 service list` should also show several simulation and robot services such as spawning and apple gathering.
|
|
|
|
|
|
## Other
|