Generated cpp code appears to assign results of multiple solutions to the same "argument" variable, and uses undeclared th_1, th_2, th_3 (etc) variables in solution calculations. The code won't compile, and is unusable.
The generated python code doesn't appear to have these issues.
if(name == 'Flexo'):
# standardize on the order "alpha N-1, a N-1, d N, theta N' for the DH table columns.
a_1 = sp.symbols("a_1")
dh = sp.Matrix([
[ 0, 0, d_1 , th_1 ],
[ -sp.pi/2, a_1, 0, th_2-sp.pi/2 ],
[ 0, a_2, 0, th_3 ],
[ -sp.pi/2, a_3, d_4, th_4 ],
[ sp.pi/2, 0, 0, th_5 ],
[ -sp.pi/2, 0, 0, th_6 ]
])
vv = [1,1,1,1,1,1]
variables = [unknown(th_1), unknown(th_2), unknown(th_3), unknown(th_4), unknown(th_5), unknown(th_6)]
params = [a_1, d_1, a_2, a_3, d_4]
# all values in mm.
pvals = {a_1: 90.11,
d_1: 140.431,
a_2: 250,
a_3: -66.306,
d_4: 342.451}
Generated cpp code appears to assign results of multiple solutions to the same "argument" variable, and uses undeclared th_1, th_2, th_3 (etc) variables in solution calculations. The code won't compile, and is unusable.
The generated python code doesn't appear to have these issues.
My robot definition: