new omni robot
import numpy as np
from roboticstoolbox.robot.ERobot import ERobot
+from roboticstoolbox.robot.ELink import ELink
+from roboticstoolbox.robot.ETS import ETS
from spatialmath import SE3
@@ -32,15 +34,27 @@ class FrankieOmni(ERobot):
def __init__(self):
- links, name, urdf_string, urdf_filepath = self.URDF_read(
- "franka_description/robots/frankieOmni_arm_hand.urdf.xacro"
+ links_base, _, urdf_string, urdf_filepath = self.URDF_read(
+ "ridgeback_description/urdf/ridgeback.urdf.xacro"
)
+ links_panda, _, urdf_string_panda, _ = self.URDF_read(
+ "franka_description/robots/panda_arm_hand.urdf.xacro"
+ )
+
+ base_link = links_base[9]
+ base_arm = ELink(ETS.tz(0.28), name="base_arm", parent=base_link)
+
+ links_panda[0]._parent = base_arm
+ links_panda[0]._update_fknm()
+ links_all = links_base + links_panda
+ links_all.append(base_arm)
+
super().__init__(
- links,
- name=name,
- manufacturer="Franka Emika",
- gripper_links=links[12],
+ links_all,
+ name="FrankieOmni",
+ manufacturer="Custom",
+ gripper_links=links_all[28],
urdf_string=urdf_string,
urdf_filepath=urdf_filepath,
)
@@ -72,18 +86,9 @@ class FrankieOmni(ERobot):
if __name__ == "__main__": # pragma nocover
+ pass
- robot = FrankieOmni()
- print(robot)
-
- for link in robot.links:
- print(link.name)
- print(link.isjoint)
- print(len(link.collision))
-
- print()
+ # r = Panda()
- for link in robot.grippers[0].links:
- print(link.name)
- print(link.isjoint)
- print(len(link.collision))
+ # for link in r.grippers[0].links:
+ # print(link)
