This project seeks to move the turtlesim robot to a desired destination defined by x
and y
cordinates. The objective of the proportional (
In order to move to the desired location, the turtlesim will first turn in the direction of the desired destination (minimizing the angular error) and then move towards that point (minimizing the euclidean distance error).
Internally, the robot controller publishes the robot command velocity at a frequency of 10
- ROS Noetic
- CMake
- Catkin
- C++
Install ROS Noetic from http://wiki.ros.org/noetic/Installation
-
Create a catkin workspace
-
Clone the repo into
<catkin workspace>/src
with:
git clone https://github.com/denis-mutuma/proportional-robot-controller.git
-
Run
catkin_make
in the catkin workspace to build the project -
Install tutlesim by running
sudo apt-get install ros-$(rosversion -d)-turtlesim
-
In a new terminal run
roscore
to start ros master -
In a new terminal run turtlesim using:
rosrun turtlesim turtlesim_node
and a new window similar to the one below will be opened:
- In a new terminal run
rosrun practical goto_xy
to run the proportional robot contoller and you'll be prompted to provide the x and y cordinates via the terminal. Enter values for x and why between 0 and 11. You should see the turtle turning (if need be) and moving to the desired location with an output similar to this:
- The turtle will move to the desired position and repeating this multiple times will produce something similar the image below:
-
Fork the Project
-
Create your Feature Branch (git checkout -b feature/AmazingFeature)
-
Commit your Changes (git commit -m 'Add some AmazingFeature')
-
Push to the Branch (git push origin feature/AmazingFeature)
-
Open a Pull Request
Distributed under the BSD License.