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

Can't print motion component of planar joint #55

Open
ahundt opened this issue Jan 16, 2019 · 0 comments
Open

Can't print motion component of planar joint #55

ahundt opened this issue Jan 16, 2019 · 0 comments

Comments

@ahundt
Copy link

ahundt commented Jan 16, 2019

jPlan = rbd.Joint(rbd.Joint.Planar, True, 'jPlan')
jointResume(jPlan)
qParam = [np.pi/2., 0.2, 0.1]
print('translation:', np.array(jPlan.pose(qParam).translation().transpose()))
print('rotation:')
print(np.array(jPlan.pose(qParam).rotation()))
print('motion:', np.array(jPlan.motion([0.2, 0.5, -0.5])))
jPlan = rbd.Joint(rbd.Joint.Planar, True, 'jPlan')
jointResume(jPlan)
qParam = [np.pi/2., 0.2, 0.1]
print('translation:', np.array(jPlan.pose(qParam).translation().transpose()))
print('rotation:')
print(np.array(jPlan.pose(qParam).rotation()))
print('motion:', np.array(jPlan.motion([0.2, 0.5, -0.5])))
P = 3
A = 3
qZero = [0.0, 0.0, 0.0]
alphaZero = [0.0, 0.0, 0.0]
motion subspace =
[[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [0.0, 0.0, 0.0]]
translation: [[-0.1  0.2  0. ]]
rotation:
[[ 6.123234e-17  1.000000e+00  0.000000e+00]
 [-1.000000e+00  6.123234e-17  0.000000e+00]
 [ 0.000000e+00  0.000000e+00  1.000000e+00]]
motion: 
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-40-7c03fed93332> in <module>
      5 print('rotation:')
      6 print(np.array(jPlan.pose(qParam).rotation()))
----> 7 print('motion:', np.array(jPlan.motion([0.2, 0.5, -0.5])))

~/.local/lib/python3.5/site-packages/numpy/core/arrayprint.py in array_str(a, max_line_width, precision, suppress_small)
   1500         # for which indexing with () returns a 0d instead of a scalar by using
   1501         # ndarray's getindex. Also guard against recursive 0d object arrays.
-> 1502         return _guarded_str(np.ndarray.__getitem__(a, ()))
   1503 
   1504     return array2string(a, max_line_width, precision, suppress_small, ' ', "")

~/.local/lib/python3.5/site-packages/numpy/core/arrayprint.py in wrapper(self, *args, **kwargs)
    458             repr_running.add(key)
    459             try:
--> 460                 return f(self, *args, **kwargs)
    461             finally:
    462                 repr_running.discard(key)

TypeError: __str__ returned non-string (type bytes)
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

1 participant