-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add README and remove private submodules
- Loading branch information
Showing
115 changed files
with
17,465 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Aqua.Bot 2023 | ||
|
||
![](assets/aquabot_cover.png) | ||
|
||
## About | ||
|
||
Aqua.Bot is a challenge organized by Sirehna (Naval Group) aimed at developing a program capable of controlling an Unmanned Surface Vehicle (USV) tasked with monitoring a maritime zone and relaying the positions of intruding vessels. | ||
|
||
The competition spanned 2 months, during which we developed two key modules: | ||
|
||
### Navigation | ||
The navigation module enables autonomous control of the drone within its environment. The initial objective involves reaching the buoy that delineates the search area where the threat is located. Subsequently, it demonstrates the capability to maneuver the surface drone while effectively tracking the identified threat. | ||
|
||
https://github.com/EthanDelage/aquabot/assets/50496792/67a0170c-d944-461a-99a4-69b9b991643f | ||
|
||
|
||
|
||
### Perception | ||
The perception module is designed to detect threats utilizing the camera and estimate their distance using lidar sensor. Threat recognition is achieved through color detection, while distance estimation involves projecting the lidar's 3D points onto the camera rendering. By leveraging the threat's distance and angle, the module can calculate its GPS position. | ||
|
||
https://github.com/EthanDelage/aquabot/assets/50496792/6377734d-59ac-47a8-b206-32733cc76101 | ||
|
||
For additional details, please refer to the report available: | ||
|
||
- [PDF report](assets/report.pdf) | ||
- [PowerPoint presentation](assets/presentation.pptx) | ||
|
||
## Usage | ||
|
||
### Dependencies | ||
|
||
- OpenCV 4.8.1 | ||
- Eigen3 | ||
- C++ 17 | ||
- Ros Humble | ||
- Gazebo Garden | ||
|
||
### Installation | ||
|
||
- Install [ROS 2 Humble](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html) | ||
- Install [Gazebo Garden](https://gazebosim.org/docs/garden/install_ubuntu) | ||
|
||
### Source Ros | ||
|
||
```shell | ||
source /opt/ros/humble/setup.sh | ||
``` | ||
|
||
### Build | ||
|
||
```shell | ||
make build | ||
. install/setup.sh | ||
``` | ||
|
||
### Run | ||
|
||
```shell | ||
make launch | ||
``` | ||
|
||
## Acknowledgments | ||
|
||
Following two months of dedicated research and hard work, we are proud to announce that we earned **SECOND PLACE** 🥈 in the competition! | ||
We would like to thank Sirehna and Naval Group for organizing the competition and supporting us. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Submodule aquabot
deleted from
92574d
Submodule aquabot-competitor
deleted from
52f17a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Aquabot_competitor | ||
|
||
# Installation | ||
|
||
Before preoceed to this installation you first needs to install vrx and aquabot simulation. | ||
|
||
## Step 1 : Aquabot repository | ||
|
||
Follow the aquabot installation steps first : | ||
[Aquabot repository](https://github.com/sirehna/Aquabot) | ||
|
||
## Step 2 : Additional dependencies | ||
|
||
Install OpenCV dependency : | ||
``` | ||
sudo apt install libopencv-dev python3-opencv | ||
``` | ||
|
||
## Step 3 : Aquabot_competitor | ||
|
||
Clone this respository inside "~/vrx_ws/src" folder | ||
* Important : File path of this readme should be ~/vrx_ws/src/aquabot_competitor/README.md | ||
|
||
Build : | ||
``` | ||
cd ~/vrx_ws | ||
colcon build --merge-install | ||
. install/setup.bash | ||
``` | ||
|
||
# Commands | ||
|
||
List of helpful commands and tips. | ||
|
||
**Creating your participation package** | ||
|
||
To create a package you can create a sub folder and implement the 2 nessessary files (CMakeLists.txt and package.xml) or simply use the next command. | ||
|
||
``` | ||
cd ~/vrx_ws/src/aquabot_competitor | ||
ros2 pkg create --build-type ament_cmake --node-name my_team_node my_team_package | ||
``` | ||
|
||
**Compile our package :** | ||
``` | ||
cd ~/vrx_ws | ||
colcon build --merge-install | ||
. install/setup.bash | ||
``` | ||
|
||
**Run our node (C++ or Python):** | ||
|
||
To run a ros node you can use 'ros2 run' command : | ||
``` | ||
ros2 run package_example example_node_cpp | ||
ros2 run package_example example_node.py | ||
``` | ||
|
||
**Monitor our topics using commands** | ||
In an other terminal you can read our "status_string" topic : | ||
``` | ||
source /opt/ros/humble/setup.bash | ||
ros2 topic echo status_string | ||
``` | ||
|
||
**Monitor our topics using RQT** | ||
RQT is a powerfull toolbox that contains many ros tools : | ||
``` | ||
source /opt/ros/humble/setup.bash | ||
rqt | ||
``` | ||
|
||
**Monitor our topics using rviz** | ||
RVIZ2 is a powerfull visualization tool that provides a 3D graphical interface to visualize and | ||
interact with ros environnement, such as sensor data, robot models, and trajectories. | ||
It allows users to monitor and debug their robot systems in a user-friendly and intuitive manner. | ||
|
||
After start a simulation you can start rviz2 : | ||
``` | ||
rviz2 | ||
``` | ||
Then you can press Add -> By topic and select what you want to see. | ||
|
||
**Start the competition simulation** | ||
|
||
Without the gazebo graphical environnement. (lightweight) I recommend it for non GPU configurations. | ||
|
||
|
||
## Permanent sourcing and aliases | ||
|
||
I share my additions to the "bashrc" file : | ||
|
||
``` | ||
gedit ~/.bashrc | ||
``` | ||
|
||
Add these lines have everythink sourced when starting new terminal : | ||
``` | ||
# Source ROS Humble | ||
source /opt/ros/humble/setup.bash | ||
# Source VRX Workspace | ||
source ~/vrx_ws/install/setup.bash | ||
``` | ||
|
||
Add these lines to add 3 alias to build, source and code for the project : | ||
``` | ||
# Add Alias | ||
alias aquabot_build='cd ~/vrx_ws && colcon build --merge-install' | ||
alias aquabot_source='source ~/vrx_ws/install/setup.bash' | ||
alias aquabot_code='code ~/vrx_ws/src/aquabot_competitor' | ||
``` | ||
|
||
|
||
## Example content (aquabot_examples): | ||
|
||
This project already contains example content inside aquabot_example folder | ||
- package_example | ||
- opencv_example | ||
- aquabot_example | ||
|
||
These are 3 package that contains cpp and python nodes that can serve as examples packages. | ||
|
||
### package_example | ||
|
||
This is a simple package example, contain cpp and python node examples. | ||
|
||
You can refer to this ROS tutorial : | ||
Link : https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Publisher-And-Subscriber.html | ||
|
||
### opencv_example | ||
|
||
This is a opencv example package, you can refer to this example for opencv implementation. | ||
|
||
Contains 2 nodes : | ||
CPP Node : minimal_opencv_ros2_node | ||
Creates and publish random_image | ||
|
||
Python Node : minimal_opencv_subscriber | ||
Subscribe to the random_image topic and show the image | ||
|
||
### aquabot_example | ||
|
||
This is an example applied to the aquabot competition | ||
|
||
Contains 1 node : | ||
CPP Node : That moves the motor and retrieve that position |
48 changes: 48 additions & 0 deletions
48
src/aquabot-competitor/aquabot_examples/aquabot_example/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(aquabot_example) | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
########################### | ||
|
||
|
||
# Find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(std_msgs REQUIRED) | ||
find_package(tf2 REQUIRED) | ||
find_package(tf2_ros REQUIRED) | ||
|
||
# Executables | ||
add_executable(aquabot_node src/aquabot_node.cpp) | ||
ament_target_dependencies(aquabot_node rclcpp std_msgs tf2 tf2_ros) | ||
target_include_directories(aquabot_node PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
target_compile_features(aquabot_node PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17 | ||
install(TARGETS aquabot_node | ||
DESTINATION lib/${PROJECT_NAME}) | ||
|
||
# Resources | ||
install(DIRECTORY | ||
launch | ||
DESTINATION share/${PROJECT_NAME}) | ||
|
||
|
||
########################### | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
# the following line skips the linter which checks for copyrights | ||
# comment the line when a copyright and license is added to all source files | ||
set(ament_cmake_copyright_FOUND TRUE) | ||
# the following line skips cpplint (only works in a git repo) | ||
# comment the line when this package is in a git repo and when | ||
# a copyright and license is added to all source files | ||
set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_package() |
37 changes: 37 additions & 0 deletions
37
src/aquabot-competitor/aquabot_examples/aquabot_example/launch/aquabot.launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from launch import LaunchDescription | ||
from launch.actions import IncludeLaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch_ros.actions import Node | ||
|
||
import os | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
def generate_launch_description(): | ||
ld = LaunchDescription() | ||
|
||
default_world_name = 'aquabot_regatta' | ||
world_arg = DeclareLaunchArgument( | ||
'world', | ||
default_value = default_world_name, | ||
description = 'World name') | ||
ld.add_action(world_arg) | ||
|
||
aquabot_competition_launch_file = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(get_package_share_directory('aquabot_gz'), | ||
'launch/competition.launch.py')), | ||
launch_arguments={}.items() | ||
) | ||
|
||
# Add executable aquabot_example aquabot_node | ||
aquabot_example_node = Node( | ||
package='aquabot_example', | ||
executable='aquabot_node', | ||
) | ||
|
||
ld.add_action(world_arg) | ||
ld.add_action(aquabot_competition_launch_file) | ||
ld.add_action(aquabot_example_node) | ||
|
||
return ld |
23 changes: 23 additions & 0 deletions
23
src/aquabot-competitor/aquabot_examples/aquabot_example/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?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>aquabot_example</name> | ||
<version>0.2.0</version> | ||
<description>TODO: Package description</description> | ||
<maintainer email="[email protected]">competitor</maintainer> | ||
<license>TODO: License declaration</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<depend>rclcpp</depend> | ||
<depend>std_msgs</depend> | ||
<depend>tf2</depend> | ||
<depend>tf2_ros</depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
Oops, something went wrong.