Design and Implementation of A Robotic Arm Using Ros and Moveit!

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

2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2017).

Ixtapa, Mexico

Design and Implementation of a Robotic Arm using


ROS and MoveIt!
Sergio Hernandez-Mendez, Hector Vazquez-Leal Elvia R. Palacios-Hernandez
Carolina Maldonado-Mendez, Electronic Instrumentation and Faculty of Sciences and
Antonio Marin-Hernandez Atmospheric Sciences School Faculty of Engineering,
and Homero Vladimir Rios-Figueroa Universidad Veracruzana, Universidad Autonoma de San Luis Potosi
Artificial Intelligence Research Center, Xalapa, Veracruz, Mexico San Luis Potosi, SLP, Mexico
Universidad Veracruzana, Email: [email protected] Email: [email protected]
Xalapa, Veracruz, Mexico
Email:[sergihernandez,cmaldonado,
anmarin,hrios]@uv.mx

Abstract—In this paper is presented an interfacing of a robotic controller is needed. The final phase, the object is placed
arm with a motion planner and a 3D viewer (RViz). The in the target position, which requires robust and reactive
main purpose of this work, is to manipulate and grip objects position/force control strategies.
to transport them from one location to another using Robot
Operating System (ROS). In order to do this task, a motion There are several works that show the simulation of a
planner, who deal with constraints, i.e. collisions among the arm robotic arm for manipulating objects [6][7]. In [8] an indoor
joints and objects, is used. Also a 3D viewer, called RViz, is object handling application is used. It has 7 degree of freedom
used to visualize (online and offline) the motion of the arm. lightweight robotic arm and a commercial depth sensor. To
To easily interface the 3 degree of freedom (DOF) arm, it was control the trajectory of the robotic arm, they tested different
designed using FreeCAD, as the output files used to print the
arm, are simultaneously exported to create the Unified Robot planners on Moveit! (a ROS node for motion planning).
Description Format (URDF) files required for the planner and However, the gripper on this arm does not have a force control
viewer. A position-force controller for the gripper, previously to take the object. In [9] the design and construction of a
presented, has been used to pick up and hold the object during robot arm prosthesis of 5 degrees of freedom is shown. The
the manipulation. Some experiments where carried out to asses authors of this work propose as future work to export their 3D
the result of the interface, the execution of the motion planning
avoiding collision and the grasp to the object. These results are design to ROS to be able to visualize it, as well as a trajectory
shown and discussed. planner. The gripper opens and closes without control of force
or position.
I. I NTRODUCTION In this work to achieve the manipulation of objects, a 3-
OBILE manipulation is an important research area for DOF arm with two independent fingers has been designed
M many robotic applications [1][2][3]. Moreover, the ability
to manipulate objects is a key skill for service robots as it
and implemented. The arm was designed using FreeCAD. The
output files are used to print the arm and they are exported to
allows them to develop a greater number of tasks [4]. To ROS to create the Unified Robot Description Format (URDF)
efficiently manipulate objects it is necessary a robotic arm, files for visualize. Both the motion planning and the arm are
composed by joints, links and an end-effector or gripper. In visualized in RViz while the physical arm is executing the plan
addition, the robotic arm must have sensors that allows to (see Fig.1).
know its position and speed, as well as the force it applies to
the grasped object.
According to [5] the robotic manipulation of objects is
divided into 4 phases: Pre-grasp manipulation, Grasp ac-
quisition, Post-grasp transport and Goal. In the Pre-grasp
phase, the arm is directed to a position close to the object.
To achieve this purpose a motion planning followed by its
execution is used. In the Grasp Acquisition phase, the gripper
makes contact with the object, however as it is possible to
alter the initial position of the object, even break it, some
force and position controllers are not suitable. The third phase,
Post-grasp transport is performed after the object is grasped, Figure 1. Overview of the design the arm and communication with ROS.
and it consists on moving the object from one position to
another. During this phase a robust and reactive position/force Robotic Operating System (ROS) [10] and MoveIt! [11] are

978-1-5386-0819-7/17/$31.00 2017
c IEEE
2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2017). Ixtapa, Mexico

used to manipulate and grasp the object. ROS and Moveit! Robotis Dynamixel series motors1 . Dynamixel motors let us
let us to use the package: Open Motion Planning Library to obtain their speed, temperature, shaft position, voltage and
(OMPL), which provides a variety of motion planning algo- load. These motors are daisy chained together on a commu-
rithms to control different robots. OMPL is widely used in nication bus and connected to pc’s USB port by an USB to
the robotics community for solving path problems with many Dynamixel Adapter. In order to obtain higher torques closer
constraints. to the elbow and shoulder joints, heavier and more powerful
In the presented work, when the arm is moving, the con- servomotors were placed; two MX-106T on the shoulder and
straints are to avoid bumping into the table, while avoiding one MX-64T in the elbow. The lighter and smaller RX-28 and
collisions with the arm itself. For the success grasping of AX-12 actuators were chosen for the wrist and gripper joints
the object, a position/force controller previously implemented in order to decrease the weight of the arm.
in [12] has been used. This controller has been designed to The gripper was manufactured by CrustCrawler Robotics,
place the object in the center of the gripper, so initially the and it was modeled in 3D, in order to visualize the complete
fingers are controlled by a PID controller in position mode. arm including its gripper. All parts of the gripper are made in
Next the controller switches to PID force mode to be able aluminum with a maximum opening of 22.86cm and a length
to lift up the object. Additionally, the packages contained in of 10.16cm.
the robot model are adapted to the correct visualization of the In order to measure the force applied to the object, two
arm and its gripper in RViz. RViz let us visualize the current piezo-electric sensors were placed at the fingertips of the
physical arm configuration on a virtual model of the arm, and gripper:
display live representations of sensor values coming over ROS
topics. • The piezo-electric force sensor FSS-SMT is about 1cm
This paper is organized as follows: Section II describes long, produced by Honeywell2 . The main features of it,
the structure of the arm, their design, and the mechanical are that the element is a micro-machined piezo-resistive
and electronic components. Section III shows the Software silicon; energy consumption is low, it has Wheatstone
Architecture, the packages used in the robotic arm for the bridge design and all this provides a stable output in mV
communication of hardware and software over ROS. Section over the range of force exerted.
IV shows the position/force hybrid controller used in the grip- This sensor was selected in this work, as it has proved a good
per. In section V, the experiments and the results obtained are performance as reported in [14].
presented. And finally in section VI are given the conclusions. The force sensors are connected to an acquisition module
II. S TRUCTURE OF THE A RM based on a Mega Arduino board3 , with 12 bits external ADC.
The sensor cables as well as those of the motors are routed
In Fig. 2a it is shown the arm technical drawing, it has 3 through the inside of the arm whenever possible to keep them
the degrees of freedom; arm length with the gripper included tidy.
is 70.2cm. Fig. 2b shows the assembled arm.

A. 3D arm design
An open-source CAD program call FreeCAD, was used
to design the pieces of the arm corresponding to the three
degrees of freedom. FreeCAD is based on OpenCasCade, Qt
and Python and has open-source libraries [13]. It allow to
create meshes in STL, which are exported to be constructed
on a 3D printer and to create the URDF required in ROS to
visualize the movements of the physical arm. In Fig. 2a, it is
shown the arm components. The first one is the arm’s base,
it allows to hold the shoulder of the arm to any surface. The
shoulder is connected to the second piece called the upper arm
and at its end, it’s connected the elbow. Then, here is connected
the third piece called fore arm. In the fore arm is connected
the wrist bracket, and finally, the gripper is connected here.
The pieces of the arm’s base, the upper arm, the fore arm (a) (b)
and wrist bracket were constructed on a 3D printer. As the Figure 2. a) Mechanical design of the manipulator (degrees of freedom are
gripper was acquired from CrustCrawler Robotics, it was only shown in red, all dimensions are in mm). b) The assembled robotic arm.
modeled in CAD for visualization purposes.

B. Electrical and mechanical components


1 http://support.robotis.com/en/
The motors in each joint of the arm (shoulder, elbow and 2 https://sensing.honeywell.com

wrist), as well as the motors of the gripper, are driven by 3 https://www.arduino.cc/


2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2017). Ixtapa, Mexico

III. S OFTWARE A RCHITECTURE

In order to achieve object manipulation with the arm and


its visualization, the methodology based on Robot Operating
System[10] has been adopted. ROS is an open source meta-
operating system designed for robots, which provides fea-
tures such as hardware abstraction, low-level device control,
packages for common functionalities a communications frame-
work, and a variety of other libraries and tools. The system
is composed of reusable libraries that are designed to work
independently. The libraries are wrapped with a thin message-
passing layer that enables them to be used by and make use
of other ROS nodes. Messages are passed peer to peer and
Figure 3. Hardware and software architecture with ROS packages.
are not based on a specific programming language and the
connections between nodes are managed via the ROS master
node. C. Robot model package for the arm robotic
The following sections explain each of the packages used
It is very important that physical robot matches the
in the robotic arm, and can be seen in Fig.3.
Kinematic arm model. ROS has a meta package called
robot model, which contains important packages that help to
A. ROS Dynamixel package build the 3D robot models. The Unified Robot Description
Dynamixel packages are available in a dynamixel motor 4 Format (URDF) is used in this package. The URDF is an XML
stack of ROS. This stack contains packages that are used to specification, which describe the robotic arm model. This file
interface with Robotis Dynamixel line of motors. This stack can calculate the 3D pose of arm robotic and detect potential
was tested with and fully supports AX 12, AX 18, RX24, RX collisions between the arm and its environment.
28, MX28, RX64, MX64, EX106 and MX106 models.
As mentioned in section II-B, the arm is composed of a
shoulder, which is controlled by two Dynamixel MX-106T
motors, one elbow that is controlled by one Dynamixel MX-
64T motor, one wrist that is controlled by one Dynamixel RX-
28 motor and finally the gripper is controlled by two AX-12
Dynamixel motor.

B. Rosserial package
Rosserial 5 is a protocol for wrapping standard ROS serial-
ized messages and multiplexing multiple topics and services
over a character device such as a serial port or network socket.
The rosserial API is used to perform the same function-
ality on devices that communicate via serial communication
devices. In our case for Arduino, rosserial arduino is used
to implement ROS communication using the rosserial API.
The main advantage of using rosserial is that it allows the
Arduino board to become transparent to the rest of the system.
As mentioned before, Arduino allows us to connect the force (a) (b)
sensors, placed on the gripper fingers, with ROS. Figure 4. a) Robotic arm displayed in RViz, b) The corresponding URDF
Data acquired is formatted into a ROS Message directly specification. The links and joints are visualized by boxes and ellipses
on the Arduino board. Then data is serialized and sent to PC respectively.
computer by USB port with 57600 baud rate. The rosserial
node controls communication, checks data and publishes top- The URDF model uses two different language elements,
ics created by Arduino on the ROS System. namely links and joints. The link correspond a rigid body
In the Fig. 3, it is shown the communication structure for part of a robot; it is possible to specify size, shape and color
the rosserial and gripper, and the different packages used in of it. Along this work, the 3D mesh has been imported to
ROS. represent each robot link. Besides, it’s possible to provide
dynamic properties of the link such as inertial matrix and
4 http://wiki.ros.org/dynamixel motor collision properties. The joint is the connection of two different
5 http://wiki.ros.org/rosserial links. It is possible to include different types of joints, for
2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2017). Ixtapa, Mexico

example continuous, revolute, prismatic, fixed, floating, and


planar, as well as specify the speed and limit of each joint. In
the Fig. 4a is shown an image from RViz displaying the robotic
arm model. To control 3D model the position of each join, the
relationships of the links are required. For this purpose, ROS
offers two packages that can be included inside the model of
the robot, the package joint state publisher and the package
robot state publisher
• joint state publisher: This package contains a node
called joint state publisher, which reads the robot model
description, finds all joints, and publish joint values to all
nonfixed joints using GUI sliders.
Figure 5. Control scheme that switches from position control to force control.
• robot state publisher: This package reads the current
robot joint states and publishes the 3D poses of each
robot link. The 3D pose of the robot is published as ROS
tf (transform). ROS tf publishes the relationship between object at a given speed of motor, has been performed in [12].
coordinates frames of a robot. The result is a second-order equation (Eq.1) shown below;
In the Fig. 4b it is shown the corresponding URDF speci-
fication; links and joints are visualized by boxes and ellipses v(f ) = 0.069913f 2 + 0.266199f + 0.708132 (1)
respectively. where f is the force measured in the sensor and v it is
the motor speed. During the implementation of the force
D. Planning Algorithms with Moveit!
controller, the input is the force measured on the sensor, it
MoveIt! lets to use the OMPL package, which provides a becomes a speed using Equation 1, and this is the controller
variety of motion planning algorithms to control the different output. The ideal PID algorithm for the position controller is
robots. MoveIt! allows users to interact with motion planners given by:
in a simple manner.
UP (s) 1
= KP p [1 + + TP d s] (2)
IV. P OSITION F ORCE C ONTROLLER EP (s) TP i s
During the grasping of the object, it is important hold it with Now, applying the backward difference method, yields:
the enough force and in the correct position. For this purpose UP (s) 1
a position-force PID controller was used [12]. When the arm = KP p [1 + + TP d s] (3)
EP (s) TP i s
is placed close to the object, in the Grasp Acquisition phase,
the gripper position-force controller is started. In Fig. 5 it is B.D. TP s (1 − z −1 )
−→ uP (t) = eP (t)KP p [1 + + T P d
shown the scheme of the force and position PID controller, TP i (1 − z −1 ) TP s
which is used in the gripper system. The controller operates and simplifying:
of the following way:
• Position: when a object is detected, this controller is on,
uP (t) = uP (t − 1) + KP p [eP (t) − eP (t − 1)] (4)
and the object is collocated at the center of the gripper, KP p T P s
+ eP (t)
it is called correct position. When the PID output is TP i
less than a threshold ε, this controller will turn off. The KP p T P d
+ [eP (t) − 2eP (t − 1) + eP (t − 2)]
threshold ε is specified by absolute percentage of the set TP s
point position. In our case ε is equal 98%. which is known as the velocity PID controller.
• Force: once the PID of position is off, this PID of force The force controller is similar only replacing P by F in
is on. It is used to apply the enough force to manipulate eqs. (2), (3) and (4).
the object without damaging it.
V. E XPERIMENTS
Both PID controllers operate in closed loop mode to main-
tain a prescribed set-point. Each finger has its own motor, in In order to assess the interface implemented in this work
which the parameters, as speed, temperature and position are with MoveIt! and RViz, some experiment were designed to
tracked. For the PID position controller, the feedback signal test the followings points:
is the position of the motor shaft. Experimentally it has been • The physical robot matches the Kinematic Tree model,
established that when the motor rotates faster the gripper exerts in order minimize errors between motions and positions
more force on the object. For this reason, a force sensor is of the physical arm versus the visualized robot in RViz.
collocated in each finger. The signal of the force sensor is used • The motion planning must direct the arm and gripper
as feedback signal for PID force controller. For this purpose, a close to the object position for picking up it, and to direct
characterization of the force sensor when the gripper holds an to the target position, where the object is released.
2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2017). Ixtapa, Mexico

• During the object manipulation the position-force PID


controller is run.
The position of the object is known. In the Fig. 6 the
environment in which the arm is located is shown. For this
work several planning algorithms from OMPL are explored.
The RRT-Connect algorithm has been selected, because it finds
a plan in most of the cases and with a reasonable time [15].
In Fig.7 it is shown, throughout the manipulation experi-
ment, that the arm in RViz (1-12)A is aligned with the physical
arm (1-12)B. Also the motion planner, established the route
for the arm to move towards the object, take it and place it
then in the target position. Finally the hybrid PID controller,
Figure 6. Experimental setup, the task is to grasp the object and take it to
manipulates the object in such a way that it does not loose or the other side of the table.
damage it during the grasp transport phase from one position
to another.
In Fig. 7(1-6)A is shown the visualization of the arm in physical arm in RViz. The Moveit! library was used to plan the
RViz. The initial position of the arm (blue arm) is visualized in trajectory, for moving our arm of 3 degrees of freedom, from
RViz in Fig. 7(1A), and the initial position in the physical arm an initial point to an end-point, which were visualized in RViz
is shown in Fig. 7(1B). The target position is settled (yellow and were executed in the robotic arm. Subsequently, a hybrid
arm), and it is shown in Fig. 7(1A). The motion planning position-force controller was executed on the gripper in order
is run, and the arm is moved from the initial position to to manipulate the object. This controller allowed to take an
target position. The execution of the trajectory can be seen object without being slipped from the gripper. In future work
in Fig. 7(1-6)B for the physical arm and in Fig. 7(1-6)A for a vision module will be implemented to integrate it into our
the visualized arm. This is the pre-grasp phase. Once the robotic arm, which will allow you to identify and locate the
arm is placed in front of the object (Fig. 7(7-B)), the hybrid objects.
control to grasp the object is initialized. This is the Grasp
Acquisition phase. In this phase, the gripper takes the object R EFERENCES
and located it at the middle of the gripper applying enough
[1] C. C. Kemp, A. Edsinger, and E. Torres-Jara, “Challenges for robot
force to not release or damage it. The set-point of the PID manipulation in human environments [grand challenges of robotics],”
is calculated in real time and the controller was tuned in IEEE Robotics Automation Magazine, vol. 14, no. 1, pp. 20–29, March
accordance with [12]. At this time the Post-grasp transport 2007.
[2] A. Bicchi, “Hands for dexterous manipulation and robust grasping: a
phase starts, Fig.7(8-11)A. During this phase, the PID hybrid difficult road toward simplicity,” IEEE Transactions on Robotics and
controller is working in order to manipulate the object and Automation, vol. 16, no. 6, pp. 652–662, Dec 2000.
deposit it in the target location. As mentioned before the hybrid [3] R. R. Ma and A. M. Dollar, “On dexterity and dexterous manipulation,”
in 2011 15th International Conference on Advanced Robotics (ICAR),
PID of each finger has a position sensor and a force sensor to June 2011, pp. 1–7.
perform the controller feedback. [4] K. Tai, A.-R. El-Sayed, M. Shahriari, M. Biglarbegian, and S. Mahmud,
In Fig. 8, the top graph is shown how the position of the “State of the art robotic grippers and applications,” Robotics, vol. 5,
no. 2, p. 11, 2016.
motor is adjusted until the object is centered, it corresponds [5] T. Doersam and L. Munoz Ubando, “Robotic hands: modelisation,
to the value of 1.8 radians. In the lower graph, it is observed control and grasping strategies,” in Meeting annuel de LInstitute Fanco-
how the force that is applied to the object has been adjusted Allemand pour les Application de la recherche IAR, 1995.
in such a way that during the manipulation does not release [6] W. Qian, Z. Xia, J. Xiong, Y. Gan, Y. Guo, S. Weng, H. Deng, Y. Hu,
and J. Zhang, “Manipulation task simulation using ros and gazebo,” in
it. The force that tries to maintain on the object correspond to Robotics and Biomimetics (ROBIO), 2014 IEEE International Confer-
50mv, according to the force mapping in [14]. In Fig. 9, the ence on. IEEE, 2014, pp. 2594–2598.
top graph is shown the PID error, a peak is observed in the [7] C. Zito, R. Stolkin, M. Kopicki, and J. L. Wyatt, “Two-level rrt
planning for robotic push manipulation,” in 2012 IEEE/RSJ International
time of 8s, it means the object is being transported and the Conference on Intelligent Robots and Systems, Oct 2012, pp. 678–685.
controller responds to minimize the signal of the error. The [8] C. Militaru, A.-D. Mezei, and L. Tamas, “Object handling in cluttered
lower graph shows the PID output, the same peak is observed indoor environment with a mobile manipulator,” in Automation, Quality
and Testing, Robotics (AQTR), 2016 IEEE International Conference on.
in the time of 8s, then the position controller switch to force IEEE, 2016, pp. 1–6.
controller, and the output of the PID is increased to 3.8. [9] M. R. Dawson, C. Sherstan, J. P. Carey, J. S. Hebert, and P. M.
Pilarski, “Development of the bento arm: An improved robotic arm for
VI. C ONCLUSIONS AND F UTURE W ORK myoelectric training and research,” Proc. of MEC, vol. 14, pp. 60–64,
2014.
In this work the design and implementation of a robotic arm [10] M. Quigley, K. Conley, B. Gerkey, J. Faust, T. Foote, J. Leibs,
was presented, as well as, the integration of several modules R. Wheeler, and A. Y. Ng, “Ros: an open-source robot operating system,”
in ROS in order to achieve the objective of manipulating an in ICRA workshop on open source software, vol. 3, no. 3.2. Kobe, 2009,
p. 5.
object over a semi-structured environment. With this integra- [11] S. Chitta, I. Sucan, and S. Cousins, “Moveit! [ros topics],” IEEE
tion, it was possible to visualize at all times the state of the Robotics Automation Magazine, vol. 19, no. 1, pp. 18–19, March 2012.
2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2017). Ixtapa, Mexico

Figure 7. The sequence of images (synthetic) of the visualization in RViz is shown in (1-12)A. The execution on the physical arm is shown in the image
sequence (1-12)B. In 1-6, is shown the path planning from the initial position to the desired position (Pre-grasp manipulation phase). In 7-A and 7-B, the
object is taken, Grasp Acquisition phase. In 8-11, the object is moving from one position to another, Post-grasp transport phase. In 12-A and 12-B shows
how the object is released in another place.

Figure 8. In the top chart is shown the readings of the position sensor which
are used to adjust the PID of position. In the lower chart is shown the readings
of the force sensor which are used to adjust the PID of force.
Figure 9. In the top chart is shown the error of the PID position and force.
In the below chart is shown the output of the PID position and the force.

[12] S. Hernandez-Mendez, A. Marin-Hernandez, E. R. Palacios-Hernandez,


and K. L. Luna-Gallegos, “A switching position/force controller for two 155–160.
independent finger gripper over ros,” in 2017 International Conference [15] J. J. Kuffner and S. M. LaValle, “Rrt-connect: An efficient approach
on Electronics, Communications and Computers (CONIELECOMP), to single-query path planning,” in Proceedings 2000 ICRA. Millennium
Feb 2017, pp. 1–6. Conference. IEEE International Conference on Robotics and Automa-
[13] B. Collette and D. Falck, FreeCAD [how-to]: Solid Modeling with the tion. Symposia Proceedings (Cat. No.00CH37065), vol. 2, 2000, pp.
Power of Python. Packt Pub., 2012. 995–1001 vol.2.
[14] S. Hernandez-Mendez, A. Marin-Hernandez, E. R. Palacios-Hernandez,
and H. Vazquez-Leal, “Characterization of two force sensors to be used
in a robotic hand,” in Electronics, Communications and Computers
(CONIELECOMP), 2015 International Conference on, Feb 2015, pp.

You might also like