Professional Documents
Culture Documents
Robotic Mushroom Harvesting by Employing Probabilistic Road Map and Inverse Kinematics
Robotic Mushroom Harvesting by Employing Probabilistic Road Map and Inverse Kinematics
Abstract. A collision free path to a target location in a random farm is computed by employing a probabilistic
roadmap (PRM) that can handle static and dynamic obstacles. The location of ripened mushrooms is an input
obtained by image processing. A mushroom harvesting robot is discussed that employs inverse kinematics (IK) at
the target location to compute the state of a robotic hand for holding a ripened mushroom and plucking it. Kinematic
model of a two-finger dexterous hand with 3 degrees of freedom for plucking mushrooms was developed using the
Denavit-Hartenberg method. Unlike previous research in mushroom harvesting, mushrooms are not planted in a
grid or some pattern, but are randomly distributed. No human intervention is required at any stage of harvesting.
Keywords: Mushroom harvesting, probabilistic road map, motion planning, inverse kinematics.
1
2 M. G. Mohanan and Ambuja Salgaonkar
PRM is a sampling based 2-step iterative method that of neighbouring nodes in the same roadmap in the
includes roadmap construction and querying [see algo- order of their distances from qgoal . Try connecting
rithm and Figures 2 and 3 below]. It checks if a robot is in qinit to each of its neighbouring nodes, and qgoal to its
an obstacle free configuration space Qfree , [for details see neighbouring nodes; call the nodes a0 and a00 , respec-
Figures 2 and 3 below]. tively. Search the graph G for a sequence of edges
The core of our mushroom harvesting robot is a PRM in E connecting a0 to a00 Convert this sequence into
algorithm for encountering static obstacles [2, 7, 8]. The a feasible path for the robot by computing the cor-
following algorithm for navigation of a robot through a responding local paths and concatenating them. The
mushroom farm is an implementation of [14–19]. local paths can be stored in the roadmap. The whole
sequence, qint – a0 – · · · – a00 – qgoal is a feasible path
3.1 Algorithm for Static Obstacles for a robot. Among the feasible paths, find the short-
est path on the roadmap between qinit and qgoal by
Definitions: employing an appropriate algorithm—one of the A*,
D and D*Lite algorithms [20–24].
1. A roadmap is an undirected graph G = (V, E), where
the nodes in V represent a set of ripened mushrooms,
and each edge in E is a collision-free path between Algorithm for static obstacles
two nodes computed by a localplanner. See Figure 2
Repeat steps S1 and S2 below, until all mushrooms in the
below.
node set G are covered
2. Nodes qinit and qgoal are user-provided inputs. They
are respectively the initial and final nodes in a path S1 (construction). For a given workspace, construct a
to be discovered by the algorithm, roadmap in a probabilistic manner, i.e., randomly select
3. Querying: Let ConnectQinit be a list of neighbouring a configuration of nodes (provided by image processing),
nodes in the roadmap in the order of their distances using some sampling distribution.
from qinit , and similarly, let ConnectQgoal be a list S2 (querying). Given an initial configuration qinit and goal
configuration qgoal , find the shortest path connecting qinit
and qgoal .
Remark: The robot is supposed to move and pluck all
the mushrooms along this path, and remove them from
the graph. Then the two steps of the algorithm are to be
repeated.
Figures 2 and 3 below illustrate the two phases of the
iterative path finding algorithm. In Figure 3, the shortest
path from qinit to qgoal is marked with thick lines.
3. Local reconnections
During the next call to the edge-labelling, if location Mi of Table 1. D-H parameters of pointing finger (From [35])
a moving object matches a stored location, further compu- # di a i −1 α i −1 θi
tation is not necessary: the results of the previous collision Joint (joint (link (link (joint
tests are retrieved and further collision tests are cancelled. i distance) length) twist) angle)
Otherwise, the new location Mi is inserted in the edge-tree 1 0 0 0 θ1
structure, while maintaining the details of the last-checked 2 0 l1 0 θ2
positions. Older positions are removed from the data struc-
ture in order to reduce the size of the roadmap. When an 3 0 l2 0 θ3
obstacle stops moving, it is treated as a static one. 4 0 l3 0 0
4 Kinematics for Robotic Hand displacement at each joint. On the contrary, if the location
of an end-effector is known, inverse kinematics computes
Motion the required angular displacement at each finger-joint
[31–35].
Getting a roadmap ready is a task that enables a robot In the following paragraphs we discuss the design of a
to reach the ripened mushrooms at the nearest possible robotic hand for automatic mushroom plucking.
place from its current location. The next task is to model The inverse kinematics computations for the finger sim-
the motion of the robot hand (the end effector) to reach a ulating the pointing finger are shown below. The coor-
ripened mushroom. dinates of a mushroom to be plucked are the driving
The design of a dexterous robot hand is driven by parameter. The computation of the thumb follows the same
the task assigned to it. Diverse models have been dis- logic. The difference is that the thumb has one less joint.
cussed [29, 30]. We discuss an assembly of two fingers The links have an ordered structure in which each link
(analogous to a thumb and a pointing finger of a human has its own coordinate system, and is positioned relative to
hand) that gets a grip on the stem of the mushroom bud to the coordinate system of the previous link. The position of
be plucked, and next, the process of uprooting the stem. the link i in the coordinate system of its ancestor is obtained
(Arguably, a five-finger hand like that of a human will by computing the joint angle [34, 36–43].
be a too-heavy and complicated assembly for the present The transformation matrix between two adjacent con-
purpose, as it would take more space and may harm the necting joints is calculated using the D-H parameters in
neighbouring buds). Formula (1) and the Table 1, where si indicates sin θi , ci
A diagram of this proposed mushroom plucking robot- indicates cos θi (i = 1, 2, 3), αi−1 is the twist angle, ai−1
hand is shown in Figure 6. The first finger-link in the is the length of linkages, and di is the offset of the link-
structure is known as the base and the end link is known ages. The transformation matrix of the manipulator finger
as the end effector. is obtained by multiplying the transformation matrix of
The required angular displacements in the finger-links
each connecting link i−1i T (i = 1, 2, 3, 4), which is a function
through the motions at the finger-joints are computed by
with the three joint variables (θ1 , θ2 , θ3 , θ4 ). where θ4 = 0.
employing kinematics, i.e., the study of the motion of
bodies without consideration of the forces that cause the Step 1: Holding a mushroom stem:
motion.
Kinematics is of two types, forward and inverse. In the (Xi , Yi , Zi ) represents an axial frame of reference. For i =
case of the robotic hand, forward kinematics gener- 0 it represents the coordinates of the base; the value of i
ates the location of the end effector given the angular increases by 1 to denote the coordinates of the next joint.
The link after the last joint is the tip, i.e., the end-effector.
Hence (X3 , Y3 , Z3 ) is the frame of reference for the end-
effector of a pointing finger (Figure 7), while for the thumb
it is (X2 , Y2 , Z2 ).
Step 1.1: Compute the D-H parameters of the pointing
finger, as in Figure 8.
Explanation: The transformation matrix between two adja-
cent connecting joints can be calculated by the D-H param-
eters in Formula (1) and the Table 1. where si indicates sin
θi , ci indicates cos θi (i = 1, 2, 3), αi − 1 is the twist angle,
ai−1 is the length of linkages, and di is the offset of linkages
The transformation matrix of the manipulator finger can be
Figure 6. Model of a two-finger robot hand. obtained by multiplying continuously the transformation
6 M. G. Mohanan and Ambuja Salgaonkar
Hence we have
Cθ 1 −Sθ 1 0 0
0
Sθ1 Cθ1 0 0
1T = 0 (2)
0 1 0
0 0 0 1
Cθ 2 −Sθ2 0 l1
1
Sθ2 Cθ2 0 0
2T = 0 (3)
0 1 0
0 0 0 1
Cθ 3 −Sθ3 0 l2
2
Sθ3 Cθ3 0 0
3T = 0 (4)
0 1 0
0 0 0 1
Figure 7. Model of pointing finger. 1 0 0 l3
3
0 1 0 0
4 T = 0 0 1 0 (5)
0 0 0 1
C ( θ 1 + θ2 + θ3 ) − S ( θ 1 + θ2 + θ3 ) 0
0
S ( θ1 + θ2 + θ3 ) C ( θ1 + θ2 + θ3 ) 0
4T =
0 0 1
0 0 0
l1 Cθ 1 + l2 C (θ1 + θ2 ) + l3 C (θ1 + θ2 + θ3 )
l1 Sθ 1 + l2 S (θ1 + θ2 ) + l3 S(θ1 + θ2 + θ3 )
(6)
0
1
where S and C represent the sine and cosine functions. py = l1 Sθ 1 + l2 S (θ1 + θ2 ) (10)
Robotic Mushroom Harvesting by Employing Probabilistic Road Map and Inverse Kinematics 7
θ2 = atan(Sθ 2 , Cθ2 )
5. {ci }, 1 ≤ i ≤ n, /* images captured by camera ci, Employ a suitable mechanical process to realize
1 ≤ i ≤ n, */ the gripping of the mushroom
6. V = in=1 {ci } /* the vertex set V for a mushroom
S
Compute the change in elevation of the mush-
plucker to work with.*/ room holding hand such that the mushroom will
7. //Results: be uprooted
8. //The average cost of mushroom plucking in this Employ a suitable process to move the robotic
method hand and pluck the mushroom.
9. //Begin
The average cost of mushroom plucking in this method
10. G = resultant subgraph from V
= Average cost of traversal of a node in path Pgoal + cost
11. /* Employ the construction phase of the PRM to find
of gripping a mushroom + cost of uprooting the mush-
out vertex clusters within radius u of the robot such
room.
that there exists a collision free navigation path con-
necting any two vertices of a cluster. The inter-cluster
connectivity is taken care of by a local planner. Let G
be the resultant subgraph */ 6 Discussion
12. W = cost matrix Below we have presented algorithms for the automation
13. wi j = cost of traversal /* the cost of traversal from of mushroom harvesting, with the focus on the following
the i-th pluckable areas:
14. mushroom to the j-th pluckable mushroom */
(i) Identification of ripened mushroom by employing
15. Let Pgoal = {} /* initially. */
image processing
16. Let vs and vt be two randomly selected vertices of G
(ii) Using dynamic PRM to obtain a collision-free path
17. Employ PRM querying with vs and vt on G and get
(this is a novel feature not found in the literature),
a path P connecting the two. Let Vp be the set of ver-
tices that comprise P. (iii) No human intervention is required for obstacle
avoidance, as this is done by the PRM algorithm
18. if P is the spanning path:
itself,
19. then append P to Pgoal and stop
(iv) Application of IK to compute the coordinates of a
20. else: mushroom plucking robot,
21. G = G \Vp < G is obtained by deleting the vertices of (v) Minimising damage to mushrooms while plucking,
Vp from the original G >
(vi) Cost optimisation in terms of labour, resources and
22. Select v1 and v2 randomly from the vertex set of G plucking cycles,
23. if wt1 > wt2 : (vi) Minimising mushroom wastage due to environmen-
24. then vs = v2 and vt = v1 tal factors like humidity and temperature.
25. else:
26. vs = v1 and vt = v2
27. append vs to Pgoal 7 Brief Cost Details
28. Go to step 17
29. Compute the total cost of Pgoal , i.e., the summation Mechanization of operations has arisen in practically every
of the costs of traversal from i-th vertex to i + 1-th in area of the farming sector. This is a side effect of reduc-
Pgoal , where i = 1 to k < k + 1 is the length of the tion in population that engages in farm labour as industrial
path Pgoal > development takes place. In other words, machines step in
whenever and wherever human labour becomes unavail-
30. /* Reaching, gripping and plucking the mushrooms
able, inefficient or expensive.
on a given path */
The all-too-real problem faced by farmers generally—
31. /* Let v1 , v2 , . . . , v N be the vertices (of the pluckable mushroom farmers in the present case—is the non avail-
mushrooms) on Pgoal . */ for i = 1 to N: ability of labour for the timely harvesting of crops. Due to
Traverse vi this, mushrooms get over-ripe or damaged and result in
losses to farmers.
Read the elevation of the pluckable mushroom so
It is stipulated that the problem can be solved by robotic
that we get its
automation. The speed of harvesting is more, so the dura-
coordinates in a three-dimensional frame tion of harvesting is less. Additionally, machines mitigate
Employ IK to compute the angles at each joint human factors like fatigue and lack of diligence. As a result,
of the robot-hand such that the robot-fingers will large-scale and low-cost farming becomes feasible with
reach and hold the pluckable mushroom such automation.
Robotic Mushroom Harvesting by Employing Probabilistic Road Map and Inverse Kinematics 9
The costs in mushroom farming are as in Table 2. different joints of the dexterous robotic fingers are com-
puted by employing IK such that first the fingertips reach
Table 2. Approximate costs of manual mushroom harvest- the ripened mushroom bud and hold it; next the fingers
ing on a one acre farm move upwards so that the mushroom is plucked; and third,
Recurring costs per harvesting cycle the robotic hand places the mushroom in an container
Item Cost (Rs) without damaging it.
Labour 50,000 The novelty of our research is as follows
Fertiliser and spores 20,000 (i) This is the first time that PRM algorithms are being
proposed for navigation inside mushroom farms.
Electricity and water 30,000
(ii) Unlike previous research in mushroom harvesting,
Transportation 20,000 mushrooms are not planted in a grid or some pattern,
Miscellaneous expenses 5,000 but are randomly distributed.
(iii) No human intervention is required at any stage of
Total per harvesting cycle 1,25,000
harvesting.
(iv) Robotic automation reduces crop wastage due to
These figures can vary depending on the circumstances, unavailability of labour and untimely harvesting of
but the order of magnitude is correct. If three crops can be mushrooms.
obtained yearly, the annual profit will be in the range of (v) Harvesting and other expenses are reduced, com-
Rs. 6,00,000. pared to those with human labour.
Note: It is important to account for the one-time capital (vi) Kinematic model of a two-finger dexterous hand
expense of Rs. 3,00,000 towards the raw material for con- with 3 degrees of freedom for plucking mush-
structing the sunshade, and the additional fabrication cost. rooms was developed using the Denavit-Hartenberg
In addition, there is a periodic maintenance cost. But we method.
have not done so, for it will take us far away from our (vii) Inverse kinematics techniques of reaching the
research. It suffices to note that these costs can be amor- ripened mushroom give more precision of plucking
tized over time and covered by the substantial profits. (viii) There will be no limitation or restriction on large
It is altogether a different matter to estimate the cost of scale cultivation and harvesting and this will provide
designing and fabricating a robotic hand, mounted on a economies of scale.
chassis that can travel on a farm. This too falls well outside
the scope of this research. We assume that as international
products reach our country, and as indigenous R&D activ- Conflict of Interest
ities take place, such a robot will become available in the
future. On behalf of all authors, the corresponding author states
that there is no conflict of interest.
[8] L. Dale, N. Amato, Probabilistic Roadmaps – Putting it All Together, Algorithms, and Implementations. MIT Press, June 2005. ISBN 0-262-
Proc IEEE Int. Conf. on Robotics and Automation, 2001, pp. 1940– 03327-5.
1947. [26] M.G. Mohanan, Ambuja Salgoankar, A Survey of Robotic Motion
[9] Shivaji Bachche, Deliberation on Design Strategies of Auto- Planning in Dynamic Environments, Robotic and Autonomous sys-
matic Harvesting Systems: A Survey, Robotics 2015, 4, 194–222; tems 100 (2018), 171–185. www/Elsevier.com/locate/robot.
doi:10.3390/robotics4020194. [27] Jur P. Van Den Berg and Mark H. Overmars, Roadmap-Based Motion
[10] Jörg Baur, Christoph Schütz, Julian Pfaff, Thomas Buschmann and Planning in Dynamic Environments, IEEE transactions on robotics,
Heinz Ulbrich, Path Planning for a Fruit Picking Manipulator, vol. 21, no. 5, October 2005.
Teschnische Universität München, Institute of Applied Mechanics, [28] LaValle, S.M., Rapidly-exploring random trees: A new tool for path
Boltzmannstr. 15, 85747 Garching, Germany. International Confer- planning, IEEE Int. Conference on Robots and Systems, 2000.
ence of Agricultural Engineering, 2014, Zurich. [29] J. Kuffner, S. LaValle. “RRT-Connect: An efficient Approach to Single
[11] N. Reed, S.J. Miles, J. Butler, M. Baldwin, R. Noble Automatic Mush- Query Path Planning”. In Proc. of the IEEE Int. Conf. on Robotics and
room Harvester Development J, J. agric. Engng. Res., (2001) 78 (1), Automation, 2000.
15–23 AE-Automation and Emerging Technologies. [30] Léonard Jaillet and Thierry Siméon, A PRM-Based Motion Planner
[12] Helena Anusia James Jayaselan, Wan Ishak Wan Ismail, Desa for Dynamically Changing Environments, Proceedings of the IEEE
Ahmad, Manipulator Automation for Fresh Fruit Bunch (FFB) Har- Int. Conference on Robots & Systems, Sendai, Japan (pp. 1606–1611),
vester Int J Agric & Biol Eng Open Access at http://www.ijabe.org 2004.
Vol. 5 No. 17, March 2012. [31] Serdar Kucuk and Zafer Bingul (2006). Robot Kinematics: Forward
[13] James Henry Rowley, Developing Flexible Automation for Mush- and Inverse Kinematics, Industrial Robotics: Theory, Modelling and
room Harvesting (Agaricus bisporus), Ph.D Thesis, The University Control, Sam Cubero (Ed.), ISBN: 3-86611-285-8, InTech, Available
of Warwick, June 2009. from: http://www.intechopen.com/books/industrial_robotics_the
[14] Heinz Ulbrich, Joerg Baur, Julian Pfaff, and Christoph Schuetz, ory_modelling_and_control/robot_kinematics__forward_and_inv
Design and Realization of a Redundant Modular Multipurpose erse_kinematics.
Agricultural Robot, DINAME 2015 – Proceedings of the XVII Inter- [32] Jin Guo, Ni Jiangnan, Analysis and Simulation on the Kinematics of
national Symposium on Dynamic Problems of Mechanics, Brazil, Robot Dexterous Hand, 2nd International Conference on Electronics,
February 22–27, 2015. Network and Computer Engineering (ICENCE 2016).
[15] Nikolaus Correll, Nikos Arechiga, Adrienne Bolger, Mario Bollini, [33] Dominik Bertram, James Kuffner, Ruediger Dillmann, Tamim
Ben Charrow, Adam Clayton, Felipe Dominguez, Kenneth Donahue, Asfour, An Integrated Approach to Inverse Kinematics and Path
Samuel Dyar, Luke Johnson, Huan Liu, Alexander Patrikalakis, Planning for Redundant Manipulators, Proceedings of the 2006 IEEE
Timothy Robertson, Jeremy Smith, Daniel Soltero, Melissa Tanner, International Conference on Robotics and Automation, Orlando,
Lauren White and Daniela Rus, Building a Distributed Robot Gar- Florida – May 2006.
den, IEEE/RSJ International Conference on Intelligent Robots and [34] Kwan W. Chan, Closed-form and Generalised Inverse Kinematic
Systems October 11–15, 2009 St. Louis, USA. Solutions for Animating the Human Articulated Structure, Curtin
[16] L. Han, N. Amato, A Kinematics-Based Probabilistic Roadmap University of Technology, 1996.
Method for Closed Chain Systems, Proc. Workshop on Algorithmic [35] J.J. Craig, Introduction to Robotics: Mechanics and Control.
Foundations of Robotics (WAFR’00), 2000, pp. 233–246. Addison-Wesley, 1994.
[17] O. Hofstra, D. Nieuwenhuisen, M.H. Overmars, Improving the Path [36] Z.R. Novakovic, B. Nemee, A Solution of the Inverse Kinematics
Quality for Probabilistic Roadmap Planners, to appear. Problem Using the Sliding Mode, IEEE Transactions on Robotics and
[18] J. Barraquand, L. Kavraki, J.-C. Latombe, T.-Y. Li, R. Motwani, P. Automation, 1990.
Raghavan A Random Sampling Scheme for Path Planning, Int. Jour- [37] James J. Kuffner, Effective Sampling and Distance Metrics for 3D
nal of Robotics Research 16 (1997), pp. 759–774. Rigid Body Path Planning, Proc. 2004 IEEE Int’l Conf. on Robotics
[19] G. Van Den Bergen, Collision Detection in Interactive 3D Computer and Automation (ICRA 2004).
Animation, PhD thesis, Eindhoven University, 1999. [38] Ch. Welman. Inverse Kinematics and Geometric Constraints for
[20] R. Bohlin, L.E. Kavraki, Path Planning Using Lazy PRM, Proc. IEEE Articulated Figure Manipulation, Simon Fraser University, 1993.
Int. Conf. on Robotics and Automation, 2000, pp. 521–528. [39] R.P. Paul. Robot Manipulators: Mathematics, Programming and
[21] V. Boor, M.H. Overmars, A.F. Van Der Stappen, The Gaussian Sam- Control, MIT Press, Cambridge, MA, 1981.
pling Strategy for Probabilistic Roadmap Planners, Proc. IEEE Int. [40] A. Watt and M. Watt, Advanced Animation and Rendering Tech-
Conf. on Robotics and Automation, 1999, pp. 1018–1023. niques, Addison-Wesley, 1992.
[22] Jur Pieter van den Berg, Path Planning in Dynamic Environments, [41] Lukas Barinka, Ing. Roman Berka, Inverse Kinematics – Basic Meth-
Ph D thesis, Utrecht University 2007. ods, Czech Technical University, Prague.
[23] Kindel.Hsu, Latombe and Rock, D*lite, In proceeding of the Int. Con- [42] M.G. Mohanan, Ambuja Salgaonkar, Probabilistic Approach to robot
ference on Artificial Intelligence, Edmonton, 2002. motion planning in dynamic environments, SN Computer Science,
[24] A. Stentz, “The Focussed D* Algorithm for Real-Time Replanning,” May (2020) 1:181 https://doi.org/10.1007/s42979-020-00185-0.
in Proceedings of the International Joint Conference on Artificial [43] M. Gangadharan Mohanan, Ambuja Salgaonkar, Ant colony opti-
Intelligence (IJCAI), 1995. mization and Firefly Algorithms for robotic motion planning in
[25] H. Choset, K.M. Lynch, S. Hutchinson, G.A. Kantor, W. Burgard, dynamic environments. Engineering reports, March 2020, Wiley
L.E. Kavraki, and S. Thrun, Principles of Robot Motion: Theory, Publications, DOI: 10.1002/eng2.12132.