Tugas Challenge SPARTA HMIF 2020
Paper Matematika Diskrit 2021
Paper Strategi Algoritma 2022
This simulation is a base for robot navigation simulation. There are two main navigation functionality implemented in the simulator, path planner (dijkstra), and motion planner (P-Controller). The algorithm is implemented in Gazebo Simulator using ROS Noetic with Turtlebot3 Burger as the robot.
Note that in this path planner program, a node refers to a ROS Node while a vertex refers to a point (A or 0 for example) on the route map. Also, note that in this program's adjacency matrix, vertex A is 0, vertex B is 1, vertex C is 2, and so forth. The standard length unit in Gazebo Simulator is in meter.
For motion planner program. The program utilizes Proportional Controller algorithm to generate velocity command to the robot as a step by step velocity to reach certain position.
Route Map (Unit in Meters)
Route Map on Gazebo Simulator
-
This program is being developed using ROS Noetic, Gazebo 11, and Ubuntu 20.04 LTS. Try to use these version.
-
Clone the repository
$ git clone https://github.com/farrel-a/robot-nav-simulator.git
- cd to
/robot-nav-simulator/nav_ws
$ cd robot-nav-simulator/nav_ws
- run
catkin_make
$ catkin_make
- source
setup.bash
for bash orsetup.zsh
for zsh
$ source devel/setup.bash
or
$ source devel/setup.zsh
- run launch command
$ roslaunch navrobot_gazebo navrobot.launch
- Start a new terminal and source
setup.bash
orsetup.zsh
$ source devel/setup.bash
or
$ source devel/setup.zsh
- On a new terminal, run this command and feel free to fill the argument with any value of
src
andend
.src
(source) is the starting vertex andend
is the destination vertex. The value must be 0<=(src
,end
)<=5. For example, start at vertex 0/A and go to vertex 5/F.
$ rosrun navrobot_gazebo robot_1 _src:=0 _end:=5
-
The robot will be spawned at
src
's vertex position -
The terminal will show information as follows
ER
(En Route) : the vertex that the robot is currently going to.GX
(Goal_X) : x position of the current destinated vertex.GY
(Goal_Y) : y position of the current destinated vertex.X
: x position of the robot.Y
: y position of the robot.
- The result will look like this. It will spawn turtlebot3_burger at x = 0.0, y = 0.0, z = 0.0 and then go to the nearest route from vertex
src
to vertexend
.
- Use ctrl+c on the terminal to stop the node. You can also try again and run the node with different argument value. Just redo the step no.8.
Route Map
Route Map (Expanded Obstacle)
-
This program is being developed using ROS Noetic, Gazebo 11, and Ubuntu 20.04 LTS. Try to use these version.
-
Clone the repository
$ git clone https://github.com/farrel-a/robot-nav-simulator.git
- cd to
/robot-nav-simulator/nav_ws
$ cd robot-nav-simulator/nav_ws
- run
catkin_make
$ catkin_make
- source
setup.bash
for bash orsetup.zsh
for zsh
$ source devel/setup.bash
$ source devel/setup.zsh
- run launch command
$ roslaunch navrobot_gazebo obsrobot.launch
- Start a new terminal and source
setup.bash
orsetup.zsh
$ source devel/setup.bash
or
$ source devel/setup.zsh
- On a new terminal, run this command to run the robot's program
$ rosrun navrobot_gazebo robot_2
- The robot will be spawned at Node S vertex position (0.0, 0.0)
- The terminal will show information as follows
Prev List
: The nearest node of each node (from index-0 (Node S) to index-13 (Node GL))
Node Sequence
: Robot path sequence
Robot in Action!
- The node will stop automatically once arrived at the goal position (1.5, 1.5)
one tile = 1m x 1m
-
This program is being developed using ROS Noetic, Gazebo 11, and Ubuntu 20.04 LTS. Try to use these version.
-
Clone the repository
$ git clone https://github.com/farrel-a/robot-nav-simulator.git
- cd to
/robot-nav-simulator/nav_ws
$ cd robot-nav-simulator/nav_ws
- run
catkin_make
$ catkin_make
- source
setup.bash
for bash orsetup.zsh
for zsh
$ source devel/setup.bash
$ source devel/setup.zsh
- run launch command
$ roslaunch navrobot_gazebo PConRobot.launch
- Start a new terminal and source
setup.bash
orsetup.zsh
$ source devel/setup.bash
or
$ source devel/setup.zsh
- On a new terminal, run this command to run the robot's program
$ rosrun navrobot_gazebo robot_3 _x_goal:=1.0 _y_goal:=1.0 _Kp_lin:=0.35 _Kp_rot:=0.45
-
_x_goal, _y_goal can also be changed to other position. _Kp_lin is a Kp constant for linear velocity and _Kp_rot is Kp constant for angular velocity. _Kp_lin and _Kp_rot can also be changed.
-
The terminal will show GX (Goal X), GY (Goal Y), current X, and current Y pose of the robot.
- IN ACTION !!!
-
educative/Edpresso Team. 2021. How to implement Dijkstra's Algorithm in C++. https://www.educative.io/edpresso/how-to-implement-dijkstras-algorithm-in-cpp. Accessed on 9 August 2021.
-
WilliamFiset. 2018. Dijkstra's Shortest Path Algorithm | Graph Theory. https://www.youtube.com/watch?v=pSqmAO-m7Lk&t=785s. Accessed on 9 August 2021.
-
ROS.org. 2021. ROS Documentation. http://wiki.ros.org/. Accessed on 9 August 2021.
-
ROBOTIS. 2021. ROBOTIS-GIT/turtlebot3. https://github.com/ROBOTIS-GIT/turtlebot3. Accessed on 29 July 2021.
-
Shikin Zhang. 2016. PID Pseudocode. https://shikinzhang.github.io/2016/07/25/PD-Controller/. Accessed on 21 May 2022.