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

more resources for generating factor graph #362

Closed MohammadrezaDindarloo closed 1 year ago

MohammadrezaDindarloo commented 1 year ago

hello everyone, I wanted to create my custom factor to add it to nonlinear factor graph from gtsam. I searched I found one example in tutorial but I need some more example to understanding the concept. I will be greatfull if anyone have any example to help me in this mean.

thank you m.r.dindarloo

aaron-skydio commented 1 year ago

Not sure which example you're referring to that you've already found, but here's some of what we have in the docs:

What part of defining, generating, and using a factor are you looking for help with?

MohammadrezaDindarloo commented 1 year ago

hello, I checked the docs and it was helpful to me. the main part that I was dealing with was in generating a custom factor in order using in GTSAM factors. At first I wrote my model with sf. and then tried to create factor that I couldn't find a good resource to do it, finally I ended up with making jacobian with symforce library and add them manually in my factor graph in gtsam and it worked. Now I will try to do this again in symforce by generating my factor from an specific model with define variables and add the output factor to my nonlinearfactorgraph gtsam. I should have more study to find the details more because I am new in factor graph and using symforce to generate my factor so if any simple example is developed it will be great to me, but in this level I found this library very powerful in creating the model jacobian (before that I used maple and I coudn't generate the output).

thank you.

aaron-skydio commented 1 year ago

Cool, glad you were able to figure things out