ECE 5463 Introduction To Robotics Spring 2018: ROS Tutorial 3
ECE 5463 Introduction To Robotics Spring 2018: ROS Tutorial 3
Spring 2018
ROS
TUTORIAL 3
02/2018
ECE5463 (Sp18) Previous Steps
Outline
• Rviz (Ros Visualization)
• Rviz – ROS
• TurtleBot3
• Turtlebot components – laser sensor
• Installing “TurtleBot3” Packages
• Exploring “TurtleBot3” files (launch, world, URDF, XACRO)
• TurtleBot3 simulation
• Running TurtleBot3 simulation (launch files)
• Nodes and topics (current and needed)
• Getting laser data (python script)
• Rviz for laser data visualization
• Goal: Make TurtleBot3 to move around avoiding obstacles 2
ECE5463 (Sp18)
• It allows the user to view the simulated robot model, log sensor information
from the robot's sensors, and replay the logged sensor information.
• Command:
rosrun rviz rviz
3
ECE5463 (Sp18) TurtleBot3
TurtleBot3
• Features
• Low-cost, personal robot kit with open-source software and
hardware. Two models available: burger / waffle.
• Modular, compact and customizable.
• World’s most popular ROS platform
• Components (Burger model)
• Single Board Computer (SBC)
• Sensors
• Laser Sensor
• Depth Camera
• Video Camera
• Control Board
• Actuators – Dynamixel Series
4
ECE5463 (Sp18) TurtleBot3
Laser Sensor
360 LASER DISTANCE SENSOR LDS-01 (LIDAR)
• 2D laser scanner that collects a set of data around the robot to use for SLAM
(Simultaneous Localization and Mapping).
• Angular Resolution: 1°
5
ECE5463 (Sp18) TurtleBot3
6
ECE5463 (Sp18) TurtleBot3
Directory: ~/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo/launch
$ export TURTLEBOT3_MODEL=burger
Command: $ roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch 7
ECE5463 (Sp18) TurtleBot3
Directory: ~/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models
File: turtlebot3_world.launch
8
ECE5463 (Sp18) TurtleBot3
Directory: ~/catkin_ws/src/turtlebot3/turtlebot3_description/urdf
File: turtlebot3_burger.urdf.xacro
9
ECE5463 (Sp18) TurtleBot3 Simulation
• Create your own Python script for moving TurtleBot3 (Recall: Give
execution permissions to the file using: chmod +x name_of_the_file.py)
• Use commands rosnode list, rostopic list, rostopic info, rosmsg show.
10
ECE5463 (Sp18) TurtleBot3 Simulation
11
ECE5463 (Sp18) TurtleBot3 Simulation
• Laser sensor data is shown as red dots in the Rviz (each dot corresponds
to a laser beam).
12
ECE5463 (Sp18) TurtleBot3 Simulation
14
ECE5463 (Sp18) TurtleBot3 Simulation
• Baby step: Make the robot to stop when an obstacle in front of the robot
is closer than 0.5 m.
• Hints:
• Create a node which is a publisher and subscriber at the same time.
• The node should subscribe to the topic scan and publish on the topic cmd_vel
• Use the code implemented in the previous scripts and put everything together.
15
ECE5463 (Sp18) TurtleBot3 Simulation
16
ECE5463 (Sp18)
17