A C++ Module for new robotics-based product of ACME Robotics using high-quality engineering practices for development of Multi-robots/ swarm actions using swarm algorithms with 20 or more robots simultaneously to arrange themselves in various geometric formations.
- Aneesh Chodisetty - 117359893
- Bhargav Kumar Soothram - 117041088
- Joseph Pranadeer Reddy Katakam - 117517958
- Introduction
- Deliverables
- Proposal Documentation
- Development Process
- UML Diagrams
- Dependencies and Tools
- Run the Software
- Code Coverage
- Unit Testing
- Code Analysis
Our team will be using ‘Kamikaze Robots' as the project code name to help protect Acme’s secret product plans. The name means ‘Divine Wind’ in Japanese and is inspired from the ‘Kamikaze swarm operation’ by company ‘STM’.
In this proposal, our team has focused on implementing one of the trending applications of swarm drones, which is to form different geometric shapes using a swarm of 20 or more drones.
In order to achieve this, state-of-art path-planning swarm algorithms will be deployed. The performance validation of this project will be done using the Gazebo simulation depicting a real-time demo of the application. Acme can then utilize this package in its 5-year robotics-based product roadmap.
- Proposal Documentation
- UML Diagrams
- Project Package with demonstrated OOPs concepts
- CI (Code Integration) using GitHub
- Code Coverage using Coveralls
- Unit Tests using Google Test Framework
- Developer Level Documentation
- Static code analysis with cppcheck
- Google C++ Style guide with cpplint validation
- Final Presentation resource: link
Box Bot
Demonstration
- Agile software development model will be used for the development process where tasks will be tracked using a backlog table.
- The software is designed in a Test-Driven Development fashion and implemented using Pair programming technique.
- The tasks will be outlined for every sprint and after each sprint, the roles of the pair-programming group will be interchanged.
- Using the Software Engineering Practices, all design and development work was followed Agile Iterative Process (AIP) where product backlog, iteration backlog, and work log were maintained usign appropriate measure. The Sheet can be accessed here
- Each sprint's notes and reviews have been documented here
-
The class diagram can be found here.
-
The flow of our system is as follows:
Name | Version | License |
---|---|---|
Ubuntu | 20.04(LTS) | FSF Licenses |
ROS 2 | Humble Hawksbill | Apache License 2.0 |
C++ | 14 | Creative Commons Attribution-ShareAlike 3.0 Unported License |
Cmake | 3.16.3 | BSD 3-clause License |
Usage/Type | Tool name | License |
---|---|---|
IDE | Visual Studio Code | MIT License |
CI pipeline | Github CI | Creative Commons Attribution 4.0 |
Code coverage | Coveralls | Coveralls, LLC |
Running tests | Gtests | BSD 3-Clause "New" or "Revised" License |
# overlay
source /opt/ros/foxy/setup.bash
git clone https://github.com/roboticistjoseph/Kamikaze-Robots.git
# fresh build of packages
cd Kamikaze-Robots/
colcon build --packages-select box_bot_description
colcon build --packages-select box_bot_gazebo
colcon build --packages-select kamikaze
If build fails, re-run the above build commands after following the one's below.
cd ~/Kamikaze-Robots/
# remove any existing build files
rm -rf build/box_bot_description
rm -rf build/box_bot_gazebo
rm -rf build/kamikaze
Run the below commands in two different terminals
# underlay
source install/local_setup.bash
# Spawn 20 Bots in gazebo
ros2 launch box_bot_gazebo multi_box_bot_launch.py
# underlay
source install/local_setup.bash
# Control the formation of spawned Bots
ros2 run kamikaze swarm_controller
- In a new terminal, run the follwoing commands to Test the functionality of the cloned software.
cd ~/Kamikaze-Robots/
source install/setup.bash
colcon test --packages-select kamikaze
cat log/latest_test/kamikaze/stdout_stderr.log
Output should be:
1: [==========] Running 1 test from 1 test case. 1: [----------] Global test environment set-up. 1: [----------] 1 test from KamikazeTest 1: [ RUN ] KamikazeTest.BasicTest 1: [WARN] [1671132175.805364740] [basic_test]: New test started. 1: First Test. 1: [ OK ] KamikazeTest.BasicTest (12 ms) 1: [----------] 1 test from KamikazeTest (12 ms total) 1: 1: [----------] Global test environment tear-down 1: [==========] 1 test from 1 test case ran. (12 ms total) 1: [ PASSED ] 1 test. 1: Testing Complete. 1: -- run_test.py: return code 0 1: -- run_test.py: inject classname prefix into gtest result file '/home/joseph/ros2_ws2/src/Kamikaze-Robots/build/kamikaze/test_results/kamikaze/kamikaze_test.gtest.xml' 1: -- run_test.py: verify result file '/home/joseph/ros2_ws2/src/Kamikaze-Robots/build/kamikaze/test_results/kamikaze/kamikaze_test.gtest.xml' 1/1 Test #1: kamikaze_test .................... Passed 0.10 sec 100% tests passed, 0 tests failed out of 1 Label Time Summary: gtest = 0.10 sec*proc (1 test) Total Test time (real) = 0.10 sec
cd ~/Kamikaze-Robots/
# remove any existing build files
rm -rf build/kamikaze
# build with coverage
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="--coverage" --packages-select kamikaze
# to check log (example)
cat log/latest_build/kamikaze/stdout_stderr.log
source install/setup.bash
ros2 run kamikaze generate_coverage_report.bash
Running 'cpplint' and 'cppcheck' to check for coding style and detect bugs. (Navigate to root of this cloned repo each time.)
Change to the root directory of the package, /Kamikaze-Robots
, and run:
cd kamikaze/
cpplint --filter=-build/c++11,+build/c++17,-build/namespaces,-build/include_order ./src/*.cpp ./include/kamikaze/*.hpp > ../results/cpplint.txt
The results of running cpplint
can be found in /results/cpplint.txt
.
Change to the root directory of the package, /Kamikaze-Robots
, and run:
cd kamikaze/
cppcheck --enable=all --std=c++17 ./src/*.cpp ./include/kamikaze/*.hpp --suppress=missingIncludeSystem --suppress=unmatchedSuppression --suppress=unusedFunction --suppress=missingInclude --suppress=useInitializationList > ../results/cppcheck.txt
The results of running cppcheck
can be found in /results/cppcheck.txt
.
- No existing ROS2 repositories were forund to use as a reference.
- Compatibility issues were encountered with different ROS versions and packages.
- As ROS2 Humble is still in development mode, our team ran into various issues when using it. Hence, we had to switch to it's predecessor ROS2 foxy.
- Took time to understand developing a launch file to spawn multiple robots. Later, faced difficulties spawning 20 robots in a single gazebo environment.
- Factoring in the complexity of model file to be spawned, which greatly affects the simulation time.
- Coordinating each robot's location while planing each robot's goal.
- As our team is new to using rostests, Github 'codecov', Github CI, time was taken to understand each step and implement them.
- We ran into troubles maintaining 'version-control', hence we chose to keep the development branches to save progress after merging it to the master branch.
This project is licensed under the Apache 2.0 License and can be found in the LICENSE
file.