Skip to content

aflores-c/ROS_Mobile_Robot_Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS_Mobile_Robot_Implementation

Implementation from scratch of a mobile robot

https://www.youtube.com/shorts/2U2N2IlqIuU

Requierements

  1. Ubuntu 18 with ROS Melodic installed. This computer can be a laptop, like in this case, but it also can run in an embedded system like a Jetson Nano or a Raspberry.
  2. A differential drive robot with 4 wheels (this project was implemented with 4), but it also can be with two wheels.
  3. The hardware: encoders in the motors for the wheels, Arduino Leonardo, Laptop, Two Motor Drivers for 4 motos, RPLIDAR.

Usage

You need to implement the Arduino code mobile_robot_final.ino . You need to connect the encoders, motor drivers and serial cable to the Arduino (connects to the computer)

After that you can implement the robot package in your computer. You need to download the repository and paste the requiered package in your workspace, depending on the tutorial you are working.

  1. Create a catkin workspace
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make
  1. Download the repository insider the /src file of the workspace
$ cd /src
$ copy the mrobot_ws in the src folder
  1. Make again and check all compiles correctly.
$ cd ..
$ catkin_make

Robot description

Overview

You can see the hardware that is used. The connections can be obtained from the Arduino code. In the future, there will be a more detailed connection descrition.

alt text alt text alt text alt text

Mapping

  1. Source your environment
$ cd catkin_ws
$ cd source devel/setup.bash
  1. Launch the hardware interface. This communicates the Arduino and the Computer with ROS
$ roslaunch hardware_interface mobile_robot_serial.launch
  1. Launch the mapping package
$ roslaunch mobile_robot_slam mobile_robot_slam.launch
  1. Launch the teleoperation
$ roslaunch mobile_robot_teleop mobile_robot_teleop_key.launch

alt text

Stop the mapping and place the robot in the initial position where it started mapping

Navigation

  1. Launch the hardware interface. This communicates the Arduino and the Computer with ROS
$ roslaunch hardware_interface mobile_robot_serial.launch
  1. In another terminal, run the bringup launch file, wich publish the /odom topic and connects to the RPLIDAR
$ roslaunch hardware_interface mobile_robot_bringup.launch
  1. In another terminal, run the navigation package
$ roslaunch mobile_robot_navigation mobile_robot_navigation.launch

Inside RVIZ you can start navigating

alt text

About

Implementation from scratch of a mobile robot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published