Nothing Special   »   [go: up one dir, main page]

13 Manipulator

Download as pdf or txt
Download as pdf or txt
You are on page 1of 85

Manipulator

Textbook
P. 398~455

1
Index

I. Manipulator Introduction

II. OpenManipulator Modeling and Simulation

III. MoveIt!

IV. Applying to the Actual Platform

Textbook
P. 398~455

2
From now on, we will see
Manipulator Modelling
(How to write URDF)
How to Utilize ‘MoveIt!’

3
Manipulator?

4
Manipulator?

I am the grand-
father of robots

The first industrial robot, unimate, 1961

http://en.wikipedia.org/wiki/Unimate 5
Types of Manipulator

Rectangular-Coordinate
Cylindrical
Manipulator
Manipulator

Polar-Coordinate Horizontal Articulated Manipulator Vertical Articulated


Manipulator (SCARA type) Manipulator
6
Types of Manipulator

Cylindrical
Rectangular-Coordinate
Manipulator
We will see
Manipulator this one later

Polar-Coordinate Horizontal Articulated Manipulator Vertical Articulated


Manipulator (SCARA type) Manipulator
7
Manipulator

5th axis

4th axis
6th axis

3rd axis

링크(link)

2nd axis

1st axis
관절
(revolute joint)

http://www.robotis.com/

8
You can utilize manipulator as you want!

5th axis
Hello~
4th axis
6th axis

3rd axis

링크(link)

2nd axis

1st axis
관절
(revolute joint)

http://www.robotis.com/ http://www.theroboticschallenge.org/

9
Manipulator in DRC Finals 25

THORMANG
(Team SNU)

THOR-RD Johnny 05
(Team THOR) (TEAM HECTOR)
THORMANG
Florian (Team ROBOTIS)
Helios (Atlas) (Team ViGIR)
Hercules LEO (Team MIT)
(Team TRAC Labs) (Team TROOPER)

HRP2+
DRC-HUBO (TEAM AIST-NEDO) HRP-2
(Team KAIST) DRC-Hubo
(TEAM DRC-HUBO AT UNLV) (Team HRP2-Tokyo)

Xing Tian
(Team Intelligent Pioneer)
Running Man Atlas WARNER Momaro Aero DRC
(Team IHMC Robotics) (TEAM HKU) (Team WPI-CMU) (Team NimbRo Rescue) (TEAM AERO)
JAXON
(Team NEDO-JSK)

Hydra
WALK-MAN ESCHER (Team NEDO-Hydra)
RoboSimian Cog-Burn CHIMP (Team WALK-MAN) (Team VALOR)
(Team RoboSimian) (TEAM GRIT) (TARTAN RESCUE)

http://www.theroboticschallenge.org/teams 10
Manipulator Control
 Sensing
• Position, Torque
• Surrounding
Environment,
Objects, …

 Plan
• Manual / Autonomous
• Collision Avoidance
• Grasping
• Trajectory Generation

 Action https://youtu.be/4VtDHWiN0as
• Control Position, Velocity, Torque

11
Controlling Manipulator?
It was no picnic to do!

12
Controlling Manipulator?
It was no picnic to do!
However, the situation is changed!

They help us! |(^^)/


13
Why ROS is Useful for Manipulator?
• URDF(Unified Robot Description Format) helps you to do modelling,
visualizing and simulating a robot without difficulties.
You can write URDF easily by utilizing XML(Extensive Markup
Language)

• It supports ‘3D Simulator Gazebo’ which helps you to construct


simulation environment similar to the real one.
Gazebo includes many plug-ins related to sensor and robot control.

• You can utilize ‘MoveIt!’, the combined library for manipulator


• It provides open libraries such as Kinematics and Dynamics Library(KDL) and the
Open Motion Planning Library(OMPL)
• Many functions related to manipulators are available. For example, collision
avoidance, motion planning, pick and place, and so on.

14
Though it is not difficult,
You should know the basics.

15
Components of Manipulator
 base
• A place where a manipulator is fixed.

joint4 End-effector
 link joint3
• Connectors between base, link and end-effector.
link4 link5
 joint link3
• Related to robot’s motility joint2
• Revolute
• Prismatic link2
joint1

 End-effector link1
• Similar to the human hand base

16
Types of Joints

Revolute Joint Prismatic Joint Screw Joint

Cylindrical Joint Universal Joint Spherical Joint


17
DOF, degrees of freedom
Degree of Freedom
= The number of parameters of the system that may vary.
= If 6 parameters are required to describe object’s position&orientation  It has 6 D.o.F.
z

roll(θ)

POS(x, y, z)
x
Orientation(θ, φ, ψ)

pithch(φ) yaw(ψ)

http://www.robotis.com http://www.tbotech.com/sodacansafe.htm 18
DOF, degrees of freedom
Degree of Freedom
= The number of parameters of the system that may vary independently.
= If 6 parameters are required to describe object’s position&orientation  It has 6 D.o.F.
z 5th axis

y 6th axis
4th axis

3rd axis

roll(θ)

POS(x, y, z)
x
Orientation(θ, φ, ψ)
2nd axis

pithch(φ) yaw(ψ)
1st axis

http://www.robotis.com http://www.tbotech.com/sodacansafe.htm 19
Workspace & Jointspace

There!
(x,y,z)

z
y

x
3D Space

Work space : A volume where end-effector of a manipulator can move.


Described with (x, y, z, θ, φ, ψ)

20
Workspace & Jointspace
Please let me know
5th axis joint value^^;;
There! (θ1, θ2,… θ 6)
(x,y,z) 6th axis
4th axis

3rd axis

z
y

x
3D Space 2nd axis

Work space : A volume where end-effector of a manipulator can move. 1st axis
Described with (x, y, z, θ, φ, ψ)
Joint space : A space described with angles of joints(θ1,θ2,θ3,...)

http://www.robotis.com/ http:// www.neo-tex.com 21


Forward Kinematics & Inverse Kinematics
 Things required to control a robot as you want
• Planning based on geometric information(Kinematics)
• Planning based on how forces and torques will affect to motion(Dynamics),
• Give commands to each joint based on planning result

22
Forward Kinematics & Inverse Kinematics
 Forward Kinematics
• Joints angles are given, The position & orientation of end-effector will be computed
• (θ1, θ2, θ3 , …, θn) → (x, y, z), (θ, φ, ψ)

𝜃3 𝜃4

𝜃1
𝜃2 𝜃2 𝑋 𝑌 𝑍
𝑋 𝑌 𝑍
θ ϕ ψ 𝜃3 θ ϕ ψ
𝜃4
𝜃1

23
Forward Kinematics & Inverse Kinematics
 Inverse Kinematics
• Position & Orientation of end-effector are given, joint angles will be computed
• (x, y, z), (θ, φ, ψ) → (θ1, θ2, θ3 , …, θn)

𝜃3 𝜃4

𝜃1
𝜃2 𝑋 𝑌 𝑍 𝜃2
𝑋 𝑌 𝑍
θ ϕ ψ θ ϕ ψ 𝜃3
𝜃4
𝜃1

24
Thank you for your focus on
theoretical things!

25
Thank you for your focus on
theoretical things!
It will be easier from now on!

26
MoveIt! (A combined library for manipulator)

https://youtu.be/0og1SaZYtRc
27
Information you should give to MoveIt!
 Link
• Geometric Information
• STL or DAE(COLLDA); 3d mesh file
• Mass
• Moment of Inertia

 Joint
• Child/Parent Links
• Type of joint: Revolute or Prismatic
• Revolute Axis(or Prismatic Axis)
• Limit Values(Torque limit, Min/Max Angle, Velocity limit)

http://wiki.ros.org/ROS/Patterns/RobotModelling 28
Information you should give to MoveIt!
 Link
• Geometric Information
• STL or DAE(COLLDA); 3d mesh file
• Mass
• Moment of Inertia

URDF
 Joint includes all of these!
• Child/Parent Links
• Type of joint: Revolute or Prismatic
• Revolute Axis(or Prismatic Axis)
• Limit Values(Torque limit, Min/Max Angle, Velocity limit)

URDF(Unified Robot Description Format) → RViz


SRDF(Semantic Robot Description Format) → MoveIt!
SDF(Simulation Description Format) → Gazebo
http://wiki.ros.org/ROS/Patterns/RobotModelling 29
Let’s study
URDF
Practice
<3-link Manipulator>
https://github.com/ROBOTIS-GIT/ros_tutorials/tree/master/testbot_description

31
Practice! 3-link Manipulator Modelling
 Components of 3-link Manipulator
• 3 joints, 4 links End-effector
Joint3

Link4
 URDF Link3
$ cd ~/catkin_ws/src Joint2
$ catkin_create_pkg testbot_description urdf
$ cd testbot_description Link2
Joint1
$ mkdir urdf
$ cd urdf Base Link1
$ gedit testbot.urdf

https://github.com/ROBOTIS-
GIT/ros_tutorials/blob/master/testbot_description/urdf/testbot.urdf

32
Practice! 3-link Manipulator Modelling
• In urdf, (link1)
<link name="link1">

<collision>
<origin xyz="0 0 0.25" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.5"/>
</geometry>
</collision> End-Effector
Joint3
<visual>
<origin xyz="0 0 0.25" rpy="0 0 0"/>
<geometry> Link4
<box size="0.1 0.1 0.5"/>
</geometry> Link3
<material name="black"/>
</visual> Joint2
<inertial>
<origin xyz="0 0 0.25" rpy="0 0 0"/>
<mass value="1"/> Link2
<inertia ixx="1.0" ixy="0.0" ixz="0.0" Joint1
iyy="1.0" iyz="0.0"
izz="1.0"/>
</inertial> Base Link1
</link>
33
Practice! 3-link Manipulator Modelling
• In urdf, ( joint 2)
<joint name="joint2" type="revolute">
<parent link="link2"/>
<child link="link3"/>
<origin xyz="0 0 0.5" rpy="0 0 0"/>
<axis xyz="0 1 0"/> End-effector
<limit effort="30" lower="-2.617" Joint3
upper="2.617" velocity="1.571"/> Link4
</joint>
Link3
Joint2

Link2
Joint1

Base Link1

34
(URDF link)

35
URDF Grammar Check & Graph
• check_urdf (Grammar Check)
$ check_urdf testbot.urdf
robot name is: test_robot
---------- Successfully Parsed XML ---------------
root Link: base has 1 child(ren)
child(1): link1
child(1): link2
child(1): link3
child(1): link4

• urdf_to_graphiz (Graph)
$ urdf_to_graphiz testbot.urdf
Created file test_robot.gv
Created file test_robot.pdf

36
URDF Model Check
• You can check URDF model by using RViz
• robot_description
: Robot model is described in XML format. Rviz visualizes it.
• joint_state_publisher
: ROS node that publishes joint values
• robot_state_publisher
: ROS node that subscribes joint values, and than publishes relations between links&joints as /tf(transformation)
$ cd ~/catkin_ws/src/testbot_description
$ mkdir launch
$ cd launch
$ gedit testbot.launch
<launch>
<arg name="model" default="$(find testbot_description)/urdf/testbot.urdf" />
<arg name="gui" default="True" />
<param name="robot_description" textfile="$(arg model)" />
<param name="use_gui" value="$(arg gui)"/>
<node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher" />
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher" />
</launch>

$ roslaunch testbot_description testbot.launch


$ rviz
37
RViz

0.25m
0.25m

0.5m

0.5m

0.25m
0.25m
0.25m
0.1m 0.25m
0.1m

38
RViz

Change
Joint Values!
39
RViz

40
If you have 3D mesh file of your robot, you can use it
• URDF: in link>visual>geometry, you can load STL or DAE file
Example) open_manipulator/open_manipulator_description/urdf/open_manipulator_chain.xacro
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://open_manipulator_description/meshes/chain_link1.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="grey"/>
</visual>

41
Practice
“OpenManipulator
with Gazebo and MoveIt!”

42
OpenManipulator
• Purpose: ROS based Manipulator platform that can replace expensive
manipulators
• Specialties: Open Source S/W, H/W
• Support Dynamixel X series. You can choose any actuators to construct a robot.
• 3D design examples are provided(vertical articulated type, SCARA type, Delta and so on)
• Support ROS and MoveIt! example
• Support OpenCR which is embedded system for realtime control.
• Support Arduino IDE, Processing IDE
• You can use it with TurtleBot3

43
OpenManipulator
• Wiki page: http://emanual.robotis.com/docs/en/platform/openmanipulator/
• Open SW: https://github.com/ROBOTIS-GIT/open_manipulator
• Open HW
• TurtleBot3 + OpenManipulator Chain
• OpenManipulator Chain
• OpenManipulator SCARA
• OpenManipulator Link

44
OpenManipulator & MoveIt! Install Dependencies
$ sudo apt-get install ros-kinetic-moveit*
$ sudo apt-get install ros-kinetic-gazebo*
$ sudo apt-get install ros-kinetic-industrial-core
$ sudo apt-get install ros-kinetic-dynamixel-sdk
$ sudo apt-get install ros-kinetic-ros-controllers
$ sudo apt-get install ros-kinetic-qt-build
$ sudo apt-get install ros-kinetic-robotis-math

$ cd ~/catkin_ws/src
$ git clone https://github.com/ROBOTIS-GIT/dynamixel-workbench.git
$ git clone https://github.com/ROBOTIS-GIT/dynamixel-workbench-msgs.git
$ git clone https://github.com/ROBOTIS-GIT/open_manipulator.git
$ cd ~/catkin_ws && catkin_make

45
OpenManipulator Modelling & Control Test
$ roslaunch open_manipulator_description open_manipulator_chain_rviz.launch

46
OpenManipulator Code Structure
$ cd ~/catkin_ws/src/open_manipulator
$ ls
Arduino → Library for Arduino
open_manipulator → MetaPackage
open_manipulator_description → Modeling package
open_manipulator_dynamixel_ctrl → Dynamixel control package
open_manipulator_gazebo → Gazebo package
open_manipulator_moveit → MoveIt! package
open_manipulator_msgs → Message package
open_manipulator_position_ctrl → Position control package
open_manipulator_with_tb3 → OpenManipulator and TurtleBot3 package
$ roscd open_manipulator_description/urdf && ls
materials.xacro → Material info
open_manipulator_chain.xacro → Manipulator modeling
open_manipulator_chain.gazebo.xacro → Manipulator Gazebo modeling
$ roscd open_manipulator_description/launch && ls
open_manipulator.rviz → RViz configuration file
open_manipulator_chain_ctrl.launch → File to execute manipulator state info Publisher node
open_manipulator_chain_rviz.launch → File to execute manipulator modeling info visualization node

47
Run OpenManipulator in Gazebo
$ roslaunch open_manipulator_gazebo open_manipulator_gazebo.launch

48
Run OpenManipulator in Gazebo
$ rostopic pub /open_manipulator_chain/joint2_position/command std_msgs/Float64 "data: 1.0" --once

49
What is ‘MoveIt!’?
• Combined libraries for manipulator
• It provides many functions like FIK(Fast Inverse Kinematics) for
motion planning, advanced algorithm for manipulation, robot
hand control, dynamics, controller, and so on.
• Robot description is loaded via URDF & SRDF
• It provides GUI tool
• C++ based move_group interface
• Python based move_commander
• Motion Planning plugin to RViz
• Many open-sourced libraries like OMPL, KDL, FCL, RRT
50
MoveIt! Includes S, P, and A.
• Sensing
• Joint Angle
• Transformation
• 3D sensing

• Plan
• FK, IK
• Grasping
• Collision Avoidance
• Motion Planning

• Action
• POS/VEL control
• Pick and Place

http://moveit.ros.org/documentation/concepts/ 51
You can create MoveIt! Package
by just providing URDF

52
MoveIt Setup Assistant
$ roslaunch moveit_setup_assistant setup_assistant.launch

53
This wizard
will help you^^

Click
2.Check 1.Click
choose: open_manipulator_chain.xacro )
3. Click
2.Change
1. Click

3. Click

You can see


It will compute adjacent links and links model here
that will never collide in advance.
1. Click

If there is no virtual joints, just skip it!


1. Click

2. Click
1.Input
2. Click
3.Check

1.Choose 2. Click

4. Click
Check
2.Add gripper group
with two prismatic joints
(Choose ‘none’ for kinematics solver in gripper group)

3.Check

1. Click
1. Click

2. Click
1.Input

2. Change the values


if needed.
3.You can
4. Click check model
here
1. Click

2. Click
1.Input

2. Click
1. Click 2. If there is no passive joint, then skip it!
2.Input

1. Click
2.Input

3. Click

1. Click
The End!
Run OpenManipulator Demo
$ cd ~/catkin_ws/src/open_manipulator/open_manipulator_moveit_example
$ ls
Config → MoveIt! yaml & SRDF files for robot configuration
launch → launch file
.setup_assistant → Package information created by setup assistant
CMakeLists.txt → CMake file
package.xml → Package configuration file

$ cd ~/catkin_ws && catkin_make

$ roslaunch open_manipulator_moveit_example demo.launch

70
Run OpenManipulator Demo
• Context > Planning Library > OMPL • Locate end-effector
• You can choose planning library • Click ‘Plan & Excute’ button
• Choose RRTConnectkConfigDefault
• Check how they move

2. Drag or rotation
Using interactive Marker
1. Change
3.Click ‘Plan and Execute’

71
MoveIt! + Gazebo : Move to the goal position
$ roslaunch open_manipulator_gazebo open_manipulator_gazebo.launch
$ roslaunch open_manipulator_moveit open_manipulator_demo.launch use_gazebo:=true

72
MoveIt! + Gazebo : Gripper control
$ rostopic pub /robotis/open_manipulator/gripper std_msgs/String "data: 'grip_on'" --once

73
Control of Real Platform
• Required configuration to operate robot from PC
U2D2

SMPS2DYNAMIXEL OpenManipulator (Chain model)

$ roslaunch chmod a+rw /dev/ttyUSB0


$ roslaunch open_manipulator_dynamixel_ctrl dynamixel_controller.launch

74
Control of Real Platform (using MoveIt!)
$ roslaunch open_manipulator_moveit open_manipulator_demo.launch

75
Last practice!
Let’s combine
Mobile Robot and Manipulator!
OpenManipulator + TurtleBot3 Waffle
$ roscd open_manipulator_with_tb3/urdf
$ gedit open_manipulator_chain_with_tb3.xacro

<!-- Include TurtleBot3 Waffle URDF -->


<xacro:include filename="$(find turtlebot3_description)/urdf/turtlebot3_waffle_naked.urdf.xacro" />

<!-- Base fixed joint -->


<joint name="base_fixed" type="fixed">
<origin xyz="-0.005 0.0 0.091" rpy="0 0 0"/>
<parent link="base_link"/>
<child link="link1"/>
</joint> Insert ‘OpenManipulator’ to TurtleBot3

$ roslaunch open_manipulator_with_tb3 open_manipulator_chain_with_tb3_rviz.launch


77
OpenManipulator + TurtleBot3 Waffle

78
79
80
Question Time!
Advertisement #1

Download link
Language:
English, Chinese, Japanese, Korean

“ROS Robot Programming”


A Handbook is written by TurtleBot3 Developers
Advertisement #2

AI Research Starts Here


ROS Official Platform
TurtleBot3 is a new generation mobile robot that’s modular, compact and
customizable. Let's explore ROS and create exciting applications for education,
research and product development.

Direct Link
Advertisement #3

www.robotsource.org
The ‘RobotSource’ community is the space for people making robots.

We hope to be a community where we can share knowledge about robots, share


robot development information and experiences, help each other and collaborate
together. Through this community, we want to realize open robotics without disti
nguishing between students, universities, research institutes and companies.

Join us in the Robot community ~


END.

You might also like