08 Robot Sensor Motor
08 Robot Sensor Motor
Textbook
P. 194~231
1
Contents
I. Robot Packages
II. Sensor Packages
III. Camera
IV. Depth Camera
V. Laser Distance Sensor
VI. Motor Packages
VII. Dynamixel
VIII. How to use Open Packages
Textbook
P. 194~231
2
Robot Packages
3
Robot Package (http://robots.ros.org/)
4
Sensor Packages
5
Sensor Package (http://wiki.ros.org/Sensors)
6
Type of sensor package
• 1D Range Finders
• Infrared linear distance sensor that can be used to make low-cost robots
• 2D Range Finders
• Sensors that can measure the distance on 2D plane, and is mainly used for navigation
• 3D Sensors
• Sensors used in 3D distance measurement such as Intel’s RealSense, Microsoft’s Kinect, ASUS’s
Xtion
• Audio/Speech Recognition
• Currently, there are few voice recognition related parts, but it seems to be added continuously
• Cameras
• Camera driver used for object recognition, face recognition, character recognition, etc. and
various application packages
• Sensor Interfaces
• Very few sensors support USB and web protocols
• There are still many sensors that can acquire data from a microprocessor
• These sensors can be used with UART in MCU, or ROS in mini PC.
7
Practice Time
‘LRF, IMU, USB Camera,
Depth Camera, Robot Model
Let’s check through RViz’
Use the Rviz of your PC to observe the data
from the sensors that you have received
8
Today’s Practice Material
9
Sensor Package Practice #1 (USB Camera)
$ sudo apt-get install ros-kinetic-uvc-camera
If there are more than two cameras,
$ rosrun uvc_camera uvc_camera_node Enter the device number you want to use
$ rosrun uvc_camera uvc_camera_node _device:=/dev/video? instead of the question mark
(Especially, for notebooks)
$ rosrun image_view image_view image:=/image_raw
$ rqt_image_view image:=/image_raw Three ways to view image messages
$ rviz
11
Sensor Package Practice #2 (Transfer images remotely)
Sensor PC Remote PC
13
Sensor Package Practice #4 (Depth Camera)
$ sudo apt-get install ros-kinetic-openni2-camera ros-kinetic-openni2-launch (In case of ASUS’s Xtion)
$ tar -xvf Sensor-Bin-Linux-x64-v5.1.0.41.tar.bz2
$ cd Sensor-Bin-Linux-x64-v5.1.0.41/
$ sudo sh install.sh
$ roslaunch openni2_launch openni2.launch
15
Sensor Package Practice #4 (Depth Camera)
16
Sensor Package Practice #5 (Stereo Camera)
$ sudo apt-get install libv4l-dev libudev-dev ros-kinetic-rtabmap*
$ cd ~/catkin_ws/src/
$ svn export https://github.com/withrobot/oCam/trunk/Software/oCamS_ROS_Package/ocams
$ cd ~/catkin_ws/ && catkin_make
$ sudo gedit /etc/udev/rules.d/99-ttyacms.rules
ATTRS{idVendor}=="04b4" ATTRS{idProduct}=="00f9", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="04b4" ATTRS{idProduct}=="00f8", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
$ sudo udevadm control --reload-rules
$ roslaunch ocams pointcloud.launch
(In case of oCam-Stereo)
https://github.com/withrobot/oCam/tree/master/Products/oCamS-1CGN-U
17
Sensor Package Practice #6 (LDS)
18
Sensor Package Practice #6 (LDS)
$ cs (In case of LDS)
$ git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git
$ cm
$ sudo chmod a+rw /dev/ttyUSB0
$ roslaunch hls_lfcd_lds_driver view_hlds_laser.launch
$ cs (In case of RPLiDAR)
$ git clone https://github.com/robopeak/rplidar_ros.git
$ cm
$ sudo chmod a+rw /dev/ttyUSB0
$ roslaunch rplidar_ros rplidar.launch
$ sudo apt-get install ros-kinetic-urg-node (In case of HOKUYO)
$ sudo chmod a+rw /dev/ttyACM0
$ rosrun urg_node urg_node
Axis Length:1
Axis Radius:0.1
Topic name:/scan
20
Sensor Package Practice #7 (IMU)
$ cs (In case of withrobot’s myAHRS+)
$ git clone https://github.com/robotpilot/myahrs_driver.git
$ cm
$ sudo chmod a+rw /dev/ttyACM0
$ roslaunch myahrs_driver myahrs_driver.launch
21
Motor Packages
22
Motor Package (http://wiki.ros.org/Motor%20Controller%20Drivers)
• PhidgetMotorControl HC
• Roboteq AX2550 Motor Controller
• ROBOTIS Dynamixel
23
Contorolling Dynamixel with ROS Package
• DynamixelSDK (http://wiki.ros.org/dynamixel_sdk)
• Support 3 representative OS (Linux, Windows, MacOS)
• Support programming language such as C, C++, C#, Python, Java, MATLAB,
LabVIEW, etc.
• Support ROS
• dynamixel_workbench (http://wiki.ros.org/dynamixel_workbench)
• Provide a variety of examples for ease of use in ROS
• Provide GUI tool for ROS
U2D2
SMPS2DYNAMIXEL Dynamixel 24
Question Time!
Advertisement #1
Download link
Language:
English, Chinese, Japanese, Korean
Direct Link
Advertisement #3
www.robotsource.org
The ‘RobotSource’ community is the space for people making robots.