ME5621 Mobile Robot control
ME5621 Mobile Robot control - Điều khiển Robot tự hành
1329139 Thuws6, Sáng Tiết 4-6, 9h20-14h45 chiều thứ 3, Mã lớp học trên team: Teamcode : 8ii2b7m
132829 Tiết 4-6, 15h05-17h30 chiều thứ 3, Mã lớp học trên team: Teamcode : 6tg9n9e
TỔNG HỢP TÀI LIỆU GOOGLE DRIVE : https://drive.google.com/drive/folders/1jGV8k945jdnORT2_e1FR3VAYauOunl0J?usp=sharing
Project cuối kỳ (Cụ thể cuối page)
Bài Tập môn học:
Các bạn copy code file matlab hoặc chụp ảnh minh chứng và nộp lên Assignment microsoft team.
Chú ý: Đặt tên file hay folder HọTên_MSSV ví dụ, NguyenVanA_20180012
Hướng dẫn cài đặt:
https://sites.google.com/view/bblab/teaching/me5621_mobilerobotcontrol?authuser=0
Bài 1: Cài đặt UBUNTU và ROS
Các bạn chụp ảnh màn hình máy tính đã chạy được chương trình ví dụ hệ thống 3 thanh con lắc ngược :
http://gazebosim.org/tutorials/?tut=ros_urdf
Sửa lỗi chạy chương trình:
Sửa file : Gedit ~/catkin_ws/src/gazebo_ros_demos/rrbot_description/launch/rrbot_rviz.launch
Thêm và sửa thành file như dưới:
<launch>
<param name="robot_description"
command="$(find xacro)/xacro --inorder '$(find rrbot_description)/urdf/rrbot.xacro'" />
<!-- send fake joint values -->
<arg name="use_gui" default="true" doc="Should the joint_state_publisher use a GUI for controlling joint states" />
<node pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" name="joint_state_publisher_gui" output="screen" if="$(arg use_gui)" />
<!-- Combine joint values -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
<!-- Show in Rviz -->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rrbot_description)/launch/rrbot.rviz"/>
</launch>
Sửa lỗi không hiện GUI :
https://answers.ros.org/question/363410/joint_state_publisher-window-is-not-shown/Bài 2: Cài đặt và chạy Turtle bot simulation
Các bạn chụp ảnh màn hình máy tính đã chạy được chương trình vào nộp lên microsoft team.:
Tạo catkin space:
http://wiki.ros.org/catkin/Tutorials/create_a_workspace
$ mkdir -p ~/tenmuondat_ws/src
$ cd ~/catkin_ws/src
Vào thư mục source để tải package bạn cần chạy về ví dụ turtle bot3
~/catkin_ws/src$ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
Tải xong vào thư mục src thì các bạn ra thư mục work space
$ cd ~/catkin_ws/
Bạn nào báo lỗi thiếu package thì chạy lệnh sau để tự động cài package còn thiếu:
rosdep install --from-paths src --ignore-src -r -y
Sau đó chạy:
catkin_make
source devel/setup.bash
Chạy thử :
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
*Chú ý: Đổi tên node để tránh xung đột khi chạy nhiều node giống nhau bằng lệnh:
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Cách đổi:
$ roscd turtlebot3_teleop -> Vào thư mục chưa package vào folder launch
sửa file turtlebot3_teleop_key.launch
đổi tên node thành : hoten_mssv
<node pkg="turtlebot3_teleop" type="turtlebot3_teleop_key" name="turtlebot3_teleop_keyboard_hoten_mssv" output="screen">
</node>
Tham khảo:
https://automaticaddison.com/how-to-launch-the-turtlebot3-simulation-with-ros/
https://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/
https://emanual.robotis.com/docs/en/platform/turtlebot3/nav_simulation/
Bài 2: Cài đặt và chạy Turtle bot simulation
Các bạn chụp ảnh màn hình máy tính đã chạy được chương trình vào nộp lên microsoft team.:
Tạo catkin space:
http://wiki.ros.org/catkin/Tutorials/create_a_workspace
$ mkdir -p ~/tenmuondat_ws/src
$ cd ~/catkin_ws/src
Vào thư mục source để tải package bạn cần chạy về ví dụ turtle bot3
~/catkin_ws/src$ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
Tải xong vào thư mục src thì các bạn ra thư mục work space
$ cd ~/catkin_ws/
Bạn nào báo lỗi thiếu package thì chạy lệnh sau để tự động cài package còn thiếu:
rosdep install --from-paths src --ignore-src -r -y
Sau đó chạy:
catkin_make
source devel/setup.bash
Chạy thử :
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Tham khảo:
https://automaticaddison.com/how-to-launch-the-turtlebot3-simulation-with-ros/
https://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/
https://emanual.robotis.com/docs/en/platform/turtlebot3/nav_simulation/
Bài 3: Thiết kế mô hình different drive bot trên gazebo và thêm plugin điều khiển từ ROS
https://www.theconstructsim.com/how-to-build-a-differential-drive-simulation/
Đọc hiểu các dòng lệnh trong file sdf
Các bạn chụp ảnh màn hình máy tính đã chạy được chương trình vào nộp lên microsoft team.
Bài 4: Chạy thuật toán tìm kiếm RRT
https://github.com/mech0ctopus/rrt-global-planner
export TURTLEBOT3_MODEL=burger
Các bước cài đặt phần mềm phục vụ môn học Điều khiển robot tự hành:
Cài đặt hệ điều hành Ubuntu:
KHUYẾN NGHỊ: Cài trực tiếp trên máy chạy song song 2 hệ điều hành Window và Ubuntu
https://vinasupport.com/huong-dan-cai-dat-hdh-ubuntu-20-04-lts/
Cài đặt dùng Virtual box:
https://www.virtualbox.org/wiki/Downloads
Cài Ubuntu trên máy ảo Virtual Box
https://www.linuxvmimages.com/images/ubuntu-1804/
https://www.linuxvmimages.com/images/ubuntu-2004/
Một số bạn không kết nối được wifi, tìm hiểu cách khắc phục trên mạng nhé. Link tham khảo:
https://www.reddit.com/r/Ubuntu/comments/lbl0l5/can_windows_dual_boot_be_messing_with_my_wifi_card/
https://itsfoss.com/fix-no-wireless-network-ubuntu/
2. Cài đặt hệ điều hành ROS tương ứng với phiên bản ubuntu 18 hoăc 20 :
http://wiki.ros.org/ROS/Installation
Released May, 2020
Latest LTS, supported until May, 2025
Recommended for Ubuntu 20.04
Tạo thư mục cho các dự án ROS
http://wiki.ros.org/catkin/Tutorials/create_a_workspace
Kiểm tra phiên bản Ubuntu
~$lsb_release -a
ROS: ~$ rosversion -d
Cai dat ros controller :
sudo apt-get install ros-melodic-ros-control ros-melodic-ros-controllers
3. Tự học 21 bài cơ bản Beginer level trong ROS
http://wiki.ros.org/ROS/Tutorials
4. Cài đặt và chạy Turtle bot simulation
Tạo catkin space:
http://wiki.ros.org/catkin/Tutorials/create_a_workspace
$ mkdir -p ~/tenmuondat_ws/src
$ cd ~/catkin_ws/src
Vào thư mục source để tải package bạn cần chạy về ví dụ turtle bot3
~/catkin_ws/src$ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
Tải xong vào thư mục src thì các bạn ra thư mục work space
$ cd ~/catkin_ws/
Bạn nào báo lỗi thiếu package thì chạy lệnh sau để tự động cài package còn thiếu:
rosdep install --from-paths src --ignore-src -r -y
Sau đó chạy:
catkin_make
source devel/setup.bash
Cài đặt và chạy Turtle bot simulation
https://github.com/ROBOTIS-GIT/turtlebot3.git
https://automaticaddison.com/how-to-launch-the-turtlebot3-simulation-with-ros/
https://emanual.robotis.com/docs/en/platform/turtlebot3/nav_simulation/
Chụp ảnh chạy Rviz và Gazebo robot đang tự di chuyển và xây dựng bản đồ
Lập trình python chạy giao diện điều khiển robot:
https://drive.google.com/drive/folders/1htjZcBOgl_FhC8FPWRVxY11PIwfaXsAx?usp=sharing
B1:
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
B2:
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_navigation turtlebot3_navigation.launch
B3:
~/PycharmProjects/send_goal_GUI$ python send_goal_GUI.py
Tham khảo: Keyword: tkiter python gui, Sending Goals to the Navigation Stack - Python
https://realpython.com/python-gui-tkinter/
https://hotblackrobotics.github.io/en/blog/2018/01/29/action-client-py/
5. Cài đặt và chạy pibot:
Chay ban do cả 3 terminal cần chạy các dòng lệnh sau:
echo $ROS_IP // Kiểm tra biến tham số ROS đã cài chưa
export ROS_IP=$(hostname -I | awk '{print $1;}')
export ROS_HOSTNAME=$ROS_IP
export ROS_MASTER_URI=http://$ROS_HOSTNAME:11311
export TURTLEBOT3_MODEL=burger
export ROS_MASTER_URI=http://192.168.1.101:11311
Terminal 1: Chạy điều khiển
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Project cuối kỳ:
(Nhóm từ 2-5 thành viên (không nhiều hơn 5, không ít hơn 2, bạn nào lẻ phải chủ động tự tìm nhóm để ghép vào):
NỘP OFFLINE BÁO CÁO vào buổi bảo vệ và ký xác nhận
T1-3 Thứ 3 , 132828 ME5621 Điều khiển Robot tự hành Cơ điện tử-K63C TC AB T46 Thứ năm 11/08/2022 Kíp 2 60 D9-305 134766
T4-6 Thứ 3 ,132829 ME5621 Điều khiển Robot tự hành Cơ điện tử-K63C TC AB T46 Thứ năm 11/08/2022 Kíp 2 60 D9-306 134767
NỘP ONLINE BÁO CÁO tại:
Các bạn tải file lên Link Google Drive Folder trong đó chứa thuyết minh đồ án, bản vẽ, code lập trình, video chạy thực tế, ....
Chú ý: Đặt tên file hay folder HọTên_MSSV ví dụ, NguyenVanA_20180012
Độ dài: 8 - 10 trang, Có trang phân công nhiệm vụ từng thành viên của nhóm.
NHỚ BẬT CHẾ ĐỘ SHARE sau đó chia sẻ link lên Google sheet sau:
T1-3 Thứ 3
File google drive
https://docs.google.com/spreadsheets/d/1mTxtlcEIryo0gJoYHUZj3RWOz4KEEvgTufaA31QEDG4/edit?usp=sharing
T4-6 Thứ 3
File google drive:
https://docs.google.com/spreadsheets/d/11wI2efK51XwiKHnjr5uObELNKdEWMfbDTdEj5ZsR5TM/edit?usp=sharing
Mẫu báo cáo cuối kỳ:
https://docs.google.com/document/d/1JDUE5Kima3DLZJdCL-pFhql79XD1H6R4n0R3FZappww/edit?usp=sharing
Mẫu sanh sách thi cuối kỳ:
https://docs.google.com/spreadsheets/d/1gPR1AZlPaGKPGEsL2GeOlEx0WVcmN1YzOvuA7MgLELU/edit?usp=sharing
1. Đề bài
- Thiết kế một robot tự hành (Loại 3 banh Omni, 2 bánh thường, 4 bánh thường ..) (Sản phẩm thực tế (Khuyến khích) hoặc mô phỏng trên gazebo) và lập trình giao diện GUI (Python, c++,..) để làm 1 hoặc nhiều nhiệm vụ sau:
- Robot di chuyển qua các điểm đặt trước, tránh vật cản
- Robot xử lý ảnh đi theo người hoặc di chuyển theo biển chỉ dẫn ( Trái, phải, đi thẳng, quay đầu...)
- Các nhiệm vụ khác do sinh viên tự sáng tạo.
2. Yêu cầu
- Tiểu luận (nộp)
+ Giới thiệu đề tài
+ Phương pháp giải quyết vấn đề
+ Các kết quả đạt được
+ Kết luận
Chú ý: Độ dài: 8 - 10 trang, Có trang phân công nhiệm vụ từng thành viên của nhóm.
- Báo cáo trên lớp: slide (buổi thi ~ 5 - 10 slides)
- Chương trình giao tiếp với robot chạy demo và gửi code theo link:
3. Tính điểm
- Báo cáo trên lớp + tiểu luận + mô hình robot : 7 điểm
- Điều khiển chạy theo quỹ đạo đặt trước: +1 điểm
- Mô hình có gắn Encoder: +1 điểm
- Kết nối với lidar và điều khiển phản hồi. : +1 điểm
Một số mô hình xe tự hành dùng Omni Wheel
3WD Omni Wheel Arduino Robot Car C008
2. 3WD Triangular 100mm omni wheel mobile robotics car C003
3. 4WD Omni Wheel Arduino Robot Car C008
4. 3WD Omni Wheel Arduino Robot Car C008
Một số mô hình xe tự hành 2 bánh
1. Autonomous mobile platform with vacuum cleaning
2. Autonomous mobile platform with vacuum cleaning