Skip to content

Commit 21be21a

Browse files
committed
brieckiebot
1 parent f80aeab commit 21be21a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+195765
-21
lines changed

roboticstoolbox/examples/branched_robot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969

7070
while not arrivedl or not arrivedr:
7171

72-
vl, arrivedl = rtb.p_servo(la.fkine(r.q), lTep, gain=gain, threshold=0.001)
73-
vr, arrivedr = rtb.p_servo(ra.fkine(r.q), rTep, gain=gain, threshold=0.001)
72+
vl, arrivedl = rtb.cp_servo(la.fkine(r.q), lTep, gain=gain, threshold=0.001)
73+
vr, arrivedr = rtb.cp_servo(ra.fkine(r.q), rTep, gain=gain, threshold=0.001)
7474

7575
r.qd[la.jindices] = np.linalg.pinv(la.jacobe(r.q)) @ vl
7676
r.qd[ra.jindices] = np.linalg.pinv(ra.jacobe(r.q)) @ vr

roboticstoolbox/examples/puma_swift.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python
2+
# %%
23
"""
34
@author John Skinner
45
"""

roboticstoolbox/examples/twistdemo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ def update_twist():
5353

5454
axis = SO3.Rx(twist_params['R']) @ SO3.Ry(twist_params['P'])
5555
point = [twist_params['x'], twist_params['y'], 0]
56+
print(axis)
57+
print(axis.A[:, 2])
58+
print(point)
59+
print(twist_params['p'])
5660
twist = Twist3.UnitRevolute(axis.A[:, 2], point, twist_params['p'])
5761
print(axis.A[:,2])
5862
update_screw_axis(axis, point)

roboticstoolbox/models/URDF/Lite6.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Lite6(Robot):
3131
"""
3232

3333
def __init__(self):
34-
filepath = "ufactory_description/lite6/urdf/lite6_with_gripper_pen.urdf.xacro"
34+
filepath = "ufactory_description/lite6/urdf/lite6_with_gripper.urdf.xacro"
3535
#filepath = "ufactory_description/lite6/urdf/lite6.urdf.xacro"
3636
links, name, urdf_string, urdf_filepath = self.URDF_read(
3737
filepath
@@ -45,7 +45,7 @@ def __init__(self):
4545
gripper_links=links[8],
4646
urdf_filepath=urdf_filepath,
4747
)
48-
self.grippers[0].tool = SE3(0, 0, 0.15)
48+
self.grippers[0].tool = SE3(0, 0, 0.8)
4949
self.qdlim = np.array(
5050
[2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100, 3.0, 3.0]
5151
)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env python
2+
3+
import numpy as np
4+
from roboticstoolbox.robot.Robot import Robot
5+
from spatialmath import SE3
6+
7+
8+
class Mycobot280(Robot):
9+
"""
10+
Class that imports a Panda URDF model
11+
12+
``Panda()`` is a class which imports a Franka-Emika Panda robot definition
13+
from a URDF file. The model describes its kinematic and graphical
14+
characteristics.
15+
16+
.. runblock:: pycon
17+
18+
>>> import roboticstoolbox as rtb
19+
>>> robot = rtb.models.URDF.Lite6()
20+
>>> print(robot)
21+
22+
Defined joint configurations are:
23+
24+
- qz, zero joint angle configuration, 'L' shaped configuration
25+
- qr, vertical 'READY' configuration
26+
- qs, arm is stretched out in the x-direction
27+
- qn, arm is at a nominal non-singular configuration
28+
29+
.. codeauthor:: Jesse Haviland
30+
.. sectionauthor:: Peter Corke
31+
"""
32+
33+
def __init__(self):
34+
35+
links, name, urdf_string, urdf_filepath = self.URDF_read(
36+
"elephantrobotics_description/mycobot_280_pi/urdf/mycobot_280_pi.urdf"
37+
)
38+
39+
super().__init__(
40+
links,
41+
name=name,
42+
manufacturer="elephant_robotics",
43+
#gripper_links=links[7],
44+
urdf_string=urdf_string,
45+
urdf_filepath=urdf_filepath,
46+
)
47+
48+
#self.grippers[0].tool = SE3(0, 0, 0)
49+
50+
self.qdlim = np.array(
51+
[2*np.pi, 2.61799, 5.235988, 2*np.pi, 2.1642, 2.0*np.pi]
52+
)
53+
54+
self.qr = np.array([0, -0.3, 0, -2.2, 0, 2.0])
55+
self.qz = np.zeros(6)
56+
57+
self.addconfiguration("qr", self.qr)
58+
self.addconfiguration("qz", self.qz)
59+
60+
"""
61+
if __name__ == "__main__": # pragma nocover
62+
63+
r = Mycobot280()
64+
r.qz
65+
T = r.fkine(r.qz)
66+
r.plot(r.qr, backend="swift")
67+
"""
68+
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env python
2+
3+
import numpy as np
4+
from roboticstoolbox.robot.Robot import Robot
5+
from spatialmath import SE3
6+
import roboticstoolbox as rtb
7+
8+
class SOARM100(Robot):
9+
"""
10+
Class that imports a Panda URDF model
11+
12+
``Panda()`` is a class which imports a Franka-Emika Panda robot definition
13+
from a URDF file. The model describes its kinematic and graphical
14+
characteristics.
15+
16+
.. runblock:: pycon
17+
18+
>>> import roboticstoolbox as rtb
19+
>>> robot = rtb.models.URDF.Panda()
20+
>>> print(robot)
21+
22+
Defined joint configurations are:
23+
24+
- qz, zero joint angle configuration, 'L' shaped configuration
25+
- qr, vertical 'READY' configuration
26+
- qs, arm is stretched out in the x-direction
27+
- qn, arm is at a nominal non-singular configuration
28+
29+
.. codeauthor:: Jesse Haviland
30+
.. sectionauthor:: Peter Corke
31+
"""
32+
33+
def __init__(self):
34+
filepath = "huggingface_description/SO-ARM100/urdf/SO_5DOF_ARM100_8j_URDF.SLDASM.urdf"
35+
#filepath = "ufactory_description/lite6/urdf/lite6.urdf.xacro"
36+
links, name, urdf_string, urdf_filepath = self.URDF_read(
37+
filepath
38+
)
39+
40+
super().__init__(
41+
links,
42+
name=name,
43+
manufacturer="HuggingFace",
44+
urdf_string=urdf_string,
45+
gripper_links=links[6],
46+
urdf_filepath=urdf_filepath,
47+
)
48+
#self.grippers[0].tool = SE3(0, 0, 0.4)
49+
self.qdlim = np.array(
50+
[2.1750, 2.1750, 2.1750, 2.1750, 2.6100]
51+
)
52+
53+
self.qr = np.array([0, -0.6, 1, 0, 1])
54+
self.qz = np.zeros(5)
55+
56+
self.addconfiguration("qr", self.qr)
57+
self.addconfiguration("qz", self.qz)
58+
59+
60+
if __name__ == "__main__": # pragma nocover
61+
62+
r = SOARM100()
63+
r.qz
64+
T = r.fkine(r.qz)
65+
r.plot(r.qr, backend="swift")
66+
67+

roboticstoolbox/models/URDF/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
from roboticstoolbox.models.URDF.Valkyrie import Valkyrie
2525
from roboticstoolbox.models.URDF.AL5D import AL5D
2626
from roboticstoolbox.models.URDF.Lite6 import Lite6
27+
from roboticstoolbox.models.URDF.SOARM100 import SOARM100
28+
from roboticstoolbox.models.URDF.Mycobot280 import Mycobot280
2729

2830
__all__ = [
2931
"Panda",
@@ -51,5 +53,7 @@
5153
"FetchCamera",
5254
"Valkyrie",
5355
"AL5D",
54-
"Lite6"
56+
"Lite6",
57+
"Mycobot280",
58+
"SOARM100",
5559
]

roboticstoolbox/robot/IK.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,11 @@ def _check_jl(self, ets: "rtb.ETS", q: np.ndarray) -> bool:
488488
True if joints within feasible limits otherwise False
489489
490490
"""
491-
492491
# Loop through the joints in the ETS
493492
for i in range(ets.n):
494493
# Get the corresponding joint limits
495494
ql0 = ets.qlim[0, i]
496495
ql1 = ets.qlim[1, i]
497-
498496
# Check if q exceeds the limits
499497
if q[i] < ql0 or q[i] > ql1:
500498
return False

rtb-data/rtbdata/xacro/elephantrobotics_description/mycobot_280_pi/meshes/collision/G_base.dae

Lines changed: 260 additions & 0 deletions
Large diffs are not rendered by default.

rtb-data/rtbdata/xacro/elephantrobotics_description/mycobot_280_pi/meshes/collision/camera_flange.dae

Lines changed: 308 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)