Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Is Klampt-examples\Python3\testing\optimizetest.py expected to work? #51

#1

Hello there,

I am interested in using the SO3 and SE3 utilities in combination with sympy. Though in running the tests in the examples I run into some issues.

Running:

python optimizetest.py

I initially get errors complaining about qtpy4, though I have modified to qtpy5. After this I get the expected menu of options.

I am most interested in option 1. Output looks basically reasonable until line 94:

print(" d/dt:",symbolic_io.exprToStr(symbolic.deriv(symbolic.setitem(T,1,t),t)))

It seems to be getting in a rut interpreting the output of symbolic.setitem(T,1,t) as a 'M' (matrix) type, as the shape is len 2, but in this case it is referring to the R and t elements.

After this it throws an error that is not very informative:

Traceback (most recent call last):
File "C:\Users\Josh\Klampt-examples\Python3\testing\optimizetest.py", line 1611, in
templates entry
File "C:\Users\Josh\Klampt-examples\Python3\testing\optimizetest.py", line 94, in test_symbolic
print(" d/dt:",symbolic_io.exprToStr(symbolic.deriv(symbolic.setitem(T,1,t),t)))
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic_io.py", line 305, in exprToStr
res = exprToStr(taggedexpr,parseCompatible,'show')
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic_io.py", line 265, in exprToStr
astr.append(exprToStr(a,parseCompatible,expandSubexprs))
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic_io.py", line 265, in exprToStr
astr.append(exprToStr(a,parseCompatible,expandSubexprs))
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic_io.py", line 265, in exprToStr
astr.append(exprToStr(a,parseCompatible,expandSubexprs))
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic_io.py", line 272, in exprToStr
res = _prettyPrintExpr(expr,astr,parseCompatible)
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic_io.py", line 75, in _prettyPrintExpr
iconst = to_const(expr.args[1])
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic.py", line 4439, in to_const
if v.isConstant():
File "C:\Users\Josh\anaconda3\lib\site-packages\klampt\math\symbolic.py", line 2542, in isConstant
raise NotImplementedError()
NotImplementedError

Are these tests still maintained? If not is there some example of initialising some SE3 and SO3 objects symbolically, manipulating them and getting derivatives etc.

  • replies 0
  • views 465
  • likes 0