A ROS-based autonomous mobile robot platform with 4-wheel differential drive configuration, equipped with LDS-02 2D LIDAR and RealSense D435i RGB-D camera for autonomous navigation and mapping.
Work in progress. To be updated.
- Autonomous Navigation
- SLAM Capability
- Obstacle Avoidance
- PS5 Controller Teleoperation
- Sensor Integration (LDS-02 LIDAR, RealSense D435i)
- EKF-based Localization
- Ubuntu 18.04
- ROS Melodic
- Gazebo 9
- Python 2.7
sudo apt-get install \
ros-melodic-twist-mux \
ros-melodic-robot-localization \
ros-melodic-diff-drive-controller \
ros-melodic-joint-state-controller \
ros-melodic-velocity-controllers \
ros-melodic-gazebo-ros-control \
ros-melodic-joy \
ros-melodic-teleop-twist-joy \
ros-melodic-navigation
- Create a catkin workspace (if not already created):
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin init
- Clone the repository:
cd ~/catkin_ws/src
git clone https://github.com/sirackerman/ros_mobile_robot.git
- Build the workspace:
cd ~/catkin_ws
catkin build
source devel/setup.bash
# Set the robot model
export MOBILE_ROBOT_MODEL=custom_robot
To create a map of a new environment (uses turtlebot3 worlds):
- Launch the desired Gazebo world:
roslaunch ros_mobile_robot mobile_robot_stage_1.launch # For Stage 1
# Or other available worlds:
# mobile_robot_stage_2.launch
# mobile_robot_stage_3.launch
# mobile_robot_stage_4.launch
# house.launch
- Launch the mapping system:
roslaunch ros_mobile_robot robot_mapping.launch
For spawing the robot in a specific point in a world (Check robot_mapping.launch), run:
roslaunch ros_mobile_robot robot_mapping.launch x_pos:=1.0 y_pos:=1.0
- Control the robot to explore the environment:
With the keyboard:
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
With the PS5 controller:
Install this ROS_package, ensure your PS5 controller is connected, then run:
roslaunch ps5_teleop ps5_teleop.launch
- After mapping the environment, save the map in your desired location:
# Save the map to your maps directory
rosrun map_server map_saver -f ~/catkin_ws/src/ros_mobile_robot/maps/my_map
To navigate in a known environment using a previously created map:
- Launch navigation with the desired world and map:
roslaunch ros_mobile_robot navigation.launch map_file:=/path/to/map.yaml world_file:=/path/to/world.world
Example:
roslaunch ros_mobile_robot navigation.launch map_file:=/home/user/catkin_ws/src/ros_mobile_robot/maps/map.yaml world_file:=/home/user/catkin_ws/src/ros_mobile_robot/worlds/stage_4.world
-
Set initial robot pose in RViz using "2D Pose Estimate"
-
Set navigation goals using "2D Nav Goal" in RViz