Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

andino_apps package created and andino_navigation package updated #235

Merged
merged 8 commits into from
Apr 19, 2024
9 changes: 9 additions & 0 deletions andino_apps/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package andino_apps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.1.0 (2024-04-10)
------------------
* Initial version of the package
* Moved launch file to execute Gazebo classic simulation + Nav2 from `andino_navigation` (`#228 <https://github.com/Ekumen-OS/andino/issues/228>`_)
* Contributors: Jesús Silva
agalbachicar marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 14 additions & 0 deletions andino_apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.8)
project(andino_apps)

# find dependencies
find_package(ament_cmake REQUIRED)

install(
DIRECTORY
launch
DESTINATION
share/${PROJECT_NAME}/
)

ament_package()
29 changes: 29 additions & 0 deletions andino_apps/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2024, Ekumen Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 changes: 28 additions & 0 deletions andino_apps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Andino Apps

This package contains integration applications with the Andino robot.

# Applications

## Gazebo classic simulation + Nav2

A launch file for running the andino_gz_classic simulation and the Nav 2 stack is provided.
It uses the [turtlebot3_world](https://github.com/ROBOTIS-GIT/turtlebot3_simulations/tree/master) world (_Apache 2 license_) by default.

```
ros2 launch andino_apps andino_simulation_navigation.launch.py
```

To visualize and interact with the Andino robot in RViz:

- Click in 2D pose estimate button and select the initial pose of the robot
- Click in Nav2 Goal button and select the final point.
- The robot will start to move to the selected goal.

![Rviz_example_Nav2](docs/Rviz_example_Nav2.gif)

For further information and examples you can check the [Nav2 tutorials](https://navigation.ros.org/tutorials/index.html).

This package has been tested with the Andino robot with `diff drive plugin` in Gazebo-classic.

By changing the world file, make sure to also change map file. Further navigation [parameters](params/nav2_params.yaml) tunning is recommended.
Binary file added andino_apps/docs/Rviz_example_Nav2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions andino_apps/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>andino_apps</name>
<version>0.1.0</version>
<description>Package for apps created with andino</description>
<author email="[email protected]">JesusSilvaUtrera</author>
<maintainer email="[email protected]">JesusSilvaUtrera</maintainer>
<maintainer email="[email protected]">Franco Cipollone</maintainer>
<license file="LICENSE">BSD Clause 3</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>ros2launch</exec_depend>
<exec_depend>andino_gz_classic</exec_depend>
<exec_depend>nav2_bringup</exec_depend>
<exec_depend>turtlebot3_gazebo</exec_depend>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to be explicit about turtlebot3_gazebo. IIRC nav2_bringup manages that dependency.
We are not directly using any turtlebot_gazebo asset. (If we use the world we use it via nav2_bringup)

<exec_depend>rviz2</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
39 changes: 19 additions & 20 deletions andino_navigation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,31 @@ We rely on [Nav2](https://github.com/ros-planning/navigation2) stack in order to
2. We need a previously recorded map in order to navigate on.
Refer to [andino_slam](../andino_slam/README.md) to learn how to record a map with Andino.

### Run nav stack
3. Run Nav 2 Stack (see instructions in [Run nav stack](#run-nav-stack)).

```sh
ros2 launch andino_navigation bringup.launch.py map:=<path-to-my-map-yaml-file>
```
## Simulation
agalbachicar marked this conversation as resolved.
Show resolved Hide resolved

By default, [config file](params/nav2_params.yaml) is used. For using a custom param file use:
```sh
ros2 launch andino_navigation bringup.launch.py map:=<path-to-my-map-yaml-file> params_file:=<path-to-my-param-file>
```
### Prerequisites

## Simulation
1. Andino simulation needs to be up and running. You can use several simulators, for example Gazebo Classic:
```sh
ros2 launch andino_gz_classic andino_one_robot.launch.py
```

A launch file for running the andino_gz_classic simulation and the nav2 stack is provided.
It uses the [turtlebot3_world](https://github.com/ROBOTIS-GIT/turtlebot3_simulations/tree/master) world (_Apache 2 license_) by default.
2. We need a previously recorded map in order to navigate on.
Refer to [andino_slam](../andino_slam/README.md) to learn how to record a map with Andino.

```
ros2 launch andino_navigation andino_simulation_navigation.launch.py
```
3. Run Nav 2 Stack (see instructions in [Run nav stack](#run-nav-stack)).

To test the navigation inside rviz:
<a name="runnavstack"></a>
## Run Nav Stack

- click in 2D pose estimate button and select the initial pose of the robot
- click in nav2 Goal button and select the final point.
- the robot will start to move to the selected goal.
```sh
ros2 launch andino_navigation bringup.launch.py map:=<path-to-my-map-yaml-file>
```

You test adding obstacles inside the Gazebo simulation or use the rviz button Waypoint/ nav through Poses mode to select sequential targets.
By default, [config file](params/nav2_params.yaml) is used. For using a custom param file use:

This package has been tested with the Andino robot with `diff drive plugin` in gazebo. If you change the world you should change the map but also it is recommended to tune navigation [parameters](params/nav2_params.yaml).
```sh
ros2 launch andino_navigation bringup.launch.py map:=<path-to-my-map-yaml-file> params_file:=<path-to-my-param-file>
```
3 changes: 0 additions & 3 deletions andino_navigation/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@

<build_depend>launch_ros</build_depend>

<exec_depend>andino_gz_classic</exec_depend>
<exec_depend>launch_ros</exec_depend>
<exec_depend>navigation2</exec_depend>
<exec_depend>nav2_bringup</exec_depend>
<exec_depend>turtlebot3_gazebo</exec_depend>
<exec_depend>rviz2</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand All @@ -28,4 +26,3 @@
<build_type>ament_cmake</build_type>
</export>
</package>

Loading