# Designing the kinematics and Dynamics of a spherical joint as 3 revolute Joint

I am working on a project where I am trying to mimic human like motion and for that I am designing a 7 DOF arm with the spherical joint in shoulder as 3R joints and 2R joints for elbow and 2R joint for wrist respectively. I am using DH parameters to design the 3 revolute joints at the same location. But, the 3R joints are connected to just a single link which is the shoulder in my case. I want to provide dynamic parameters like mass, inertia and com associated with the joints and the link. I am struggling to formulate it how can I provide the parameters and model a single link with multiple DOF. Usually, most robotic models have a single link associated with each DOF.

Any help on designing the URDF or some references will be really helpful.

Here is my code for creating the shoulder 3 DOF as 3R joints using peter Corke's Robotics toolbox.

class human_7DOF_arm(DHRobot):
"""
class that models a 4 DOF human-like anthropomorphic arm
See Ref: https://www.sciencedirect.com/science/article/abs/pii/S0094114X21003700

DH Table:
a   alpha   d   theta
0   -pi/2   0   q1
0    pi/2   0   q2+pi/2 (offset)
0    -pi/2  l1  q3
0    pi/2   0   q4
0    -pi/2  l2  q5
0    -pi/2  0   q6-pi/2
0    0      0   q7

The code snippet is a part of the entire arm that only models the  shoulder joint and the link.
"""

def __init__(self, symbolic = False):

if symbolic:
import spatialmath.base.symbolic as sym

zero = sym.zero()
pi = sym.pi()
else:
from math import pi
zero = 0.0

deg = pi/180
inch = 0.0254
base = 3.45 * inch

# Dynamic Parameters:

l1 = 0.31
l2 = l1
l3 = l1

# Mass of the links (assumed same mass for all 3 joints):
m1 = 1.94
m2 = m1
m3 = m1

# Principal Moment of Inertia for human arm segments:
# Ref : Investigation of inertial properties of human body

Inertia = [[ 22e-4, 133e-4, 133e-4, 0, 0, 0],
[133e-4 , 133e-4,  22e-4,  0, 0, 0],
[133e-4,  22e-4, 133e-4,  0, 0, 0],

COM= [[0.15, 0.032, 0.006],
[0.006, 0.032, 0.15],
[-(l3-0.15), 0.006,  0.032],

L = [
RevoluteDH(
d = 0,
a = 0,
alpha = -pi/2,
offset = zero,
m = mass[0],
I = Inertia[0],
r = COM[0],
qlim = [0 * deg, 180 * deg], # Shoulder Adduction: Checked for limits :[0, 180]

),

RevoluteDH(
d = 0,
a = 0,
alpha = pi/2,
offset = pi/2,
m = mass[1],
I = Inertia[1],
r = COM[1],
qlim = [-90* deg, 145 * deg], # Shoulder Flexion-Extension: checked for limits : [-90, 145]

),

RevoluteDH(
d = l3,
a = 0,
alpha = -pi/2,
offset = zero,
m = mass[2],
I = Inertia[2],
r = COM[2],
qlim = [-90 * deg, 90 * deg], # Shoulder Internal-External Rotation: checked for limits

),



In particular, I am facing trouble to understand how mass and inertia should be assigned since a single link is connected to three joints, I have assumed same mass for the dynamic properties of the link as you can see in the code m1= m2 = m3. I believe that part is not correct and there must be correct ways to model dynamics for a link associated with spherical joint.

Thanks Anshul