Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"UndefVarError: emptyBayesTree not defined" when using manageSolveTree! #721

Open
fabid opened this issue Jul 4, 2021 · 2 comments
Open

Comments

@fabid
Copy link

fabid commented Jul 4, 2021

I have been following the documentation, as well as the example regarding RobotOS integration ( https://github.com/JuliaRobotics/Caesar.jl/blob/7b946d951c26faf75945ed4928c05fbf5ce9a479/examples/wheeled/racecar/ros/CarFeedCommonSetup.jl ), and stumbled on this error when attempting a managetSolveTree!

To reproduce using Caesar v0.10.2

using Distributed
using RobotOS, Caesar
Distributed.@everywhere using Caesar
robotslam = SLAMWrapperLocal()
ST = manageSolveTree!(robotslam.dfg, robotslam.solveSettings, dbg=false)

I couldn't find in the JuliaRobotics codebase where the emptyBayesTree is defined. Is the example deprecated? Am I missing something?

PS: thank you for this amazing project

@dehann
Copy link
Member

dehann commented Jul 8, 2021

Good day @fabid , ah sorry for the slow reply. I missed this earlier!

The missing function I think changed to just BayesTree() to construct a new empty one. The excessive name emptyBayesTree was deprecated and looks like it slipped through.

I also could not find the function when searching... Let me dig a little deeper. Yes the example is a little old, but should not be too much to get it going again. The idea is that manageSolveTree! should let solves run asynchronously while more nodes are added to the factor graph. New solves will trigger when enough poses / variables were added (some parameter tweaking there). Lets say every 10 poses a new solve is triggered. So after 0 to 10 the first solve starts and the graph can keep growing. manageSolveTree! will either block the main thread at pose 20 if the solve is still busy, or continue on if the previous solve has completed. Idea is there will always be up to 20 poses then which have not yet been solved before the process is blocked. This is very useful when processing ROS bags. The signalling uses Channels if I remember correctly.

Let me see if I can figure out why this error and will post back.

@dehann dehann added this to the v0.10.3 milestone Jul 8, 2021
@dehann dehann self-assigned this Jul 8, 2021
@fabid
Copy link
Author

fabid commented Jul 8, 2021

Thanks for the feedback! I will see what I can do using BayesTree() instead.

In our usecase, we have multiple robots (less than 10) doing robot to landmark and robot to robot relative pose measurementsat low frequency (once a minute for example) that we want to integrate in the factor graph. I would like to have a ros node doing regular solves while subscribing to the robots' odometries and publishing at high (similar to odometry) frequency the localization of all the robots (using factor graph solution + odometry update). I first tried to use the async option for the solve, but ran into issues with pub/sub freeze... And it seemed that manageSolveTree! might be a solution, but am happy with any solution enabling this pub/sub without blocking.
I am still farily new to Julia and the interaction of async with RobotOS is not clear to me yet.

@dehann dehann modified the milestones: v0.10.3, v0.11.1 Oct 8, 2021
@dehann dehann modified the milestones: v0.11.1, v0.11.2 Dec 4, 2021
@dehann dehann removed their assignment Feb 22, 2022
@dehann dehann modified the milestones: v0.12.0, v0.0.x Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants