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

id_to_ent_map_ isn't getting set for autonomy plugins #432

Open
jharrison opened this issue Mar 24, 2020 · 2 comments
Open

id_to_ent_map_ isn't getting set for autonomy plugins #432

jharrison opened this issue Mar 24, 2020 · 2 comments

Comments

@jharrison
Copy link

Entity::init initializes the id_to_ent_map_ for sensor, motion_model, and controller plugins:

            sensor->set_id_to_ent_map(id_to_ent_map);
            motion_model_->set_id_to_ent_map(id_to_ent_map);
            controller->set_id_to_ent_map(id_to_ent_map);

But it does not do the same for autonomy plugins (nor is it done in make_autonomy). I was able to fix the problem by adding the following change at line 424:

        if (autonomy) {
            (*autonomy)->set_id_to_ent_map(id_to_ent_map);   // ADD THIS LINE
            autonomies_.push_back(*autonomy);
        }

According to @SyllogismRXS:

This looks like a bug that creeped in when the Entity.cpp class was refactored. The id_to_ent_map should be added as an argument to the make_autonomy function that is defined in EntityPluginHelper.h. In the make_autonomy function, the id_to_ent_map should be set.

@SyllogismRXS
Copy link
Contributor

This should be fixed in pull request: #433
Try it out and let me know if this fixes your problem.

@jharrison
Copy link
Author

Looks to me like it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants