1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

DOBOT Magicianの可動域(2D)

Last updated at Posted at 2021-03-04

DobotMagicianを横から見たときの可動域を描画します.

install
sudo apt install python3-pip -y
pip3 install matplotlib
ki_2_link.py

import matplotlib.pyplot as plt
import math

L1 = 135
L2 = 147
end_effector_params = [61.0,0.0,0.0]

def ki(j1,j2):
  if(check_joint_limit(j1,j2) == False):
    raise Exception('out of range')

  j1_rad = math.pi * j1 / 180
  j2_rad = math.pi * j2 / 180

  x = L1 * math.sin(j1_rad) + L2 * math.cos(j2_rad) + end_effector_params[0]
  y = L1 * math.cos(j1_rad) - L2 * math.sin(j2_rad) + end_effector_params[2]

  return (x,y)

def check_joint_limit(j1,j2):

  d_j = j2 - j1

  if (j1 >= 0 and j1 <= 85):
    if (j2 >= -10 and j2 <= 95):
      return True

  return False

fig = plt.figure()
ax1 = fig.add_subplot(111)

plt.xlim(-100,400)
plt.ylim(-200,200)

plt.xlabel('x')
plt.ylabel('y')

plt.axes().set_aspect('equal')

plt.grid()

for j1 in range(-180,180,1):
  for j2 in range(-180,180,1):
    try:
      x,y = ki(j1,j2)
      plt.plot(x,y,marker='.',color='blue')
    except:
      pass

plt.show()

以下のような領域が得られました.Figure_1.png

参考

実際の領域

dobot.PNG

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?