Prezentace aplikace PowerPointspanel/ROSWorkshop2013/2_1 SLAM.pdf · Bozetechova 2, 612 66 Brno...
Transcript of Prezentace aplikace PowerPointspanel/ROSWorkshop2013/2_1 SLAM.pdf · Bozetechova 2, 612 66 Brno...
Soso’s knowledge
Laser, Kinect, Gmapping, Localization, PathPlanning
Faculty of Information Technology, Brno University of Technology Bozetechova 2, 612 66 Brno
99.99.9999
Sensors
XIP 2
Laser scanners
Tactile sensors
Stereo cameras
Kinect
Odometry sensors
Odometry sensors
• Use data from motion sensors to estimate change in position over time
• Sensitive to errors
EF 3
Odometry sensors
• Use data from motion sensors to estimate change in position over time
• Sensitive to errors
DS 4
Laser scanner (LIDAR)
• Measures distance to objects using laser pulses
• Mostly 2D, 3D lidars also exist
ZQ 5
Laser scanner (LIDAR)
• Representation of laser scan in ROS
UT 6
Header header # timestamp in the header is the acquisition time of # the first ray in the scan. # # in frame frame_id, angles are measured around # the positive Z axis (counterclockwise, if Z is up) # with zero angle being forward along the x axis float32 angle_min # start angle of the scan [rad] float32 angle_max # end angle of the scan [rad] float32 angle_increment # angular distance between measurements [rad] float32 time_increment # time between measurements [seconds] - if your scanner # is moving, this will be used in interpolating position # of 3d points float32 scan_time # time between scans [seconds] float32 range_min # minimum range value [m] float32 range_max # maximum range value [m] float32[] ranges # range data [m] (Note: values < range_min or > range_max should be discarded) float32[] intensities # intensity data [device-specific units]. If your # device does not provide intensities, please leave # the array empty.
Displaying Laser scan in RVIZ
• Play bagfile with data:
UI 7
roslaunch btb_gazebo robot_simple_world.lauch
• Run RVIZ rosrun rviz rviz
• Add – Laser Scan
• Set topic to /scan
• Set Global Options – Fixed frame to /laser
Kinect and Laser scan from Kinect
• Kinect provides RGB image, depth image, accelerometers
• Dense Point clouds are easily computed
• Disadvantage: short range
JT 8
Come at me, bro!
Kinect PCL to Laser Scan
HF 9
• Play bagfile with Kinect data: rosbag play --loop kinect_data.bag
• Run RVIZ rosrun rviz rviz
• Set Global Options – Fixed frame to /openni_camera
• Add – PointCloud2
• Set topic to: /camera/depth/points
• Run the kinect2laser launchfile: roslaunch btb_kinect_2_laser_demo kinect2laser.launch
• Add – Laser Scan
• Set topic to: /narrow_scan
GMapping
• Simultaneous Localization And Mapping
• Sensors
• Data asociation
• High dimensionality
UT 10
GMapping
• 3DOF
• Odometry + LASER
• Particle filtering
• Supported is ROS
GS 11
Gmapping - DEMO
FF 12
• Run the TB sumilator roslaunch btb_gazebo robot_simple_world.lauch
• Run GMapping roslaunch btb_navigation gmapping.launch
• Run RVIZ rosrun rviz rviz
• Run teleoperation roslaunch btb_teleop keyboard_teleop.launch
• Set Global Options – Fixed frame to /map
• Use keys (described in terminal) to move and map
Gmapping – saving/loading the map
CFF 13
• Map can be saves using map_server
• Saved as .pgm + metadata
• Impossible to load map and continue mapping using gmapping
• Save map:
• Load map:
rosrun map_server map_saver -f <map name>
rosrun map_server map_server <map name>
Localization
• The “localization” part of SLAM
• Assumes known map
• We will be working with particle filter localization
SG 14
Localization
SP 15
• Run the TB sumilator (if not running) roslaunch btb_gazebo robot_simple_world.lauch
• Load our previously built map rosrun map_server map_server <map name>
• Hide the robot anywhere you want
• Run move base roslaunch btb_navigation move_base_turtlebot_laser.launch
• Run teleoperation roslaunch btb_teleop keyboard_teleop.launch
• Run Amcl roslaunch btb_navigation amcl_turtlebot.launch
• In RVIZ – 2D pose estimate – click and drag
• Send destination goal – 2D nav goal – click and drag
Path Planning
• Responsible for calculating a global path
• assuming it is provided with:
• Map
• A goal location in that map
• robot's current pose
NNF 16
Path planning
, 17
TB2 LIVE DEMO
(ABC-1) 18
It’s ALIVE!
Záhlaví (99.99.9999) 19
It’s over, yaaay!!