Skip to content

Commit

Permalink
Merge branch 'ivanpauno/add-imu-support-to-base-pkg' into ivanpauno/a…
Browse files Browse the repository at this point in the history
…ndino-imu-rebased
  • Loading branch information
jballoffet authored Aug 9, 2024
2 parents 6904fd5 + 9f495b8 commit 57d98d1
Show file tree
Hide file tree
Showing 66 changed files with 2,543 additions and 377 deletions.
5 changes: 1 addition & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ before and after the PR.-->
## Checklist
- [ ] Signed all commits for DCO
- [ ] Added tests
- [ ] Added example and/or tutorial
- [ ] Updated documentation (as needed)
- [ ] Updated migration guide (as needed)
- [ ] Consider updating Python bindings (if it affects the public API)

**Note to maintainers**: Remember to use **Squash-Merge** and edit the commit message to match the pull request summary while retaining `Signed-off-by` messages.

Expand All @@ -41,7 +40,5 @@ context (e.g., screenshots, gifs) if appropriate.-->
- [ ] Added tests
- [ ] Added example and/or tutorial
- [ ] Updated documentation (as needed)
- [ ] Updated migration guide (as needed)
- [ ] Consider updating Python bindings (if it affects the public API)

**Note to maintainers**: Remember to use **Squash-Merge** and edit the commit message to match the pull request summary while retaining `Signed-off-by` messages.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
- uses: ros-tooling/[email protected]
id: action_ros_ci_step
with:
package-name: andino_base andino_bringup andino_control andino_description andino_firmware andino_hardware andino_slam andino_gz_classic andino_navigation
package-name: andino_base andino_bringup andino_control andino_description andino_firmware andino_hardware andino_slam andino_gz_classic andino_navigation andino_apps
target-ros2-distro: ${{ env.ROS_DISTRO }}
import-token: ${{ secrets.GITHUB_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/mcu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# BSD 3-Clause License
#
# Copyright (c) 2023, 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.
name: MCU CI

on:
push:
branches:
- humble
pull_request:
branches:
- humble
workflow_dispatch:

jobs:
build_and_test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build application
working-directory: ./andino_firmware
run: pio run
- name: Run unit tests
working-directory: ./andino_firmware
run: pio test --environment=desktop
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

# Visual Studio Code files
.vscode

# PyCache
*.pyc
60 changes: 45 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@ _Note: For videos go to [Media](#selfie-media) section._
- :hammer_and_pick: [`andino_firmware`](./andino_firmware): Contains the code be run in the microcontroller for interfacing low level hardware with the SBC.
- :gear: [`andino_base`](./andino_base): [ROS Control hardware interface](https://control.ros.org/master/doc/ros2_control/hardware_interface/doc/writing_new_hardware_interface.html) is implemented.
- :control_knobs: [`andino_control`](./andino_control/): It launches the [`controller_manager`](https://control.ros.org/humble/doc/ros2_control/controller_manager/doc/userdoc.html) along with the [ros2 controllers](https://control.ros.org/master/doc/ros2_controllers/doc/controllers_index.html): [diff_drive_controller](https://control.ros.org/master/doc/ros2_controllers/diff_drive_controller/doc/userdoc.html) and the [joint_state_broadcaster](https://control.ros.org/master/doc/ros2_controllers/joint_state_broadcaster/doc/userdoc.html).
- :computer: [`andino_gz_classic`](./andino_gz_classic/): Gazebo simulation of the `andino` robot.
- :computer: [`andino_gz_classic`](./andino_gz_classic/): [Gazebo Classic](https://classic.gazebosim.org/) simulation of the `andino` robot.
- :world_map: [`andino_slam`](./andino_slam/): Provides support for SLAM with your `andino` robot.
- :compass: [`andino_navigation`](./andino_navigation/): Navigation stack based on `nav2`.
- :exclamation: [`andino_apps`](./andino_apps/): Integrated applications with the `andino` robot.

## :paperclips: Related projects

Other projects built upon Andino! :rocket:

- :test_tube: [`andino_integration_tests`](https://github.com/Ekumen-OS/andino_integration_tests): Extension to the Andino robot showing how to build integration tests.
- :computer: [`andino_gz`](https://github.com/Ekumen-OS/andino_gz): [Gazebo](https://gazebosim.org/home)(non-classic) simulation of the `andino` robot.
- :lady_beetle: [`andino_webots`](https://github.com/Ekumen-OS/andino_webots): [Webots](https://github.com/cyberbotics/webots) simulation of the Andino robot fully integrated with ROS 2.
- :joystick: [`andino_o3de`](https://github.com/Ekumen-OS/andino_o3de): [O3DE](https://o3de.org/) simulation of the Andino robot.
- :green_circle: [`andino_isaac`](https://github.com/Ekumen-OS/andino_isaac): [Isaac Sim](https://docs.omniverse.nvidia.com/isaacsim/latest/index.html) simulation of the Andino robot.
- :test_tube: [`andino_integration_tests`](https://github.com/Ekumen-OS/andino_integration_tests): Extension to the Andino robot showing how to build integration tests.

## :pick: Robot Assembly

Expand Down Expand Up @@ -104,6 +108,12 @@ source install/setup.bash

`Note`: Whether your are installing the packages in your dev machine or in your robot the procedure is the same.

### Install the binaries

The packages have been also released via ROS package manager system for the 'humble' distro. You can check them [here](https://repo.ros2.org/status_page/ros_humble_default.html?q=andino).

These packages can be installed using `apt` (e.g: `sudo apt install ros-humble-andino-description`) or using `rosdep`.

## :rocket: Usage

### Robot bringup
Expand All @@ -122,17 +132,38 @@ By default sensors like the camera and the lidar are initialized. This can be di
- include_rplidar: `true` as default.
- include_camera: `true` as default.

After the robot is launched, use `ROS 2 CLI` for inspecting environment. E.g: By doing `ros2 topic list` the available topics can be displayed.
After the robot is launched, use `ROS 2 CLI` for inspecting environment.
For example, by doing `ros2 topic list` the available topics can be displayed:

/camera_info
/cmd_vel
/image_raw
/odom
/robot_description
/scan
/tf
/tf_static

_Note: Showing just some of them_

### Teleoperation

Launch files for using the keyboard or a joystick for teleoperating the robot are provided.

[`twist_mux`](http://wiki.ros.org/twist_mux) is used to at the same time accept command velocities from different topics using certain priority for each one of them (See [twist_mux config](andino_bringup/config/twist_mux.yaml)). Available topics are (ordering by priority):
#### Keyboard

```
ros2 launch andino_bringup teleop_keyboard.launch.py
```
This is similarly to just executing `ros2 run teleop_twist_keyboard teleop_twist_keyboard`.

#### Joystick

- cmd_vel
- cmd_vel_keyboard
- cmd_vel_joy
Using a joystick for teleoperating is notably better.
You need the joystick configured as explained [here](andino_hardware/README.md#Using-joystick-for-teleoperation).
```
ros2 launch andino_bringup teleop_joystick.launch.py
```

### RViz

Expand All @@ -144,20 +175,19 @@ ros2 launch andino_bringup rviz.launch.py

For starting `rviz2` visualization with a provided configuration.

## :computer: Simulation

The [`andino_gz_classic`](./andino_gz_classic/README.MD) package provides a Gazebo simulation fo the Andino robot.

<img src="./andino_gz_classic/docs/andino_gz_classic.png" width=400/>

## :compass: Navigation

The [`andino_navigation`](./andino_navigation/README.md) package provides a navigation stack based on the great [Nav2](https://github.com/ros-planning/navigation2) package.

https://github.com/Ekumen-OS/andino/assets/53065142/29951e74-e604-4a6e-80fc-421c0c6d8fee

_Important!: At the moment this package is only working with the simulation. The support for the real robot is forthcoming._
Follow the [`andino_navigation`'s README](./andino_navigation/README.md) instructions for bringing up the Navigation stack in the real robot or in the simulation.

## :computer: Simulation

The [`andino_gz_classic`](./andino_gz_classic/README.MD) package provides a Gazebo simulation for the Andino robot.

<img src="./andino_gz_classic/docs/andino_gz_classic.png" width=400/>

## :selfie: Media

Expand Down Expand Up @@ -192,7 +222,7 @@ This section is dedicated to recognizing and expressing gratitude to the open-so

## :raised_hands: Contributing

Issues or PRs are always welcome! Please refer to [CONTRIBUTING](CONTRIBUTING.md) doc.
Issues or PRs are always welcome! Please refer to [CONTRIBUTING](CONTRIBUTING.md) doc.

## Code development

Expand Down
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
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.
25 changes: 25 additions & 0 deletions andino_apps/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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>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>
26 changes: 26 additions & 0 deletions andino_bringup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# andino_bringup

## Description
This package contains mainly launch files in order to launch all related driver and nodes to be used in the real robot. Some configuration files are also added to set up the nodes launched in the 'config' folder.

## Launch Files

### Main file

The main launch file is the `andino_robot.launch.py` file. This file executes all necessary nodes for Andino Robot to work.

It includes:

- `andino_description.launch.py`: file to load the 3D model of the robot from the URDF.
- `andino_control.launch.py`: file for the `ros2_control` nodes and drivers.
- `camera.launch.py`: file to execute the camera drivers, using `v4l2_camera` package. If not necessary, it can be disabled using the `include_camera` parameter.
- `rplidar.launch.py`: file to execute the drivers of the RP 2D LiDAR attached to the robot. If not necessary, it can be disabled using the `include_rplidar` parameter.

### Other launch files included

These launch files are included just in case you want to command the robot in different ways, or visualize the information:

- `rosbag_record.launch.py`: executes the `ros2 bag record` command to store a '.bag' file with the specified topics. If no topics are specified, it will record all of them.
- `rviz.launch.py`: executes the RViz visualization tool with the 'andino.rviz' configuration by default, to be able to visualize the 3D model of the robot and information from the topics.
- `teleop_joystick.launch.py`: this file allows you to command the robot using a controller with a joystick, using the `teleop_twist_joy` and the `joy_linux` packages.
- `teleop_keyboard.launch.py`: this file allows you to command the robot using a keyboard, using the `teleop_twist_keyboard` package.
9 changes: 0 additions & 9 deletions andino_bringup/launch/andino_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,11 @@ def generate_launch_description():
rplidar_timer = TimerAction(period=3.0, actions=[include_rplidar])
camera_timer = TimerAction(period=3.0, actions=[include_camera])

twist_mux_params = os.path.join(pkg_andino_bringup,'config','twist_mux.yaml')
twist_mux = Node(
package="twist_mux",
executable="twist_mux",
parameters=[twist_mux_params],
remappings=[('/cmd_vel_out','/diff_controller/cmd_vel_unstamped')]
)

return LaunchDescription([
include_andino_description,
andino_control_timer,
camera_arg,
camera_timer,
rplidar_arg,
rplidar_timer,
twist_mux,
])
2 changes: 1 addition & 1 deletion andino_bringup/launch/teleop_joystick.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def generate_launch_description():

cmd_vel_topic_arg = DeclareLaunchArgument(
'cmd_vel_topic',
default_value='/cmd_vel_joy',
default_value='/cmd_vel',
description='Indicates the cmd_vel topic.')
cmd_vel_topic = LaunchConfiguration('cmd_vel_topic')

Expand Down
1 change: 0 additions & 1 deletion andino_bringup/launch/teleop_keyboard.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def generate_launch_description():
package='teleop_twist_keyboard',
executable='teleop_twist_keyboard',
name='teleop_twist_keyboard_node',
remappings=[('/cmd_vel','/cmd_vel_keyboard')],
output='screen',
prefix = 'xterm -e',
)
Expand Down
Loading

0 comments on commit 57d98d1

Please sign in to comment.