Educational Robotic fundamental tutorials.
Author(s) | Chien Duong |
---|---|
Topic(s) | Educational Robotic / Ros / AI |
Status | In progress |
- Ubuntu 16.04 or 18.04
- Ros
- Theory: https://chienduong93.wordpress.com/2021/11/18/rf-tutorial-1/
- Config
- Manually control a robot in simulation
- Autonomously in Simulation: build map, run map
- Create custom messages. And use_case example.
- List of tips & tricks: ros param, ros launch, debug with roslog, switch topic, roslog, ros bag, public topic one time.
- Build a Hardware
- Robotic in Production
- Vision based approach with AI solution: reinforcements learning, segmentation, detection.
- Sensors fusion and fusion vision approach with sensor_base approach.
Install Ros, gazebo, rviz.
ROS: 18.04: melodic, 16.04: kinetic
Check ubuntu version
cat /etc/os-release
Install Ros
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update
sudo apt-get install ros-melodic-desktop-full
Basic packages: should be install into the system /opt/ros/melodic
.
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt install python-rosdep
sudo rosdep init
rosdep update
sudo apt-get install ros-melodic-gazebo-ros-pkgs ros-melodic-gazebo-ros-control
sudo apt-get install ros-melodic-unique-id
sudo apt-get install ros-melodic-uuid-msgs
Extra packages for autonomous function.
sudo apt-get install ros-melodic-navigation
sudo apt-get install ros-melodic-map-server
sudo apt-get install ros-melodic-move-base
rospack profile
sudo apt-get install ros-melodic-amcl
Note:
-
If you don't want to install to the system
/opt/ros
, you can download the package from any resources (example GitHub) -> put it in thesrc
folder -> catkin_make to use this package -
If you are using ubuntu 16.04 -> change
melodic
tokinetic
Setup Ros environment
cd ~/education_robot_ws/
catkin_make
To manual control robot, we only need to use 3 packages
- Keyboard control
cd education_robot_ws
source devel/setup.bash
roslaunch edu_teleop edu_teleop_key.launch
- Load gazebo and robot in environment
cd education_robot_ws
source devel/setup.bash
export TURTLEBOT3_MODEL="burger"
roslaunch edu_gazebo edu_empty_world.launch
Results:
Autonomous in Simulation: build map, run map
- To build maps we need 3 more packages:
maps, third_party_package/gmapping, and edu_buildmap
- Build map
- Add on third_party_package/gmapping, edu_buildmap, and maps. Then build the package with catkin_make
cd education_robot_ws
catkin_make
- Run system
In each termianl, always remember to active workspace.
cd education_robot_ws
source devel/setup.bash
Terminal 1: manual control robot
roslaunch edu_teleop edu_teleop_key.launch
Terminal 2: observe map and robot
roslaunch edu_buildmap build_map_simulation.launch
Terminal 3: save map after finished.
cd education_robot_ws
rosrun map_server map_saver -f ./src/maps/empty_world
Results:
- Autonomous naviagation
-
Add on third_party_package/teb_local_planner_tutorials. Then build the package with cakin_make
-
Others Pre-requirements: amcl and move_base package
roslaunch edu_autonomous autonomous_simulation.launch
Results:
- Using python to call and terminate rosrun and
Run subprocess to transform coordinate between map
and uwb
sensor.
cd roboticfd/utils
python run_subprocess.py
Result: