A ROS package designed to enable a turtle robot to move from a starting point to a user-defined goal pose using a proportional controller.
Prerequisite • Compile • Execute • Use • Screenshots
- ROS - An open-source, meta-operating system for your robots. The repository has been tested using ROS Kinetic.
-
Move this package folder (
point-to-point-control
) to thesrc
directory of your ROS workspace, for example~/catkin_ws/src/
. -
Open a terminal window and navigate to your ROS workspace directory, for example:
cd ~/catkin_ws/
-
Build the package using the
catkin_make
command:catkin_make
This will compile the package and generate the necessary files for running the ROS nodes.
- Open a terminal window.
- Navigate to your ROS workspace directory.
- Launch the package using the following command:
roslaunch point_to_point_control point_to_point_control.launch
This will launch the ROS nodes required to run the package.
-
Open a terminal window and pass a goal pose (
goalPose_X
,goalPose_Y
) using the following command:rostopic pub /turtle1/PositionCommand geometry_msgs/Pose2D '{x: goalPose_X, y: goalPose_Y}' -1
where goalPose_X
and goalPose_Y
are values between 0 and 11.
2. Once a goal pose is passed, the turtle will start moving towards it using a proportional controller.
3. Once the turtle reaches the goal pose, it will stop and wait for another desired pose to be passed.
4. Any poses that are out of bounds are properly treated. The program prints various types of information on the terminal, and you can exit the program at any time by pressing the ESC
key.
- Initial position:
- Turtle is moving towards the first goal pose (selected by the user and passed via the terminal window):
- Fifth goal pose reached: