Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load talos arm #2

Open
aelkhour opened this issue Jan 28, 2019 · 2 comments
Open

Cannot load talos arm #2

aelkhour opened this issue Jan 28, 2019 · 2 comments

Comments

@aelkhour
Copy link

Fix proposal

--- a/robots.py
+++ b/robots.py
@@ -15,8 +15,9 @@ def getTalosPathFromRos():
 def loadTalosArm(modelPath='/opt/openrobots/share',freeFloating=False):
     URDF_FILENAME = "talos_left_arm.urdf"
     URDF_SUBPATH = "/talos_data/robots/" + URDF_FILENAME
-    robot = RobotWrapper.BuildFromURDF(modelPath+URDF_SUBPATH, [modelPath],
-                                       pinocchio.JointModelFreeFlyer() if freeFloating else None)
+    robot = RobotWrapper()
+    robot.initFromURDF(modelPath+URDF_SUBPATH, [modelPath],
+                       pinocchio.JointModelFreeFlyer() if freeFloating else None)
     if freeFloating:
         u = robot.model.upperPositionLimit; u[:7] =  1;  robot.model.upperPositionLimit = u
         l = robot.model.lowerPositionLimit; l[:7] = -1;  robot.model.lowerPositionLimit = l
@@ -28,8 +29,9 @@ def loadTalos(modelPath='/opt/openrobots/share'):
     SRDF_FILENAME = "talos.srdf"
     SRDF_SUBPATH = "/talos_data/srdf/" + SRDF_FILENAME
     URDF_SUBPATH = "/talos_data/urdf/" + URDF_FILENAME
-    robot = RobotWrapper.BuildFromURDF(modelPath+URDF_SUBPATH, [modelPath],
-                                       pinocchio.JointModelFreeFlyer())
+    robot = RobotWrapper()
+    robot.initFromURDF(modelPath+URDF_SUBPATH, [modelPath],
+                       pinocchio.JointModelFreeFlyer())
     # Load SRDF file
     rmodel = robot.model
     pinocchio.getNeutralConfiguration(rmodel, modelPath+SRDF_SUBPATH, False)
@wxmerkt
Copy link

wxmerkt commented Jan 28, 2019

Are you on v1.3 (the Pinocchio robotpkg binary)? From source (devel on pinocchio) the notebooks in this repository work just fine.

@aelkhour
Copy link
Author

Forgot to mention it, I am running on pinocchio v2.0.0-alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants