Comments (4)
You should be able to put a Values
in a Values
, which should be similar to putting a Dict
in a Values
? Is there a reason that doesn't cover what you need?
from symforce.
It could be that it cover what I need. I did try to do this, but I struggled with different errors.
How would I reference a key in a Values
inside a Values
?
E.g. (slightly modified from robot_2d_localization
)
landmarks = Values()
landmarks["landmark_0"] = sf.V2(-2, 2)
landmarks["landmark_1"] = sf.V2(1, -3)
landmarks["landmark_2"] = sf.V2(5, 2)
initial_values = Values(
poses=[sf.Pose2.identity()] * num_poses,
landmarks=landmarks,
distances=[1.7, 1.4],
angles=np.deg2rad([[55, 245, -35], [95, 220, -20], [125, 220, -20]]).tolist(),
epsilon=sf.numeric_epsilon,
)
How would i reference the key to eg. landmark_0
?
When constructing a Factor
accessing the key as keys=[f"poses[{i}]", f"landmarks[landmark_{j}]", f"angles[{i}][{j}]", "epsilon"],
failed.
The full modified example: robot_2d_localization.txt
from symforce.
You should be able to do f"landmarks.landmark_{j}"
from symforce.
Correct, it works. Thank you.
It covers my use case, so I close this now.
from symforce.
Related Issues (20)
- Image Jacobians HOT 1
- Add a C++ linter like clang-tidy or cpplint
- sf.logical_or HOT 3
- Need to call make three times in a row to make with cmake HOT 4
- more resources for generating factor graph HOT 3
- Convert gtsam::Rot3 to sym::Rot3 HOT 2
- Failure to build from source on MacOS HOT 3
- Unreasonable high covariances HOT 6
- gmp install with mamba on macOS doesn't work
- Rust codegen support HOT 7
- Symforce solve different than sympy solve HOT 4
- Idea: `PerformanceWarning` HOT 2
- feat: Symbolic integration HOT 4
- Double free when unused but optimized variable appears appears in cpp solver
- Returning a `Values` with fixed-size Matrix types results in `VectorXd` in resulting LCM struct HOT 2
- Using symforce as submodule, fixing rerun_if_needed.py HOT 2
- Epsilon tutorial: Plot of sin(x)/x doesn't show on website dark mode
- Add example for nonlinear MPC from ICRA 2023 workshop HOT 2
- Bundle-adjustment-in-the-large example optimization fails for larger problems HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symforce.