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

Fix reload after a description with a mimic joint #212

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

doisyg
Copy link
Contributor

@doisyg doisyg commented Dec 25, 2023

Works for me to fix: #211
Not sure it is the cleanest approach through, opening as a draft to discuss first.

@clalancette
Copy link
Contributor

Thanks for opening this. For this PR, at the very least we should:

a) target it to rolling (we can backport from there), and
b) add in a test that shows that this fixes the problem

@clalancette clalancette changed the base branch from iron to rolling January 4, 2024 20:05
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Contributor

I've retargeted this to the rolling branch, and rebased. I also changed this whole thing to a very explicit copy; while it is more verbose, it is clear what we are doing. Finally, I added in a test here. With all of that, this seems good to me so I'm going to mark it as "Ready for review" and run CI on it. @doisyg any feedback from you is appreciated.

@clalancette clalancette marked this pull request as ready for review January 4, 2024 20:28
@clalancette clalancette self-requested a review as a code owner January 4, 2024 20:28
@clalancette
Copy link
Contributor

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@doisyg
Copy link
Contributor Author

doisyg commented Jan 4, 2024

Thanks for solving it Chris, and sorry for not following up (I was few days out).
This looks good and it works from me. Builds and runs fine under iron, our current production version (I would not mind a release of this fix to it at some point).
I am not sure I fully understand the root cause, but probably something like the shared pointer being deleted before the map is cleared. Anyway, it works now!

@clalancette clalancette merged commit e72adfc into ros:rolling Jan 4, 2024
2 checks passed
@clalancette
Copy link
Contributor

@Mergifyio backport iron humble

Copy link

mergify bot commented Jan 4, 2024

backport iron humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jan 4, 2024
* fix mimic_.clear();

* Make the copy explicit.

* Add in a test for the mimic change crash.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit e72adfc)

# Conflicts:
#	CMakeLists.txt
mergify bot pushed a commit that referenced this pull request Jan 4, 2024
* fix mimic_.clear();

* Make the copy explicit.

* Add in a test for the mimic change crash.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit e72adfc)

# Conflicts:
#	CMakeLists.txt
clalancette pushed a commit that referenced this pull request Jan 4, 2024
* fix mimic_.clear();

* Make the copy explicit.

* Add in a test for the mimic change crash.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit e72adfc)
clalancette pushed a commit that referenced this pull request Jan 4, 2024
* fix mimic_.clear();

* Make the copy explicit.

* Add in a test for the mimic change crash.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit e72adfc)
clalancette pushed a commit that referenced this pull request Jan 5, 2024
* fix mimic_.clear();

* Make the copy explicit.

* Add in a test for the mimic change crash.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit e72adfc)

Co-authored-by: Guillaume Doisy <doisyg@users.noreply.github.com>
clalancette pushed a commit that referenced this pull request Jan 5, 2024
* fix mimic_.clear();

* Make the copy explicit.

* Add in a test for the mimic change crash.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit e72adfc)

Co-authored-by: Guillaume Doisy <doisyg@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

[bug] Crash on refresh of robot_description parameter in case there is mimic joint in the original description
2 participants