Skip to content

MIRΟR: A Middleware Software Tool for Interfacing Mobile Industrial Robots with Optimization Routing Algorithms

Notifications You must be signed in to change notification settings

EvangelosSyrmos/miror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIRΟR - A Middleware Software Tool for Interfacing Mobile Industrial Robots with Optimization Routing Algorithms

Landing Photo

This application was developed in order to create a sophisticated testing environment that applies routing optimization algorithms that solve the Travelling Salesman Problem to industial facility layouts, compares the results of the algorithmic outcomes and informs the effective and efficient routing solution. It is integrated with ROS, a robotic framework that provides tools such as Rviz for visualization, Gazebo 3D a simulation physics engine and Google OR an optimization suite that provides build-in algorithms that solve complex problems.

The software tool provides:

  • Import and test custom algorithms for TSP-Travelling Salesman Problem.

  • Evaluate the efficiency of the algorithms with graphs.

  • Test selected/imported algorithms in any given layout.

Prerequisites

Installation

Creat a ROS workspace for all the corresponding packages: catkin_ws

Clone the latest version into your catkin workspace and compile the package using ROS.

cd catkin_ws/src
git clone https://github.com/EvangelosSyrmos/miror.git

Move the turtlebot3_gazebo folder provided by MIROR in the catkin_ws/src.

Directory

Make the gui.py executable.

cd catkin_ws/src/miror/scripts
chmod +x gui.py
cd

Build the workspace:

cd catkin_ws
catkin_make

!If errors occur during the execution of catkin_make install any required packages missing from the ROS installation process.

Run MIROR

Start ROS Master node

roscore

Start Gazebo simulation

roslaunch turtlebot3_gazebo tsp_world.launch

Start ROS Navigation launch file

roslaunch miror tsp_navigation.launch

Start MIROR:

roslaunch miror tsp_gui.launch

Demo - Example

The following examples use the already provided 3D map in Gazebo.

Create and insert waypoints

To insert waypoints in Rviz, the steps are as follows:

  • Enter the number of waypoints in the placeholder as shown. Number of waypoints
  • Press the button Create waypoints and click the Rviz button Publish Point as shown for every point starting from the mobile robot. Number of waypoints in Rviz
  • Finally press the button Calculate costs to create a NxN cost matrix for all the possible routes. Calculate costs

Import and execute custom algorithms

To import a custom algorithm and assess the performance in comparison to the provided some conventions must be followed.

Conventions:

  • Create the python file in the specific directory catkin_ws/src/miror/scripts/algorithm/ folder.
  • The python file name must be identical to the class inside, e.g. abc.py.
  • The class must have a route list to store the waypoints, calculation time and route distance.
class Abc:
    def __init__(self, distance_matrix):
        self.distance_matrix = distance_matrix
        self.calculation_time = 4.5     # Float
        self._distance = 290            # Float/Int
        self.route = []                 # [0, 1, 2, 0] 

Execute custom algorithm

  • Type the name of the python file in the placeholder as shown. Custom_algorithm
  • Press the button Execute to run the custom algorithm and any selected algorithm from the list sequentialy.

Execute Google OR algorihtms

To execute any combination of the provided algorithms.

  • Select them by clicking on the checkboxes as shown. An indicator for the current selection of algorithms is provided for feedback. Select algorithms
  • Press the button Execute to run them sequentialy. Execute algorithms
  • A window with the results will pop with graphs. Graphs

Move mobile robot

After the results have been shown the best algorithm will be selected based on the smallest route distance. If all the solutions are equal the algorithm with the fastes computation time will selected.

  • Press the button Navigate to start the navigation of the mobile robot in the facility layout as shown. Navigation
  • The mobile robot will start moving with the best solution. navigation_GIF

NOTE

  • The user can execute multiple combinations of algorithms without the need of calculating the cost matrix every time.

  • Selecting different algorithms or importing custom can be done without the need to navigate the mobile robot.

Additional Information

Import custom world map

To import a custom map follow the instructions GazeboSim.

  • Use turtlebot3_slam to generate the occupancy grid Turtlebot3_Slam.

  • Save the generated maps.

rosrun map_server map_saver -f map
  • Move the generated files map.pgm and map.yaml to miror/maps and rename the old ones.

Local Search Metaheuristics

Local search strategies (Metaheuristics) known as optimizing algorihtms are enabled to run for 5 sec after the first solution has been given located in scripts/algorithms/google.py. Feel free to change the duration or option for large scale problems if needed.

self.search_parameters.local_search_metaheuristic = (routing_enums_pb2.LocalSearchMetaheuristic.GUIDED_LOCAL_SEARCH)
# self.search_parameters.local_search_metaheuristic = (routing_enums_pb2.LocalSearchMetaheuristic.AUTOMATIC)
# self.search_parameters.local_search_metaheuristic = (routing_enums_pb2.LocalSearchMetaheuristic.GREEDY_DESCENT)
# self.search_parameters.local_search_metaheuristic = (routing_enums_pb2.LocalSearchMetaheuristic.SIMULATED_ANNEALING)
# self.search_parameters.local_search_metaheuristic = (routing_enums_pb2.LocalSearchMetaheuristic.TABU_SEARCH)
# self.search_parameters.local_search_metaheuristic = (routing_enums_pb2.LocalSearchMetaheuristic.OBJECTIVE_TABU_SEARCH)
self.search_parameters.time_limit.seconds = 5

Authors

Support

For support, email me at [email protected]

License

MIT

About

MIRΟR: A Middleware Software Tool for Interfacing Mobile Industrial Robots with Optimization Routing Algorithms

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published