Skip to content

Commit

Permalink
Merge pull request #7 from llDev-Rootll/development
Browse files Browse the repository at this point in the history
End of Phase 2
  • Loading branch information
llDev-Rootll authored Dec 6, 2021
2 parents 5064971 + 9e2c4f8 commit 687ccff
Show file tree
Hide file tree
Showing 65 changed files with 8,686 additions and 3 deletions.
64 changes: 64 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"files.associations": {
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"array": "cpp",
"atomic": "cpp",
"strstream": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"chrono": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ratio": "cpp",
"set": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp"
}
}
32 changes: 32 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
cmake_minimum_required(VERSION 3.0.2)
project(alm)

add_compile_options(-std=c++11)


find_package(catkin REQUIRED COMPONENTS
actionlib
move_base_msgs
roscpp
tf2
tf2_ros
std_msgs
)
catkin_package()
include_directories(
include
${catkin_INCLUDE_DIRS}
)

add_executable(mow src/LawnMower.cpp src/NavigationUtils.cpp)
add_dependencies(mow ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(mow ${catkin_LIBRARIES})


#Testing block for rostest
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest_gtest(test_mow test/test.launch test/main.cpp)
target_link_libraries(test_mow ${catkin_LIBRARIES})
add_dependencies(mow test_mow ${catkin_EXPORTED_TARGETS})
endif()
64 changes: 61 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

# Autonomous Lawn Mower


# Autonomous Lawn Mower - ALM
[![Build Status](https://app.travis-ci.com/llDev-Rootll/Autonomous_Lawn_Mower.svg?branch=master)](https://app.travis-ci.com/llDev-Rootll/Autonomous_Lawn_Mower)
[![Coverage Status](https://coveralls.io/repos/github/llDev-Rootll/Autonomous_Lawn_Mower/badge.svg?branch=master)](https://coveralls.io/github/llDev-Rootll/Autonomous_Lawn_Mower?branch=master)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
Expand Down Expand Up @@ -32,11 +34,49 @@ The sprint planning notes can be found [here](https://docs.google.com/document/d

## System Architecture
The following shows the activity diagram for our proposed schema :
<img alt="activity" src="assets/activity_diag.png" width="75%" />
<img alt="activity" src="assets/activity_diag.png" width="50%" />

*Fig 1 : Activity Diagram*

The corresponding class diagram can be found [here](https://github.com/llDev-Rootll/Autonomous_Lawn_Mower/blob/master/UML/initial/Mower_Class_Diagram.pdf).
## Steps to install dependencies
Run the following commands to install the dependencies required:

Installing the ROS navigation stack:

sudo apt-get install ros-melodic-navigation
Installing the turtlebot3 dependencies:

sudo apt-get install ros-melodic-turtlebot3 ros-melodic-turtlebot3-msgs ros-melodic-turtlebot3-navigation ros-melodic-turtlebot3-simulations
## Steps to install the ALM package

Make a catkin workspace catkin_ws and run the following commands :


cd <path_to_ws>/catkin_ws/src
git clone https://github.com/llDev-Rootll/beginner_tutorials.git
cd ../
catkin_make
## Steps to run the simulation using the launch file
In a terminal run :

source devel/setup.bash
roslaunch alm spawn.launch
This spawns the turtlebot3 simulation in the custom world environment on the green lawn.

<img alt="world_gazebo" src="assets/world_gazebo.png" width="75%" />

*Fig 1 : Spawn the robot in the world*

In a terminal run the following to bring up the mowing routine node:

source devel/setup.bash
roslaunch alm mower.launch
This executes the lawn mowing simulation and bring up rviz for visualization of the different parameters.

<img alt="world_rviz" src="assets/world_rviz.png" width="75%" />

*Fig 1 : RVIZ visualisation*

## Phase 1

Expand All @@ -45,4 +85,22 @@ The corresponding class diagram can be found [here](https://github.com/llDev-Roo
- Quad chart, UMLs, Backlog Tables, and Sprint Planning sheet has been added.

Please refer to the backlog table, [here](https://docs.google.com/spreadsheets/d/1WAa7oFD4pA2sujA1pLWYuytpL0tj46f_C2mvmyDHtKc/edit#gid=241005242), for an exhaustive list of tasks completed in Phase 1.

## Phase 2

- The ROS package for autonomous lawn mowing was created
- The class structures were defined
- A new world to simulate our algoritm was created and mapped
- Major functions for waypoint navigation have been implemented
- A mock L shaped trajectory has been approximated for navigation
- UMLs have been revised
- Unit test case to check the quaternion conversion has been written
- Launch files to spawn the simulation, run the lawn mowing node and the unit tests have been written

Please refer to the backlog table, [here](https://docs.google.com/spreadsheets/d/1WAa7oFD4pA2sujA1pLWYuytpL0tj46f_C2mvmyDHtKc/edit#gid=241005242), for an exhaustive list of tasks completed in Phase 2.
## To Do

- Implement a proper trajectory for optimal mowing of the lawn
- Implement remaining functions
- Write unit tests for other modules
- Find alternative or best available method for running CI on travis and code coverage on coveralls

Binary file added UML/Revised/Revised_Class_Diagram.pdf
Binary file not shown.
Binary file added assets/world_gazebo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/world_rviz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions data/waypoints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.5 0.5 0
0.5 0.5 0
0 0 90
0.5 0.5 0
Binary file added docs/html/bc_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/bdwn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/closed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/doc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 687ccff

Please sign in to comment.