ROS stage simulator code example to control a robot to reach a determined target avoiding obstacles using a laser sensor (LiDAR) of 270 degree range on a Hokuyo map.
- ROS 1
- Python 3
. |-- catkin_ws |-- build |-- devel |-- src |-- CMakeLists.txt |-- stage_controller |-- [...] |-- scripts |-- stage_controller.py
The code was developed on ROS Noetic Ninjemys distribution. Instruction can be found here.
First, run this command to have access to the ROS commands and update the environment.
source /opt/ros/noetic/setup.bash
source ./devel/setup.bash
At the catkin_ws
directory run the stage simulator using an hokuyo world.
rosrun stage_ros stageros src/stage_controller/world/create_hokuyo.world
Now, run the python script which controls the robot with the command
rosrun stage_controller stage_controller.py
This project was made as part of the Robot's Project course in Robotics and AI postgraduate program at UTEC/FURG.
The ideia was implement a solution without consult any existing method of localization and mapping.
- Improve the condition that makes the robot choose turn left/right.
- Implement a function to change robot's position at any time
- Implement a dynamic way of verify is there is some obstacle in the robot's path
- Implement a known mapping and location algorithm