symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.44k stars 147 forks source link

codegen.Codegen accepts constants in input #170

Open bradley-solliday-skydio opened 2 years ago

bradley-solliday-skydio commented 2 years ago

The Codegen constructor is happy to make a codegen object out of constants

co = codegen.Codegen(
    inputs=Values(a=geo.Rot3.from_storage([1, 2, 3, 4])),
    outputs=Values(out=geo.Rot3.from_storage([1, 2, 3, 4])),
    config=codegen.CppConfig(),
    name="test",
)

This is probably not behavior we want.