A ROS package for robots that avoids workspace boundaries during navigation.
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 (
workspace-limits-avoidance
) to thesrc
directory of your ROS workspace, for example~/catkin_ws/src/
. -
Open a terminal window and navigate to your ROS workspace directory, e.g.:
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 workspace_limits_avoidance workspace_limits_avoidance.launch
This will launch the ROS nodes required to run the package.
- The turtle moves randomly within the workspace, avoiding walls and boundaries.
- When the turtle gets too close to a wall or boundary, it stops.
- The turtle then moves back a little and rotates randomly.
- After that, the turtle moves forward again and repeats the cycle.
- The turtle continues to move indefinitely, and the terminal prints various information. You can exit the program at any time by pressing
ESC
.
- 6th pseudo-random move:
- then, after a couple of minutes...:
- ... and after a couple of hours: